* [Bug kprobes/4384] New: Problem in making kprobe modules portable across all the archtecture.
@ 2007-04-17 12:27 srinivasa at in dot ibm dot com
2007-04-17 12:29 ` [Bug kprobes/4384] " srinivasa at in dot ibm dot com
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: srinivasa at in dot ibm dot com @ 2007-04-17 12:27 UTC (permalink / raw)
To: systemtap
When data symbols are not present in kernel image, one has to add dot(".")
before function name, that he wants to probe in kprobe module on ppc64.
Hence kernel module may not become portable across all the architecture.
When data symbols are missing on ppc64,
====================
[root@llm27lp1 ~]# cat /proc/kallsyms | grep do_fork
c00000000006283c T .do_fork
==============================
kp.symbol_name = ".do_fork";
============================
But if data symbols were included, then it looks like this
================
llm27lp2:~ # cat /proc/kallsyms |grep do_fork
c00000000005de28 T .do_fork
c0000000005fbe88 D do_fork
======================
kp.symbol_name = ".do_fork";
===============================
Iam attaching patch here, which solves this problem. Please let me know your
comments on this.
Thanks
Srinivasa DS
--
Summary: Problem in making kprobe modules portable across all the
archtecture.
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: kprobes
AssignedTo: systemtap at sources dot redhat dot com
ReportedBy: srinivasa at in dot ibm dot com
CC: ananth at in dot ibm dot com,anil dot s dot
keshavamurthy at intel dot com,jkenisto at us dot ibm
dot com,prasanna at in dot ibm dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=4384
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug kprobes/4384] Problem in making kprobe modules portable across all the archtecture.
2007-04-17 12:27 [Bug kprobes/4384] New: Problem in making kprobe modules portable across all the archtecture srinivasa at in dot ibm dot com
@ 2007-04-17 12:29 ` srinivasa at in dot ibm dot com
2007-04-17 14:43 ` ananth at in dot ibm dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: srinivasa at in dot ibm dot com @ 2007-04-17 12:29 UTC (permalink / raw)
To: systemtap
------- Additional Comments From srinivasa at in dot ibm dot com 2007-04-17 13:29 -------
Created an attachment (id=1725)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=1725&action=view)
Patch to solve this problem.
This patch just appends "." to the function name the user wants to probe and
hence user need not have to bother, whether data symbols are present or not.
Thanks
Srinivasa DS
--
http://sourceware.org/bugzilla/show_bug.cgi?id=4384
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug kprobes/4384] Problem in making kprobe modules portable across all the archtecture.
2007-04-17 12:27 [Bug kprobes/4384] New: Problem in making kprobe modules portable across all the archtecture srinivasa at in dot ibm dot com
2007-04-17 12:29 ` [Bug kprobes/4384] " srinivasa at in dot ibm dot com
@ 2007-04-17 14:43 ` ananth at in dot ibm dot com
2007-04-17 16:27 ` fche at redhat dot com
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: ananth at in dot ibm dot com @ 2007-04-17 14:43 UTC (permalink / raw)
To: systemtap
------- Additional Comments From ananth at in dot ibm dot com 2007-04-17 15:43 -------
Srinivasa,
The patch looks fine.... you'll need to fix the codingstyle:
} \
+ else { \
^^^^^
+ char dot_name[KSYM_NAME_LEN+1]; \
+ dot_name[0] = '.'; \
+ strncat(dot_name, name, KSYM_NAME_LEN); \
+ addr = (kprobe_opcode_t *)kallsyms_lookup_name(dot_name); \
+ } \
}
Please include a short description and post it to powerpc-dev list for
inclusion. Feel free to put my signed-off once you've successfully tested the patch.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=4384
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug kprobes/4384] Problem in making kprobe modules portable across all the archtecture.
2007-04-17 12:27 [Bug kprobes/4384] New: Problem in making kprobe modules portable across all the archtecture srinivasa at in dot ibm dot com
2007-04-17 12:29 ` [Bug kprobes/4384] " srinivasa at in dot ibm dot com
2007-04-17 14:43 ` ananth at in dot ibm dot com
@ 2007-04-17 16:27 ` fche at redhat dot com
2007-04-18 3:50 ` ananth at in dot ibm dot com
2007-04-18 4:18 ` ananth at in dot ibm dot com
4 siblings, 0 replies; 6+ messages in thread
From: fche at redhat dot com @ 2007-04-17 16:27 UTC (permalink / raw)
To: systemtap
------- Additional Comments From fche at redhat dot com 2007-04-17 17:27 -------
Note that this would not fix systemtap, as we do not use the kprobes-level symbol
lookup facilities. It sounds like, for the PPC, systemtap itself should prefix
function symbols with "." unconditionally, and not treat it as a conditional
fallback heuristic.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=4384
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug kprobes/4384] Problem in making kprobe modules portable across all the archtecture.
2007-04-17 12:27 [Bug kprobes/4384] New: Problem in making kprobe modules portable across all the archtecture srinivasa at in dot ibm dot com
` (2 preceding siblings ...)
2007-04-17 16:27 ` fche at redhat dot com
@ 2007-04-18 3:50 ` ananth at in dot ibm dot com
2007-04-18 4:18 ` ananth at in dot ibm dot com
4 siblings, 0 replies; 6+ messages in thread
From: ananth at in dot ibm dot com @ 2007-04-18 3:50 UTC (permalink / raw)
To: systemtap
------- Additional Comments From ananth at in dot ibm dot com 2007-04-18 04:50 -------
Subject: Re: Problem in making kprobe modules portable across all the archtecture.
On Tue, Apr 17, 2007 at 04:27:38PM -0000, fche at redhat dot com wrote:
>
> ------- Additional Comments From fche at redhat dot com 2007-04-17 17:27 -------
> Note that this would not fix systemtap, as we do not use the kprobes-level symbol
> lookup facilities. It sounds like, for the PPC, systemtap itself should prefix
> function symbols with "." unconditionally, and not treat it as a conditional
> fallback heuristic.
Yes, that would always work, but you may need to check the module:symbol
type address lookups.
That begs the question... till RHEL5, the compiler used in RHEL would
include both text and data symbols for powerpc. But, RHEL5 has some
compiler modifications that causes the data symbol (eg., "do_fork") to
be discarded and only the text symbol (".do_fork") is visible for
kallsyms lookup. Even upstream kernels built on RHEL5 have a similar
issue. Any specific reasons for this?
--
http://sourceware.org/bugzilla/show_bug.cgi?id=4384
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug kprobes/4384] Problem in making kprobe modules portable across all the archtecture.
2007-04-17 12:27 [Bug kprobes/4384] New: Problem in making kprobe modules portable across all the archtecture srinivasa at in dot ibm dot com
` (3 preceding siblings ...)
2007-04-18 3:50 ` ananth at in dot ibm dot com
@ 2007-04-18 4:18 ` ananth at in dot ibm dot com
4 siblings, 0 replies; 6+ messages in thread
From: ananth at in dot ibm dot com @ 2007-04-18 4:18 UTC (permalink / raw)
To: systemtap
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|systemtap at sources dot |srinivasa at in dot ibm dot
|redhat dot com |com
Status|NEW |ASSIGNED
http://sourceware.org/bugzilla/show_bug.cgi?id=4384
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-04-18 4:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-17 12:27 [Bug kprobes/4384] New: Problem in making kprobe modules portable across all the archtecture srinivasa at in dot ibm dot com
2007-04-17 12:29 ` [Bug kprobes/4384] " srinivasa at in dot ibm dot com
2007-04-17 14:43 ` ananth at in dot ibm dot com
2007-04-17 16:27 ` fche at redhat dot com
2007-04-18 3:50 ` ananth at in dot ibm dot com
2007-04-18 4:18 ` ananth at in dot ibm dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).