From 41a6bdc97595066a4f8fd3147102cc36b54c5822 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Thu, 11 Sep 2008 16:10:50 -0400 Subject: comment out new "WARNING: unwind data not found ..." --- translate.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/translate.cxx b/translate.cxx index 64308fe3..e92c8483 100644 --- a/translate.cxx +++ b/translate.cxx @@ -4517,8 +4517,13 @@ dump_unwindsyms (Dwfl_Module *m, } else { + // There would be only a small benefit to warning. A user + // likely can't do anything about this; backtraces for the + // affected module would just get all icky heuristicy. +#if 0 c->session.print_warning ("No unwind data for " + modname + ", " + dwfl_errmsg (-1)); +#endif } for (unsigned secidx = 0; secidx < seclist.size(); secidx++) -- cgit From 35dc8b0471eb566a2e15a1ed24e9ad26362cf6b1 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Thu, 11 Sep 2008 16:16:25 -0400 Subject: PR6871: sadly, reenable prologue searching for user-space function probes --- ChangeLog | 7 +++++++ tapsets.cxx | 9 ++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2329f1c0..ce4b3844 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-09-11 Frank Ch. Eigler + + PR 6871. + * tapsets.cxx (query_cu): Search for prologues for user-space probes. + (query_func_info): Use prologue_end if available; silently back down + to entrypc probing if needed. + 2008-09-10 Josh Stone * main.cxx (printscript): Ensure no variables are printed in probe lists diff --git a/tapsets.cxx b/tapsets.cxx index 308cef1f..4d47dca1 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -3458,13 +3458,8 @@ query_func_info (Dwarf_Addr entrypc, } else { - if (q->sess.prologue_searching - && !q->has_statement_str && !q->has_statement_num - && !q->sess.ignore_vmlinux && !q->sess.ignore_dwarf) // PR 2608 + if (fi.prologue_end != 0) { - if (fi.prologue_end == 0) - throw semantic_error("could not find prologue-end " - "for probed function '" + fi.name + "'"); query_statement (fi.name, fi.decl_file, fi.decl_line, &fi.die, fi.prologue_end, q); } @@ -3718,7 +3713,7 @@ query_cu (Dwarf_Die * cudie, void * arg) if (rc != DWARF_CB_OK) q->query_done = true; - if (q->sess.prologue_searching + if ((q->sess.prologue_searching || q->has_process) // PR 6871 && !q->has_statement_str && !q->has_statement_num) // PR 2608 if (! q->filtered_functions.empty()) q->dw.resolve_prologue_endings (q->filtered_functions); -- cgit From 5249b0e41d82bf0ad175662637101cc925de7ba2 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Thu, 11 Sep 2008 16:23:16 -0400 Subject: PR6871: test case --- testsuite/ChangeLog | 5 +++++ testsuite/systemtap.base/uprobes.exp | 5 +++-- testsuite/systemtap.base/uprobes.stp | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index 288705b1..59d8de5a 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-09-11 Frank Ch. Eigler + + PR 6871. + * systemtap.base/uprobes.*: Energize. + 2008-09-10 Josh Stone * systemtap.base/probe_list.exp: New test for correct probe listing. diff --git a/testsuite/systemtap.base/uprobes.exp b/testsuite/systemtap.base/uprobes.exp index 8fbe6da6..391f5028 100644 --- a/testsuite/systemtap.base/uprobes.exp +++ b/testsuite/systemtap.base/uprobes.exp @@ -8,6 +8,7 @@ set fp [open $path "w"] puts $fp "int main (int argc, char *argv[])" puts $fp "{" puts $fp "if (argc > 1) main (argc - 1, argv);" +puts $fp "return 0;" puts $fp "}" close $fp @@ -30,8 +31,8 @@ expect { -re {^Disabling[^\r\n]*\r\n} { exp_continue } -re {^Uprobes[^\r\n]*\r\n} { exp_continue } -re {^Cache[^\r\n]*\r\n} { exp_continue } - -re {^process[^\r\n]*jennie[^\r\n]*main[^\r\n]*call\r\n} { incr ok; exp_continue } - -re {^process[^\r\n]*jennie[^\r\n]*main[^\r\n]*return\r\n} { incr ok; exp_continue } + -re {^process[^\r\n]*jennie[^\r\n]*main[^\r\n]*call argc=0x[1-5][^\r\n]*\r\n} { incr ok; exp_continue } + -re {^process[^\r\n]*jennie[^\r\n]*main[^\r\n]*return return=0x0[^\r\n]*\r\n} { incr ok; exp_continue } -timeout 30 timeout { } eof { } diff --git a/testsuite/systemtap.base/uprobes.stp b/testsuite/systemtap.base/uprobes.stp index 8e7dbe9d..32bc1a70 100755 --- a/testsuite/systemtap.base/uprobes.stp +++ b/testsuite/systemtap.base/uprobes.stp @@ -1,3 +1,3 @@ #! stap -p4 -probe process("./jennie").function("main").call { log(pp()/*." ".$$parms*/) } -probe process("./jennie").function("main").return { log(pp()/*." ".$$return*/) } +probe process("./jennie").function("main").call { log(pp()." ".$$parms) } +probe process("./jennie").function("main").return { log(pp()." ".$$return) } -- cgit From aed575d2380dcca0d8212d3dde9bb13f1302562a Mon Sep 17 00:00:00 2001 From: David Smith Date: Thu, 11 Sep 2008 15:24:05 -0500 Subject: Ignore new warning. 2008-09-11 David Smith * lib/stap_run.exp: Ignore new warning. --- testsuite/ChangeLog | 4 ++++ testsuite/lib/stap_run.exp | 1 + 2 files changed, 5 insertions(+) diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index 59d8de5a..18f04bbf 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2008-09-11 David Smith + + * lib/stap_run.exp: Ignore new warning. + 2008-09-11 Frank Ch. Eigler PR 6871. diff --git a/testsuite/lib/stap_run.exp b/testsuite/lib/stap_run.exp index c0027e95..a4beaa12 100644 --- a/testsuite/lib/stap_run.exp +++ b/testsuite/lib/stap_run.exp @@ -34,6 +34,7 @@ proc stap_run { TEST_NAME {LOAD_GEN_FUNCTION ""} {OUTPUT_CHECK_STRING ""} args } expect { -timeout 180 -re {^WARNING: cannot find module [^\r]*DWARF[^\r]*\r\n} {exp_continue} + -re {^WARNING: No unwind data for /.+\r\n} {exp_continue} -re {^Pass\ ([1234]):[^\r]*\ in\ ([0-9]+)usr/([0-9]+)sys/([0-9]+)real\ ms\.\r\n} {set pass$expect_out(1,string) "\t$expect_out(2,string)\t$expect_out(3,string)\t$expect_out(4,string)"; exp_continue} -re {^Pass\ ([34]): using cached [^\r]+\r\n} -- cgit From 3438f38f647db43bfc06b12930b7dfc14af7d67d Mon Sep 17 00:00:00 2001 From: Wenji Huang Date: Fri, 12 Sep 2008 08:14:39 -0400 Subject: Fix redundant implicit probe points in listing mode --- ChangeLog | 4 ++++ elaborate.cxx | 2 ++ tapset/ChangeLog | 4 ++++ tapset/signal.stp | 47 +++++++++++++++++++++++------------------------ 4 files changed, 33 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index ce4b3844..0f3d02e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-09-12 Wenji Huang + + * elaborate.cxx (add_global_var_display): Don't, in listing mode. + 2008-09-11 Frank Ch. Eigler PR 6871. diff --git a/elaborate.cxx b/elaborate.cxx index 552ef338..b476948b 100644 --- a/elaborate.cxx +++ b/elaborate.cxx @@ -1147,6 +1147,8 @@ semantic_pass_symbols (systemtap_session& s) // Keep unread global variables for probe end value display. void add_global_var_display (systemtap_session& s) { + if (s.listing_mode) return; // avoid end probe in listings_mode + varuse_collecting_visitor vut; for (unsigned i=0; i + + * signal.stp: Initialize __sig in a function. + 2008-09-09 Masami Hiramatsu * utrace.stp: Added _utrace_syscall_return(). diff --git a/tapset/signal.stp b/tapset/signal.stp index 1128e6fb..66de767e 100644 --- a/tapset/signal.stp +++ b/tapset/signal.stp @@ -103,14 +103,14 @@ probe signal.send.return = _signal.send.*.return retstr = returnstr(1) } -/* +/* * Return values for "__group_send_sig_info" and "specific_send_sig_info" * - * - return 0 if the signal is sucessfully sent to a process, + * - return 0 if the signal is sucessfully sent to a process, * which means the following: * <1> the signal is ignored by receiving process * <2> this is a non-RT signal and we already have one queued - * <3> the signal is successfully added into the sigqueue of + * <3> the signal is successfully added into the sigqueue of * receiving process * * - return -EAGAIN if the sigqueue is overflow the signal was RT @@ -133,7 +133,7 @@ probe _signal.send.part4.return = kernel.function("specific_send_sig_info").retu %( kernel_v <= "2.6.25" %? /* - * - return 0 if the signal is either sucessfully added into the + * - return 0 if the signal is either sucessfully added into the * sigqueue of receiving process or a SI_TIMER entry is already * queued so just increment the overrun count * @@ -149,7 +149,7 @@ probe _signal.send.part2.return = kernel.function("send_group_sigqueue").return %) /* - * - return 0 if the signal is either sucessfully added into the + * - return 0 if the signal is either sucessfully added into the * sigqueue of receiving process or a SI_TIMER entry is already * queued so just increment the overrun count * @@ -189,14 +189,14 @@ probe signal.checkperm = kernel.function("check_kill_permission") si_code="SI_KERNEL (SIGFPE, SIGSEGV, SIGTRAP, SIGCHLD, SIGPOLL)" else if (sinfo <= 0) si_code="SI_USER or SI_TIMER or SI_ASYNCIO" -} +} probe signal.checkperm.return = kernel.function("check_kill_permission").return { name = "signal.checkperm" retstr = returnstr(1) } - + /* probe signal.wakeup * @@ -205,10 +205,10 @@ probe signal.checkperm.return = kernel.function("check_kill_permission").return * Argument: * sig_pid: pid of the process to be woke up * pid_name: name of the process to be woke up - * resume: indicate whether to wake up a task in STOPPED or + * resume: indicate whether to wake up a task in STOPPED or TRACED state - * state_mask: a string representation indicates the mask - * of task states that can be woken + * state_mask: a string representation indicates the mask + * of task states that can be woken */ probe signal.wakeup = kernel.function("signal_wake_up") { @@ -246,7 +246,7 @@ probe signal.check_ignored.return = kernel.function("sig_ignored").return ? /* probe signal.handle_stop * * For now, just comment it out since at the time handle_stop_signal() - * is called, it doesn't know whether current signal is STOP/COUNT. + * is called, it doesn't know whether current signal is STOP/COUNT. * So the calling of handle_stop_signal() doesn't mean that the Kernel * is now processing the STOP/COUNT signal * @@ -367,7 +367,7 @@ probe signal.send_sig_queue.return = /* probe signal.pending * - * Used to examine the set of signals that are pending for + * Used to examine the set of signals that are pending for * delivery to the calling thread * * long do_sigpending(void __user *set, unsigned long sigsetsize) @@ -395,8 +395,8 @@ probe signal.pending.return = kernel.function("do_sigpending").return * sinfo : address of siginfo table. * ka_addr : Address of the k_sigaction table associated with the signal * oldset_addr : Address of a bit mask array of blocked signals - * regs : Address in the Kernel Mode stack area - * + * regs : Address in the Kernel Mode stack area + * */ probe signal.handle = kernel.function("handle_signal") { @@ -409,7 +409,7 @@ probe signal.handle = kernel.function("handle_signal") regs = $regs // Check whether the signal is a User Mode or Kernel mode Signal. - + if (sinfo == 0 && sig_code <= 0) sig_mode = "User Mode Signal" else if (sinfo >= 1) @@ -506,7 +506,7 @@ probe signal.procmask.return = kernel.function("sigprocmask").return /* * probe signal.flush - * + * * Flush all pending signals for a task. * * void flush_signals(struct task_struct *t) @@ -517,16 +517,16 @@ probe signal.flush = kernel.function("flush_signals") task = $t sig_pid = $t->pid pid_name = kernel_string($t->comm) -} +} function get_sa_flags:long (act:long) %{ /* pure */ - struct k_sigaction *act = (struct k_sigaction *)((long)THIS->act); + struct k_sigaction *act = (struct k_sigaction *)((long)THIS->act); THIS->__retvalue = kread(&act->sa.sa_flags); CATCH_DEREF_FAULT(); %} function get_sa_handler:long (act:long) %{ /* pure */ - struct k_sigaction *act = (struct k_sigaction *)((long)THIS->act); + struct k_sigaction *act = (struct k_sigaction *)((long)THIS->act); THIS->__retvalue = (long)kread(&act->sa.sa_handler); CATCH_DEREF_FAULT(); %} @@ -608,13 +608,10 @@ function sa_handler_str(handler) { /* * Signals start from 1 not 0. */ -function signal_str(num) { - return __sig[num] -} - global __sig[64] -probe begin(-1) { +function signal_str(num) { + if (!(64 in __sig)) { __sig[1] = "HUP" __sig[2] = "INT" __sig[3] = "QUIT" @@ -679,4 +676,6 @@ probe begin(-1) { __sig[62] = "RTMIN+30" __sig[63] = "RTMIN+31" __sig[64] = "RTMIN+32" + } + return __sig[num] } -- cgit