summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--runtime/ChangeLog8
-rw-r--r--runtime/loc2c-runtime.h2
-rw-r--r--runtime/regs-ia64.c15
-rw-r--r--tapsets.cxx2
-rw-r--r--testsuite/ChangeLog6
-rw-r--r--testsuite/systemtap.stress/conversions.exp5
-rw-r--r--translate.cxx2
8 files changed, 37 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index ad961375..e35d90b6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-04-04 Masami Hiramatsu <mhiramat@redhat.com>
+
+ PR 6028
+ * translate.cxx (c_unparser::emit_common_header): Add unwaddr for
+ caching unwound address.
+ * tapsets.cxx (common_probe_entryfn_prologue): Clear unwaddr.
+
2008-04-01 Frank Ch. Eigler <fche@elastic.org>
* safety/*: Removed subdirectory containing abandoned experiment.
diff --git a/runtime/ChangeLog b/runtime/ChangeLog
index bcac9e80..ee191022 100644
--- a/runtime/ChangeLog
+++ b/runtime/ChangeLog
@@ -1,3 +1,11 @@
+2008-04-04 Masami Hiramatsu <mhiramat@redhat.com>
+
+ PR 6028
+ * loc2c-runtime.h (fetch_register): Call ia64_fetch_register with
+ the address of c->unwaddr.
+ * regs-ia64.c (ia64_fetch_register): Don't unwind stack if it has
+ already unwound stack in same probe.
+
2008-04-04 David Smith <dsmith@redhat.com>
PR 5961 (partial)
diff --git a/runtime/loc2c-runtime.h b/runtime/loc2c-runtime.h
index 7ea1b1e4..66fd1e43 100644
--- a/runtime/loc2c-runtime.h
+++ b/runtime/loc2c-runtime.h
@@ -129,7 +129,7 @@
#undef fetch_register
#undef store_register
-#define fetch_register(regno) ia64_fetch_register(regno, c->regs)
+#define fetch_register(regno) ia64_fetch_register(regno, c->regs, &c->unwaddr)
#define store_register(regno,value) ia64_store_register(regno, c->regs, value)
#elif defined __x86_64__
diff --git a/runtime/regs-ia64.c b/runtime/regs-ia64.c
index 2a5a1d17..66dc60f3 100644
--- a/runtime/regs-ia64.c
+++ b/runtime/regs-ia64.c
@@ -35,7 +35,7 @@ static void ia64_stap_get_arbsp(struct unw_frame_info *info, void *arg)
lp->address = 0;
}
-static long ia64_fetch_register(int regno, struct pt_regs *pt_regs)
+static long ia64_fetch_register(int regno, struct pt_regs *pt_regs, unsigned long **cache)
{
struct ia64_stap_get_arbsp_param pa;
@@ -47,12 +47,15 @@ static long ia64_fetch_register(int regno, struct pt_regs *pt_regs)
else if (regno < 32 || regno > 127)
return 0;
- pa.ip = pt_regs->cr_iip;
- unw_init_running(ia64_stap_get_arbsp, &pa);
- if (pa.address == 0)
- return 0;
+ if (!*cache) {
+ pa.ip = pt_regs->cr_iip;
+ unw_init_running(ia64_stap_get_arbsp, &pa);
+ if (pa.address == 0)
+ return 0;
+ *cache = pa.address;
+ }
- return *ia64_rse_skip_regs(pa.address, regno-32);
+ return *ia64_rse_skip_regs(*cache, regno-32);
}
static void ia64_store_register(int regno,
diff --git a/tapsets.cxx b/tapsets.cxx
index 079d87e8..ceda9015 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -205,6 +205,8 @@ common_probe_entryfn_prologue (translator_output* o, string statestr,
o->newline() << "c->last_error = 0;";
o->newline() << "c->nesting = 0;";
o->newline() << "c->regs = 0;";
+ o->newline() << "c->unwaddr = 0;";
+ // reset unwound address cache
o->newline() << "c->pi = 0;";
o->newline() << "c->probe_point = 0;";
if (! interruptible)
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog
index da789127..95c1f117 100644
--- a/testsuite/ChangeLog
+++ b/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2008-04-04 Masami Hiramatsu <mhiramat@redhat.com>
+
+ PR 5528
+ * systemtap.stress/conversions.exp: Update a script to catch up
+ recently changes of conversions.stp.
+
2008-03-31 Frank Ch. Eigler <fche@elastic.org>
* configure.ac: Bump version to 0.7.
diff --git a/testsuite/systemtap.stress/conversions.exp b/testsuite/systemtap.stress/conversions.exp
index 34cd3889..9c2c2fa9 100644
--- a/testsuite/systemtap.stress/conversions.exp
+++ b/testsuite/systemtap.stress/conversions.exp
@@ -12,13 +12,12 @@ foreach value {0 0xffffffff 0xffffffffffffffff} {
verbose -log "exp $test $errs"
expect {
-timeout 180
- -re {ERROR[^\r\n]*\r\n} { incr errs; exp_continue }
- -re {WARNING[^\r\n]*\r\n} { incr errs; exp_continue }
+ -re {(ERROR|WARNING)[^\r\n]*\r\n} { incr errs; exp_continue }
eof { }
timeout { fail "$test (timeout)" }
}
verbose -log "done exp $test $errs"
wait
- if {$errs == 9} { pass $test } else { fail "$test ($errs)" }
+ if {$errs == 14} { pass $test } else { fail "$test ($errs)" }
verbose -log "done $test $errs"
}
diff --git a/translate.cxx b/translate.cxx
index f30fca7b..c9ec094a 100644
--- a/translate.cxx
+++ b/translate.cxx
@@ -874,6 +874,8 @@ c_unparser::emit_common_header ()
// See c_unparser::visit_statement()
o->newline() << "const char *last_stmt;";
o->newline() << "struct pt_regs *regs;";
+ o->newline() << "unsigned long *unwaddr;";
+ // unwaddr is caching unwound address in each probe handler on ia64.
o->newline() << "struct kretprobe_instance *pi;";
o->newline() << "va_list *mark_va_list;";
o->newline() << "void *data;";