changes to runtime string functions

William Cohen wcohen@redhat.com
Thu Feb 1 14:19:00 GMT 2007


Martin Hunt wrote:
> I have checked in a rewrite of the string functions in the runtime.
> This is part of an effort to increase performance and reduce memory
> usage. Many functions were eliminated and the symbol and stack code
> required major editing. Only a few tapset functions needed to be
> modified to use the new code and everything appears to be running fine
> on x86_64 and i386. It would be nice if people with access to other
> architectures could test and report back if there are any problems. Also
> if you have embedded code that is not checked in and you use any of the
> old string functions, you may need to update your code.
> 
> The most likely affected code is the stack trace stuff.  Please try this
> and see if it looks OK.
> 
> function print_stuff () {
>         print_regs()
>         print_backtrace()
>         print("--------\n")
>         bt = backtrace()
>         printf("the stack is %s\n", bt)
>         print("--------\n")
>         print_stack(bt)
>         print("--------\n")
> }
> 
> probe kernel.function("uptime_read_proc") {
>         print("NOW IN UPTIME\n")
>         print_stuff ()
> }
> 
> After starting this probe, run "uptime" to trigger it.
> 
> Martin

I have access to an ia64 machine running RHEL4 below is what I got.
print_backtrace() repeating the first line on ia64. -Will


$ ./stap_testing_200702010930/install/bin/stap -c "uptime" uptime.stp
  09:00:48 up 19 days, 22:46,  1 user,  load average: 0.09, 0.04, 0.01
NOW IN UPTIME

Pid: 25725, CPU 0, comm:               uptime
psr : 0000101008126030 ifs : 8000000000000006 ip  : [<a0000001001adf40>]
unat: 0000000000000000 pfs : 0000000000000918 rsc : 0000000000000003
rnat: 0000000000000001 bsps: 0000000000000000 pr  : 0000000005555999
ldrs: 0000000000000000 ccv : 0000000000000000 fpsr: 0009804c0270033f
csd : 0000000000000000 ssd : 0000000000000000
b0  : a0000001001a9580 b6  : a000000100211a20 b7  : a0000001001adf40
f6  : 1003e00000000000043c7 f7  : 1003e6db6db6db6db6db7
f8  : 1003e000000000001da71 f9  : 000000000000000000000
f10 : 000000000000000000000 f11 : 000000000000000000000
  0xa0000001001adf40 : uptime_read_proc+0x0/0x200 []
  0xa0000001001adf40 : uptime_read_proc+0x0/0x200 []
  0xa0000001001a9580 : proc_file_read+0x1a0/0x500 []
  0xa000000100123b90 : vfs_read+0x290/0x360 []
  0xa0000001001241d0 : sys_read+0x70/0xe0 []
  0xa00000010000f4a0 : ia64_ret_from_syscall+0x0/0x20 []
  0xa000000000010640
--------
the stack is 0xa0000001001adf40 0xa0000001001a9580 0xa000000100123b90 
0xa0000001001241d0 0xa00000010000f4a0 0xa000000000010640
--------
  0xa0000001001adf40 : uptime_read_proc+0x0/0x200 []
  0xa0000001001a9580 : proc_file_read+0x1a0/0x500 []
  0xa000000100123b90 : vfs_read+0x290/0x360 []
  0xa0000001001241d0 : sys_read+0x70/0xe0 []
  0xa00000010000f4a0 : ia64_ret_from_syscall+0x0/0x20 []
  0xa000000000010640
--------



More information about the Systemtap mailing list