* A question on PPC32 @ 2009-06-29 8:24 chen HJ 2009-06-29 9:57 ` Ananth N Mavinakayanahalli 2009-07-02 13:21 ` question about cache miss tgh 0 siblings, 2 replies; 10+ messages in thread From: chen HJ @ 2009-06-29 8:24 UTC (permalink / raw) To: systemtap Hi all, A simple question, can systemTap support PPC32 now? I have tried to compile systemTap on MPC5121, but it needs a header file for PPC64. Best Regards, H.J ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: A question on PPC32 2009-06-29 8:24 A question on PPC32 chen HJ @ 2009-06-29 9:57 ` Ananth N Mavinakayanahalli [not found] ` <79E6823080C67C4780654AFA9678580203B6E175@BLR-SJP-MBX01.wipro.com> 2009-07-02 13:21 ` question about cache miss tgh 1 sibling, 1 reply; 10+ messages in thread From: Ananth N Mavinakayanahalli @ 2009-06-29 9:57 UTC (permalink / raw) To: chen HJ; +Cc: systemtap On Mon, Jun 29, 2009 at 04:24:03PM +0800, chen HJ wrote: > Hi all, > > A simple question, can systemTap support PPC32 now? I have tried to > compile systemTap on MPC5121, but it needs a header file for PPC64. The kernel side support (kprobes, tracepoints, et al) are already available. Its quite possible that the SystemTap runtime needs a few tweaks to get it working for ppc32 Look at __powerpc64__/__arm__ in runtime code and see if a new stub needs to be written at those places for __powerpc__ Ananth ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <79E6823080C67C4780654AFA9678580203B6E175@BLR-SJP-MBX01.wipro.com>]
* Re: A question on PPC32 [not found] ` <79E6823080C67C4780654AFA9678580203B6E175@BLR-SJP-MBX01.wipro.com> @ 2009-06-29 10:18 ` Ananth N Mavinakayanahalli 2009-06-30 0:11 ` chen HJ 0 siblings, 1 reply; 10+ messages in thread From: Ananth N Mavinakayanahalli @ 2009-06-29 10:18 UTC (permalink / raw) To: ashok.shanmugam; +Cc: chenhj98, systemtap On Mon, Jun 29, 2009 at 03:30:22PM +0530, ashok.shanmugam@wipro.com wrote: > >On Mon, Jun 29, 2009 at 04:24:03PM +0800, chen HJ wrote: > >> Hi all, > >> > >> A simple question, can systemTap support PPC32 now? I have tried to > >> compile systemTap on MPC5121, but it needs a header file for PPC64. > > >The kernel side support (kprobes, tracepoints, et al) are already > >available. Its quite possible that the SystemTap runtime needs a few > >tweaks to get it working for ppc32 > > >Look at __powerpc64__/__arm__ in runtime code and see if a new stub > >needs to be written at those places for __powerpc__ > > >Ananth > > > > Hi Ananth, > > Can you tell me from which kernel version the PPC32 is supported for kprobes ? Kumar Gala added the patch (git commit 8209003) in Feb 2007. AFAICS, kprobes for ppc32 has been available since 2.6.21. Ananth ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: A question on PPC32 2009-06-29 10:18 ` Ananth N Mavinakayanahalli @ 2009-06-30 0:11 ` chen HJ 2009-06-30 9:13 ` Ananth N Mavinakayanahalli 0 siblings, 1 reply; 10+ messages in thread From: chen HJ @ 2009-06-30 0:11 UTC (permalink / raw) To: ananth; +Cc: ashok.shanmugam, systemtap Hi all, Thanks for your response, can you provide any more detailed steps about how to make systemTap work on PPC32? Best Regards, H.J On Mon, Jun 29, 2009 at 6:18 PM, Ananth N Mavinakayanahalli<ananth@in.ibm.com> wrote: > On Mon, Jun 29, 2009 at 03:30:22PM +0530, ashok.shanmugam@wipro.com wrote: >> >On Mon, Jun 29, 2009 at 04:24:03PM +0800, chen HJ wrote: >> >> Hi all, >> >> >> >> A simple question, can systemTap support PPC32 now? I have tried to >> >> compile systemTap on MPC5121, but it needs a header file for PPC64. >> >> >The kernel side support (kprobes, tracepoints, et al) are already >> >available. Its quite possible that the SystemTap runtime needs a few >> >tweaks to get it working for ppc32 >> >> >Look at __powerpc64__/__arm__ in runtime code and see if a new stub >> >needs to be written at those places for __powerpc__ >> >> >Ananth >> >> >> >> Hi Ananth, >> >> Can you tell me from which kernel version the PPC32 is supported for kprobes ? > > Kumar Gala added the patch (git commit 8209003) in Feb 2007. AFAICS, kprobes > for ppc32 has been available since 2.6.21. > > Ananth > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: A question on PPC32 2009-06-30 0:11 ` chen HJ @ 2009-06-30 9:13 ` Ananth N Mavinakayanahalli 2009-06-30 22:10 ` Jim Keniston 2009-07-01 0:00 ` Chen Hongjun-R66092 0 siblings, 2 replies; 10+ messages in thread From: Ananth N Mavinakayanahalli @ 2009-06-30 9:13 UTC (permalink / raw) To: chen HJ; +Cc: ashok.shanmugam, systemtap On Tue, Jun 30, 2009 at 08:11:29AM +0800, chen HJ wrote: > Hi all, > > Thanks for your response, can you provide any more detailed steps > about how to make systemTap work on PPC32? On first glance, additions/modifications would be required to runtime/regs.c runtime/regs.h runtime/string.h runtime/copy.c Look for all instances of arch specific code in the above files and you'll need to add or modify existing stubs for it to work on powerpc. Further, you'll need to build and run SystemTap to determine if any other changes would be needed for ppc32 enablement. Ananth ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: A question on PPC32 2009-06-30 9:13 ` Ananth N Mavinakayanahalli @ 2009-06-30 22:10 ` Jim Keniston 2009-07-01 0:00 ` Chen Hongjun-R66092 1 sibling, 0 replies; 10+ messages in thread From: Jim Keniston @ 2009-06-30 22:10 UTC (permalink / raw) To: ananth; +Cc: chen HJ, ashok.shanmugam, systemtap On Tue, 2009-06-30 at 14:41 +0530, Ananth N Mavinakayanahalli wrote: > On Tue, Jun 30, 2009 at 08:11:29AM +0800, chen HJ wrote: > > Hi all, > > > > Thanks for your response, can you provide any more detailed steps > > about how to make systemTap work on PPC32? > > On first glance, additions/modifications would be required to > runtime/regs.c runtime/regs.h runtime/string.h runtime/copy.c > > Look for all instances of arch specific code in the above files and > you'll need to add or modify existing stubs for it to work on powerpc. > > Further, you'll need to build and run SystemTap to determine if any > other changes would be needed for ppc32 enablement. > > Ananth You'll probably need to add a "ppc" subdirectory* to the tapset directory, with registers.stp and syscalls.stp. (*I don't have a ppc32 box handy. I think that the subdirectory name is supposed to match whatever "uname -m" reports.) If you want to probe functions in user-space programs -- e.g., probe process("myprog").function("myfunc") { ... } you'll need to port uprobes. This probably means cloning and/or editing runtime/uprobes/uprobes_ppc64.{c,h}, and making the obvious changes to uprobes_arch.{c,h} in runtime/uprobes and runtime/uprobes2. In case it's not clear what the functions and macros in uprobes_ppc64.{c,h} are supposed to do, I can mail you the uprobes porting guide. Jim Keniston ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: A question on PPC32 2009-06-30 9:13 ` Ananth N Mavinakayanahalli 2009-06-30 22:10 ` Jim Keniston @ 2009-07-01 0:00 ` Chen Hongjun-R66092 1 sibling, 0 replies; 10+ messages in thread From: Chen Hongjun-R66092 @ 2009-07-01 0:00 UTC (permalink / raw) To: ananth; +Cc: ashok.shanmugam, systemtap Hi Ananth, Thanks a lot! Best Regards, H.J > -----Original Message----- > From: Ananth N Mavinakayanahalli [mailto:ananth@in.ibm.com] > Sent: Tuesday, June 30, 2009 5:12 PM > To: chen HJ > Cc: ashok.shanmugam@wipro.com; systemtap@sourceware.org > Subject: Re: A question on PPC32 > > On Tue, Jun 30, 2009 at 08:11:29AM +0800, chen HJ wrote: > > Hi all, > > > > Thanks for your response, can you provide any more detailed steps > > about how to make systemTap work on PPC32? > > On first glance, additions/modifications would be required to > runtime/regs.c runtime/regs.h runtime/string.h runtime/copy.c > > Look for all instances of arch specific code in the above > files and you'll need to add or modify existing stubs for it > to work on powerpc. > > Further, you'll need to build and run SystemTap to determine > if any other changes would be needed for ppc32 enablement. > > Ananth > ^ permalink raw reply [flat|nested] 10+ messages in thread
* question about cache miss 2009-06-29 8:24 A question on PPC32 chen HJ 2009-06-29 9:57 ` Ananth N Mavinakayanahalli @ 2009-07-02 13:21 ` tgh 1 sibling, 0 replies; 10+ messages in thread From: tgh @ 2009-07-02 13:21 UTC (permalink / raw) To: systemtap Hi I want to know whether we can get cache miss information from systemtap, or how to get it, could you give me some examples Thank you ^ permalink raw reply [flat|nested] 10+ messages in thread
* monitoring files opened/closed by a process @ 2009-06-26 21:12 Bruno G. Sousa 2009-06-26 22:23 ` Malte Nuhn 0 siblings, 1 reply; 10+ messages in thread From: Bruno G. Sousa @ 2009-06-26 21:12 UTC (permalink / raw) To: systemtap I am trying to write a stap script that: list the activities of opening and closing files made by a given process (showing time and files being open/close) How it should be? -- View this message in context: http://www.nabble.com/monitoring-files-opened-closed-by-a-process-tp24227355p24227355.html Sent from the Sourceware - systemtap mailing list archive at Nabble.com. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: monitoring files opened/closed by a process 2009-06-26 21:12 monitoring files opened/closed by a process Bruno G. Sousa @ 2009-06-26 22:23 ` Malte Nuhn 2009-06-27 3:20 ` Bruno G. Sousa 0 siblings, 1 reply; 10+ messages in thread From: Malte Nuhn @ 2009-06-26 22:23 UTC (permalink / raw) To: Bruno G. Sousa; +Cc: systemtap Have looked at http://sourceware.org/systemtap/examples/io/ iostats.stp ?? I guess it nearly does what you Need. Greets, malte Am 26.06.2009 um 23:12 schrieb "Bruno G. Sousa" <brgsousa@gmail.com>: > > I am trying to write a stap script that: > list the activities of opening and closing files made by a given > process > (showing time and files being open/close) > > How it should be? > -- > View this message in context: http://www.nabble.com/monitoring-files-opened-closed-by-a-process-tp24227355p24227355.html > Sent from the Sourceware - systemtap mailing list archive at Nabble.com > . > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: monitoring files opened/closed by a process 2009-06-26 22:23 ` Malte Nuhn @ 2009-06-27 3:20 ` Bruno G. Sousa 2009-06-27 21:29 ` Mark Wielaard 0 siblings, 1 reply; 10+ messages in thread From: Bruno G. Sousa @ 2009-06-27 3:20 UTC (permalink / raw) To: systemtap thanks! i got it working! now I need to monitor strings that are being written to files by certain process. wrote this till now: probe begin { printf("STARTEDn") } probe syscall.write.return { if (pid() == target()) { printf("%s(%d) wrote %s\n", execname(),pid(),"something") } } Malte Nuhn wrote: > > Have looked at http://sourceware.org/systemtap/examples/io/ > iostats.stp ?? > > I guess it nearly does what you Need. > > > Greets, malte > > > > Am 26.06.2009 um 23:12 schrieb "Bruno G. Sousa" <brgsousa@gmail.com>: > >> >> I am trying to write a stap script that: >> list the activities of opening and closing files made by a given >> process >> (showing time and files being open/close) >> >> How it should be? >> -- >> View this message in context: >> http://www.nabble.com/monitoring-files-opened-closed-by-a-process-tp24227355p24227355.html >> Sent from the Sourceware - systemtap mailing list archive at Nabble.com >> . >> > > -- View this message in context: http://www.nabble.com/monitoring-files-opened-closed-by-a-process-tp24227355p24230120.html Sent from the Sourceware - systemtap mailing list archive at Nabble.com. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: monitoring files opened/closed by a process 2009-06-27 3:20 ` Bruno G. Sousa @ 2009-06-27 21:29 ` Mark Wielaard [not found] ` <068101c9f85f$534d3480$f9e79d80$@ac.cn> 0 siblings, 1 reply; 10+ messages in thread From: Mark Wielaard @ 2009-06-27 21:29 UTC (permalink / raw) To: Bruno G. Sousa; +Cc: systemtap Hi Bruno, On Fri, 2009-06-26 at 20:20 -0700, Bruno G. Sousa wrote: > now I need to monitor strings that are being written to files by certain > process. > [...] > probe syscall.write.return > { > if (pid() == target()) { > printf("%s(%d) wrote %s\n", execname(),pid(),"something") > } > } So the syscall.write probe (like all syscall probes) also makes available the variable 'argstr'. This contains a string representation of the syscall arguments (it also, as all other syscall probes, defines the variable name, which is the name of the syscall). So you can get most information about such a syscall you can do something like: probe syscall.write { if (pid() == target()) { printf("%s(%d) %s: %s\n", execname(), pid(), name, argstr) } } You want this at the syscall.write.return. return does make available the retstr, which gives you are string representation of the return value. Since you don't have the argstr (nor the buf_uaddr) that the syscall call probe defines, you will have to construct something yourself. Look in tapset/syscalls2.stp, where you can see syscall.write makes available buf_uaddr (a pointer to a buffer into user space), that is then used with (see string.stp) the user_string() function, which fetches the string (up to a MAXSTRINGLEN), and the text_str() function, which escapes any non-printable characters. You can do the same in the return probe. But you will have to use the source variable name $buf. You can use the special return probe value $return to get the number of bytes written: probe syscall.write.return { if (pid() == target()) { printf("%s(%d) wrote %s\n", execname(), pid(), text_str(user_string_n($buf, $return))); } } (Sidenote, the $buf variable is actually read at the syscall entry call, and then cached for use in the return probe. This doesn't matter in this case, but might surprise you if the variable used is changed in the function you probe. At least it surprised me.) Hope that helps, Mark ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <068101c9f85f$534d3480$f9e79d80$@ac.cn>]
* Re: 答复: monitoring files opened/closed by a process [not found] ` <068101c9f85f$534d3480$f9e79d80$@ac.cn> @ 2009-06-29 6:04 ` Mark Wielaard 2009-06-29 11:34 ` question about resource usage for each process tgh 0 siblings, 1 reply; 10+ messages in thread From: Mark Wielaard @ 2009-06-29 6:04 UTC (permalink / raw) To: tgh; +Cc: 'Bruno G. Sousa', systemtap On Mon, 2009-06-29 at 10:14 +0800, tgh wrote: > What is version of kernal do you use for this scripts, 2.6.29.5-191.fc11.x86_64 > I try it , error What is the error you are seeing? ^ permalink raw reply [flat|nested] 10+ messages in thread
* question about resource usage for each process 2009-06-29 6:04 ` 答复: " Mark Wielaard @ 2009-06-29 11:34 ` tgh 2009-07-02 13:21 ` question about cache miss tgh 0 siblings, 1 reply; 10+ messages in thread From: tgh @ 2009-06-29 11:34 UTC (permalink / raw) To: systemtap Hi I hear that linux2.6 has support to get the information about each process resource usage information, e.g., cpu usage or memory usage, I want to know how to get this information with systemtap, could some one give me an example, or where is example for it, Could you help me Thank you in advance ^ permalink raw reply [flat|nested] 10+ messages in thread
* question about cache miss 2009-06-29 11:34 ` question about resource usage for each process tgh @ 2009-07-02 13:21 ` tgh 2009-07-06 19:16 ` William Cohen 0 siblings, 1 reply; 10+ messages in thread From: tgh @ 2009-07-02 13:21 UTC (permalink / raw) To: systemtap Hi Does systemtap support cache miss instrumentation ? how to get it thanks ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: question about cache miss 2009-07-02 13:21 ` question about cache miss tgh @ 2009-07-06 19:16 ` William Cohen 0 siblings, 0 replies; 10+ messages in thread From: William Cohen @ 2009-07-06 19:16 UTC (permalink / raw) To: tgh; +Cc: systemtap tgh wrote: > Hi > Does systemtap support cache miss instrumentation ? how to get it > > thanks > You mean the processor's L1/L2/L3 cache? SystemTap doesn't have access to the performance monitoring hardware on the processors. You might look at the Performance Counters for Linux (PCL) which has been pulled into the 2.6.31 kernel: http://lwn.net/Articles/324775/ http://www.h-online.com/open/Kernel-Log-Main-development-phase-of-Linux-2-6-31-completed--/news/113614 The current PCL implementation doesn't have a interface available for the kernel calls. This makes it a bit difficult for SystemTap to use it. If you are talking about software caches in the kernel, you might be able to find the appropriate functions to probe to allow systemtap to observe those events. Something similar to the the vm.pagefault probe. -Will ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-07-06 19:16 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2009-06-29 8:24 A question on PPC32 chen HJ 2009-06-29 9:57 ` Ananth N Mavinakayanahalli [not found] ` <79E6823080C67C4780654AFA9678580203B6E175@BLR-SJP-MBX01.wipro.com> 2009-06-29 10:18 ` Ananth N Mavinakayanahalli 2009-06-30 0:11 ` chen HJ 2009-06-30 9:13 ` Ananth N Mavinakayanahalli 2009-06-30 22:10 ` Jim Keniston 2009-07-01 0:00 ` Chen Hongjun-R66092 2009-07-02 13:21 ` question about cache miss tgh -- strict thread matches above, loose matches on Subject: below -- 2009-06-26 21:12 monitoring files opened/closed by a process Bruno G. Sousa 2009-06-26 22:23 ` Malte Nuhn 2009-06-27 3:20 ` Bruno G. Sousa 2009-06-27 21:29 ` Mark Wielaard [not found] ` <068101c9f85f$534d3480$f9e79d80$@ac.cn> 2009-06-29 6:04 ` 答复: " Mark Wielaard 2009-06-29 11:34 ` question about resource usage for each process tgh 2009-07-02 13:21 ` question about cache miss tgh 2009-07-06 19:16 ` William Cohen
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).