Sorry for compilcated title, but here is a dtrace output of my script, which I think will help explain what im talking about:
16384 1
38048 1
38050 1
38051 1
38055 1
-58632623 1
-5180681 1
-4576706 1
-4498881 1
-4472021 1
-4464140 1
<...>
mymodule.so`FuncXXX
mymodule.so`FirstFunc+0x23c
8
mymodule.so`FuncXXX
mymodule.so`SecondFunc+0x4bc
9
mymodule.so`FuncXXX
mymodule.so`ThirdFunc+0x1e1
35
mymodule.so`FuncXXX
mymodule.so`FourthFunc+0x70
39
dtrace script is:
pid$1:mymodule:FuncXXX:entry{
@a[arg1] = count();
@b[arg2] = count();
@c[ustack()] = count();
}
FuncXXX has singature: void FuncXXX(void *arg, long int p, int q);
Now, i want to aggregate variables p
and q
, but in order where FuncXXX has been called, eg:
mymodule.so`FuncXXX'
mymodule.so`FirstFunc'+0x23c
8
16384 1
38048 1
38050 1
38051 1
38055 1
-58632623 1
-5180681 1
-4576706 1
-4498881 1
-4472021 1
-4464140 1
mymodule.so`FuncXXX'
mymodule.so`SecondFunc'+0x4bc
9
49599 1
51533 1
51535 1
52149 1
52152 1
-148909 1
-135530 1
-121514 1
-117860 1
-97633 1
and so on
Is it possible to do it ? Or should I trace FirstFunc
, SecondFunc
, ThirdFunc
and FourthFunc
independently ? But thing is, that in all of that funcions, FuncXXX
can not always be called.
Best regards and thx for all the answers.