fche changed the topic of #systemtap to: http://sourceware.org/systemtap; email systemtap@sourceware.org if answers here not timely, conversations may be logged
khaled has quit [Quit: Konversation terminated!]
<Amy1>
How to print every value in statistical aggregates array?
_whitelogger has joined #systemtap
orivej has joined #systemtap
khaled has joined #systemtap
orivej has quit [Ping timeout: 264 seconds]
orivej has joined #systemtap
khaled has quit [Quit: Konversation terminated!]
<fche>
an array containing aggregates? like a[foo] <<< 1 ?
<fche>
foreach (f in a) print(@count(a[f]))
khaled has joined #systemtap
sscox has quit [Ping timeout: 240 seconds]
khaled has quit [Remote host closed the connection]
khaled has joined #systemtap
sscox has joined #systemtap
khaled has quit [Quit: Konversation terminated!]
khaled has joined #systemtap
sscox has quit [Ping timeout: 256 seconds]
sscox has joined #systemtap
<Amy1>
yes
<Amy1>
but if a[foo] <<<1, a[foo] <<< 2, a[foo] <<<3
<fche>
the 1 and 2 and 3 values are NOT stored
<Amy1>
foreach (f in a) print(@count(a[f])) will print 3
<fche>
only their aggregate characteristics (and only those that you ask for)
<Amy1>
But I want to print 1, 2,3
<fche>
that's not what aggregates are for
<fche>
aggregates are for keeping statistics about an indefinitely large set of data
<Amy1>
so aggregate can't print every value
<fche>
if you want to store the individual values, use two-dimensional arrays
<Amy1>
yeah, I know this.
<Amy1>
how to sort aggregate according @sum ?
<fche>
you mean elements of a[] ?
<Amy1>
yeah
<fche>
foreach (f in a @sum) { }
<Amy1>
cool
<fche>
yeah, glad someone thought of it (wasn't me :
<Amy1>
Let me have a try.
<Amy1>
source: foreach([key] in array @sum) {
<Amy1>
saw: operator ')'
<Amy1>
an error occurred
<fche>
you need a + or - after @sum to say sorting direction
<Amy1>
fche: thank you, very cool
<Amy1>
so a[i]++ imply the "a[]" is an array not aggregate?
<fche>
correct
<fche>
well a is an array of scalar elements
<Amy1>
cool
<Amy1>
foo["tom"] = 23
<Amy1>
so this also imply foo[] is an array not aggregate, right?
sscox has quit [Ping timeout: 256 seconds]
sscox has joined #systemtap
<fche>
it is not 'array vs. aggregate'
<fche>
the concept is 'scalar vs. aggregate'
<fche>
a scalar value or an aggregate value can be in an array
<Amy1>
so foo is an array, right?
<fche>
yes
<fche>
and in the tom case, it is an array of integers
<Amy1>
It seems that aggregate only has operator of "<<<"
<fche>
correct. it is deliberately different
<Amy1>
fche: thank you very much
derek has joined #systemtap
derek is now known as Guest67210
Guest67210 is now known as derek0883
<derek0883>
HI does anyone know how can I get dyninst-devel for ubuntu?
agentzh has quit [Ping timeout: 265 seconds]
agentzh has joined #systemtap
agentzh has quit [Changing host]
agentzh has joined #systemtap
<derek0883>
stap --dyninst -p4 -e 'probe begin { printf("Hello World!\n"); exit() }'ERROR: --runtime=dyninst unavailable; this build lacks DYNINST feature
<derek0883>
my stap doesn't have dyninst enabled
derek__ has joined #systemtap
<lindi->
derek0883: are you sure you need dyninst?
<lindi->
afaik userspace probing works with the kernel runtime as well
<derek0883>
I want put some "MARK" in userspace app, then use that Mark with stap
<lindi->
sorry I don't know what those are :/
<derek0883>
lindi- it is kind like static tracepoint in kernel, you can add to other userspace app, then recompile userspace app, you can trace it
<lindi->
derek0883: yep I guess you get more reliable access to specific variables? since with normal probes some variables could be optimized out
<derek0883>
lindi- I'm trying to figure out what advantage it is. I'm new to this too!! :)
<lindi->
sure
<fche>
derek0883, that doesn't need dyninst
<fche>
just normal dyninst-style sys/sdt.h macros compiled into the userspace binary
<fche>
stap's normal kernel runtime can use those
<fche>
if you do want to use the dyninst backend (for example, for reasons of privilege or whatever), then yeah you'll need to get/build/install dyninst
orivej has quit [Ping timeout: 256 seconds]
khaled has quit [Quit: Konversation terminated!]
derek0883 has quit [Remote host closed the connection]