* [Bug runtime/6998] probefunc returns hex addresses for timer and profile probes rather than function name
2008-10-30 20:05 [Bug runtime/6998] New: probefunc returns hex addresses for timer and profile probes rather than function name wcohen at redhat dot com
@ 2008-11-06 2:55 ` wenji dot huang at oracle dot com
2008-11-06 3:24 ` wcohen at redhat dot com
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: wenji dot huang at oracle dot com @ 2008-11-06 2:55 UTC (permalink / raw)
To: systemtap
------- Additional Comments From wenji dot huang at oracle dot com 2008-11-06 02:54 -------
The probe timer.profile is hard-coded in tapsets.cxx. probefunc will search the
context of other probe handler to figure out the function name in this specific
case. It's not reliable. Suggest to change probefunc to pp in the war story that
will return the correct name.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=6998
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug runtime/6998] probefunc returns hex addresses for timer and profile probes rather than function name
2008-10-30 20:05 [Bug runtime/6998] New: probefunc returns hex addresses for timer and profile probes rather than function name wcohen at redhat dot com
2008-11-06 2:55 ` [Bug runtime/6998] " wenji dot huang at oracle dot com
@ 2008-11-06 3:24 ` wcohen at redhat dot com
2008-11-06 3:30 ` fche at redhat dot com
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: wcohen at redhat dot com @ 2008-11-06 3:24 UTC (permalink / raw)
To: systemtap
------- Additional Comments From wcohen at redhat dot com 2008-11-06 03:23 -------
pp() is not a replacement for probefunc() in this situation. In this case the
probe is an asynchronous timer probe and will always get "timer.profile"
returned by pp() regardless of which place the sample is taken in.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=6998
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug runtime/6998] probefunc returns hex addresses for timer and profile probes rather than function name
2008-10-30 20:05 [Bug runtime/6998] New: probefunc returns hex addresses for timer and profile probes rather than function name wcohen at redhat dot com
2008-11-06 2:55 ` [Bug runtime/6998] " wenji dot huang at oracle dot com
2008-11-06 3:24 ` wcohen at redhat dot com
@ 2008-11-06 3:30 ` fche at redhat dot com
2008-11-06 8:09 ` wenji dot huang at oracle dot com
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: fche at redhat dot com @ 2008-11-06 3:30 UTC (permalink / raw)
To: systemtap
------- Additional Comments From fche at redhat dot com 2008-11-06 03:29 -------
probefunc() should work properly and should perform PC-to-symbol mapping
rather than the kprobe pp() hack that's in there now. See also bug #6580,
bug #5635. Does this duplicate #5085?
--
http://sourceware.org/bugzilla/show_bug.cgi?id=6998
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug runtime/6998] probefunc returns hex addresses for timer and profile probes rather than function name
2008-10-30 20:05 [Bug runtime/6998] New: probefunc returns hex addresses for timer and profile probes rather than function name wcohen at redhat dot com
` (2 preceding siblings ...)
2008-11-06 3:30 ` fche at redhat dot com
@ 2008-11-06 8:09 ` wenji dot huang at oracle dot com
2008-11-06 9:10 ` wenji dot huang at oracle dot com
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: wenji dot huang at oracle dot com @ 2008-11-06 8:09 UTC (permalink / raw)
To: systemtap
------- Additional Comments From wenji dot huang at oracle dot com 2008-11-06 08:08 -------
I think it doesn't duplicate 5085. The root reason is _stp_kallsyms_lookup can't
return function name for given address since commit
a00cc8c70d20f2f3429590b629d272c8db65b40f. Only fixed numbered symbol-address
mapping is emitted in compilation time and do relocation in runtime.
Unfortunately, no any symbol-address is emitted for timer.profile, see
stap-symbols.h.
To solve it:
1. The best way is to encourage kernel guy to make kallsyms_lookup exported or
runtime part merged into mainline. We don't need duplicated symbol lookup code.
2. Make timer.profile special and emit most symbol-address mappings as possible.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=6998
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug runtime/6998] probefunc returns hex addresses for timer and profile probes rather than function name
2008-10-30 20:05 [Bug runtime/6998] New: probefunc returns hex addresses for timer and profile probes rather than function name wcohen at redhat dot com
` (3 preceding siblings ...)
2008-11-06 8:09 ` wenji dot huang at oracle dot com
@ 2008-11-06 9:10 ` wenji dot huang at oracle dot com
2008-11-06 12:09 ` fche at redhat dot com
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: wenji dot huang at oracle dot com @ 2008-11-06 9:10 UTC (permalink / raw)
To: systemtap
------- Additional Comments From wenji dot huang at oracle dot com 2008-11-06 09:09 -------
The patch will insert kernel symbols for probe timer.profile. Seems make the
thing right. One question is whether the probe will be triggered from caller in
modules.
diff --git a/tapsets.cxx b/tapsets.cxx
index 5acf50c..a3a0b43 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -7339,6 +7339,7 @@ struct profile_builder: public derived_probe_builder
literal_map_t const &,
vector<derived_probe *> & finished_results)
{
+ sess.unwindsym_modules.insert ("kernel");
finished_results.push_back(new profile_derived_probe(sess, base, location));
}
};
--
http://sourceware.org/bugzilla/show_bug.cgi?id=6998
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug runtime/6998] probefunc returns hex addresses for timer and profile probes rather than function name
2008-10-30 20:05 [Bug runtime/6998] New: probefunc returns hex addresses for timer and profile probes rather than function name wcohen at redhat dot com
` (4 preceding siblings ...)
2008-11-06 9:10 ` wenji dot huang at oracle dot com
@ 2008-11-06 12:09 ` fche at redhat dot com
2008-11-10 21:57 ` wcohen at redhat dot com
2008-11-11 15:19 ` fche at redhat dot com
7 siblings, 0 replies; 9+ messages in thread
From: fche at redhat dot com @ 2008-11-06 12:09 UTC (permalink / raw)
To: systemtap
------- Additional Comments From fche at redhat dot com 2008-11-06 12:07 -------
> The patch will insert kernel symbols for probe timer.profile. Seems make the
> thing right. One question is whether the probe will be triggered from caller in
> modules.
It seems like a sensible default, thanks!
If the script makes no reference to other object code (module/process probe),
one can use the "stap -d" option to add any kernel modules and also any
user-space shared libraries/programs whose detailed profile may be required.
(Even successful lobbying lkml to un-un-export kallayms* would do nothing
to help userspace.)
--
http://sourceware.org/bugzilla/show_bug.cgi?id=6998
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug runtime/6998] probefunc returns hex addresses for timer and profile probes rather than function name
2008-10-30 20:05 [Bug runtime/6998] New: probefunc returns hex addresses for timer and profile probes rather than function name wcohen at redhat dot com
` (5 preceding siblings ...)
2008-11-06 12:09 ` fche at redhat dot com
@ 2008-11-10 21:57 ` wcohen at redhat dot com
2008-11-11 15:19 ` fche at redhat dot com
7 siblings, 0 replies; 9+ messages in thread
From: wcohen at redhat dot com @ 2008-11-10 21:57 UTC (permalink / raw)
To: systemtap
------- Additional Comments From wcohen at redhat dot com 2008-11-10 21:56 -------
The git commit 682f50249457053a0e1919f6a84318bc4b05c96a changes to tapsets.cxx
provides more sensible output for the example pf2.stp.
--- 5696 samples recorded:
acpi_idle_enter_bm 4110
acpi_idle_enter_simple 233
_spin_unlock_irqrestore 164
handle_IRQ_event 127
vread_hpet 45
finish_task_switch 23
usb_hcd_irq 21
read_hpet 18
do_select 10
_spin_lock 8
--
http://sourceware.org/bugzilla/show_bug.cgi?id=6998
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug runtime/6998] probefunc returns hex addresses for timer and profile probes rather than function name
2008-10-30 20:05 [Bug runtime/6998] New: probefunc returns hex addresses for timer and profile probes rather than function name wcohen at redhat dot com
` (6 preceding siblings ...)
2008-11-10 21:57 ` wcohen at redhat dot com
@ 2008-11-11 15:19 ` fche at redhat dot com
7 siblings, 0 replies; 9+ messages in thread
From: fche at redhat dot com @ 2008-11-11 15:19 UTC (permalink / raw)
To: systemtap
------- Additional Comments From fche at redhat dot com 2008-11-11 15:18 -------
We can deem this fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://sourceware.org/bugzilla/show_bug.cgi?id=6998
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 9+ messages in thread