Hi Bobby, You can use systemtap script to get this, use Statistical Aggregates. my systemtap github: https://github.com/gmayyyha/stap-tools e.g. func-latency.stp --------------------- @define BIN_MDS %( "/tiger/source/ceph/build/bin/ceph-mds" %) global ms global count global latency probe process(@BIN_MDS).function("MDSDaemon::ms_dispatch2") { ms[tid(), ppfunc()] = gettimeofday_us(); count[tid(), ppfunc()] <<< 1; } probe process(@BIN_MDS).function("MDSDaemon::ms_dispatch2").return { us = ms[tid(), ppfunc()]; latency[tid(), ppfunc()] <<< gettimeofday_us() - us; ms[tid(), ppfunc()] = gettimeofday_us(); } probe timer.s(1), end { foreach ([tid, func] in latency) { printf("TID: %d\tFUNC: %s\n", tid, func); printf("count: %d\n", @count(count[tid, func])); printf("latency:\n"); print(@hist_log(latency[tid, func])); } delete count; delete latency; } output -------- TID: 18960 FUNC: MDSDaemon::ms_dispatch2 count: 3 latency: value |-------------------------------------------------- count 16 | 0 32 | 0 64 |@ 1 128 |@ 1 256 | 0 512 |@ 1 1024 | 0 2048 | 0 On Tue, Jul 21, 2020 at 8:01 PM Bobby <italienisch1987@xxxxxxxxx> wrote: > > > And to put it more precisely, I would like to figure out how many times this particular function is called during the execution of the program? > > BR > Bobby ! > > On Tue, Jul 21, 2020 at 1:24 PM Bobby <italienisch1987@xxxxxxxxx> wrote: >> >> >> Hi, >> >> I am trying to profile the number of invocations to a particular function in Ceph source code. I have instrumented the code with time functions. >> >> Can someone please share the script for compiling and running the Ceph source code? I am struggling with it. That would be great help ! >> >> BR >> Bobby ! > > _______________________________________________ > Dev mailing list -- dev@xxxxxxx > To unsubscribe send an email to dev-leave@xxxxxxx _______________________________________________ ceph-users mailing list -- ceph-users@xxxxxxx To unsubscribe send an email to ceph-users-leave@xxxxxxx