This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: binary printf checked in


I've committed a new printf. I'm working on docs and tests and will get
those in tomorrow. Meanwhile, please give it a try and let me know about
any problems, needed enhancements, etc.

This printf implements %b, %n, and corrects problems with %p.

Can you add the suport of "%lb" (and "%llb") ?
 %lb:  print a long integer in binary format
 %llb: print a long long integer in binary format
Because a long integer is 4-byte on 32bit machines but 8-byte on 64bit ones,
it is inconvient to use "%b" to handle them both.

I tried the binary printf on my ppc64/2.6.9-34.EL and it works well.
Here is some performance result:

SystemTap BENCH2 Mon Apr 10 09:35:17 EDT 2006
kernel: 2.6.9-34.EL.root ppc64
Red Hat Enterprise Linux AS release 4 (Nahant Update 3)
localhost.localdomain: 09:35:17 up 1 min, 1 user, load average: 0.54, 0.22, 0.08
processors: 8 POWER5 (gr) 1502.496000MHz revision: 2.2
MemTotal: 2045148 kB MemFree: 1933824 kB
----------------------------------------------------------------
For comparison, function call overhead is 273 nsecs.
Times below are nanoseconds per probe and include kprobe overhead.
----------------------------------------------------------------
+--- S = Script, R = Runtime
|+-- * = Relayfs Threads
|| NAME 1 2 4 8
R : empty probe 987 1072 1126 667
S : empty probe 1179 1254 1304 787
S : printf 100 chars 2996 3592 3500 1971
WARNING: 436619 transport failures with 8 threads
S*: printf 100 chars 3308 3127 3090 2058
S : print 100 chars 3738 3488 3870 2263
WARNING: 133203 transport failures with 8 threads
S : printf 5 integers 6023 6040 5906 4224
S : binary printf 5 integers 2358 2447 2703 1836
S : printf 10 integers 10194 10301 9893 7379
WARNING: 75799 transport failures with 8 threads
S : binary printf 10 integers 2940 3446 3446 2029
WARNING: 153729 transport failures with 8 threads




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]