[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dotgnu-pnet-commits] [SCM] DotGNU Portable.NET Just In Time compiler (l
From: |
Aleksey Demakov |
Subject: |
[dotgnu-pnet-commits] [SCM] DotGNU Portable.NET Just In Time compiler (libjit) branch, cache-refactoring, updated. 3cd1f1124b6a693b23fe0d0a12d7680ff6d3e991 |
Date: |
Fri, 12 Oct 2012 17:36:23 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "DotGNU Portable.NET Just In Time compiler (libjit)".
The branch, cache-refactoring has been updated
via 3cd1f1124b6a693b23fe0d0a12d7680ff6d3e991 (commit)
from fc29f8146ba42bad7ab3e3b01ef7f6242fdb092d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/libjit.git/commit/?id=3cd1f1124b6a693b23fe0d0a12d7680ff6d3e991
commit 3cd1f1124b6a693b23fe0d0a12d7680ff6d3e991
Author: Aleksey Demakov <address@hidden>
Date: Fri Oct 12 21:34:26 2012 +0400
Make _jit_cache_create() figure cache parameters from context metadata
itself.
diff --git a/jit/jit-cache.c b/jit/jit-cache.c
index 088b71e..c4b3951 100644
--- a/jit/jit-cache.c
+++ b/jit/jit-cache.c
@@ -359,11 +359,20 @@ AddToLookupTree(jit_cache_t cache, jit_cache_method_t
method)
}
jit_cache_t
-_jit_cache_create(long limit, long cache_page_size, int max_page_factor)
+_jit_cache_create(jit_context_t context)
{
jit_cache_t cache;
+ long limit, cache_page_size;
+ int max_page_factor;
unsigned long exec_page_size;
+ limit = (long)
+ jit_context_get_meta_numeric(context, JIT_OPTION_CACHE_LIMIT);
+ cache_page_size = (long)
+ jit_context_get_meta_numeric(context,
JIT_OPTION_CACHE_PAGE_SIZE);
+ max_page_factor = (int)
+ jit_context_get_meta_numeric(context,
JIT_OPTION_CACHE_MAX_PAGE_FACTOR);
+
/* Allocate space for the cache control structure */
if((cache = (jit_cache_t )jit_malloc(sizeof(struct jit_cache))) == 0)
{
diff --git a/jit/jit-cache.h b/jit/jit-cache.h
index 88889ef..5f23d02 100644
--- a/jit/jit-cache.h
+++ b/jit/jit-cache.h
@@ -44,9 +44,7 @@ extern "C" {
* indicates the maximum cache page size as multiple of
* "max_page_factor" and "cache_page_size".
*/
-jit_cache_t _jit_cache_create(long limit,
- long cache_page_size,
- int max_page_factor);
+jit_cache_t _jit_cache_create(jit_context_t context);
/*
* Destroy a code cache.
diff --git a/jit/jit-context.c b/jit/jit-context.c
index c1ab3bf..db66fc4 100644
--- a/jit/jit-context.c
+++ b/jit/jit-context.c
@@ -312,17 +312,12 @@ void jit_context_free_meta(jit_context_t context, int
type)
jit_meta_free(&(context->meta), type);
}
-struct jit_cache *_jit_context_get_cache(jit_context_t context)
+struct jit_cache *
+_jit_context_get_cache(jit_context_t context)
{
- if(!(context->cache))
+ if(!context->cache)
{
- context->cache = _jit_cache_create
- ((long)jit_context_get_meta_numeric
- (context, JIT_OPTION_CACHE_LIMIT),
- (long)jit_context_get_meta_numeric
- (context, JIT_OPTION_CACHE_PAGE_SIZE),
- (int)jit_context_get_meta_numeric
- (context, JIT_OPTION_CACHE_MAX_PAGE_FACTOR));
+ context->cache = _jit_cache_create(context);
}
return context->cache;
}
-----------------------------------------------------------------------
Summary of changes:
jit/jit-cache.c | 11 ++++++++++-
jit/jit-cache.h | 4 +---
jit/jit-context.c | 13 ++++---------
3 files changed, 15 insertions(+), 13 deletions(-)
hooks/post-receive
--
DotGNU Portable.NET Just In Time compiler (libjit)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [dotgnu-pnet-commits] [SCM] DotGNU Portable.NET Just In Time compiler (libjit) branch, cache-refactoring, updated. 3cd1f1124b6a693b23fe0d0a12d7680ff6d3e991,
Aleksey Demakov <=