Previously, we added only those vregs which were active (had a machine
register assigned) at the gc safepoint. Now we add both in-register and
in-stack variables to the stack map, and print the machine register in
the gc-map tracing.

Signed-off-by: Vegard Nossum <[email protected]>
---
 jit/gc-map.c    |    6 ------
 jit/trace-jit.c |    8 ++++++--
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/jit/gc-map.c b/jit/gc-map.c
index a341f17..292f2fc 100644
--- a/jit/gc-map.c
+++ b/jit/gc-map.c
@@ -29,12 +29,6 @@ int gc_map_init(struct compilation_unit *cu)
                                if  (var->vm_type != J_REFERENCE)
                                        continue;
 
-                               if (!in_range(&var->interval->range,
-                                       insn->mach_offset))
-                               {
-                                       continue;
-                               }
-
                                set_bit(live_vars->bits, var->vreg);
                        }
 
diff --git a/jit/trace-jit.c b/jit/trace-jit.c
index 2923c89..19f5523 100644
--- a/jit/trace-jit.c
+++ b/jit/trace-jit.c
@@ -360,8 +360,12 @@ static void print_gc_map(struct compilation_unit *cu, 
struct insn *insn)
                if (!test_bit(live_vars->bits, var->vreg))
                        continue;
 
-               trace_printf("%d (%s), ",
-                       var->vreg, "" /* reg_name(var->interval->reg) */);
+               if (in_range(&var->interval->range, insn->mach_offset)) {
+                       trace_printf("%d (%s), ",
+                               var->vreg, reg_name(var->interval->reg));
+               } else {
+                       trace_printf("%d (stack), ", var->vreg);
+               }
        }
 
        trace_printf("\n");
-- 
1.6.0.6


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jatovm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jatovm-devel

Reply via email to