Hi, If you see a XXX'N in callgrind's output, this means that this is the profile for all invocations of function XXX at recursion level N. For level 1, suffix '1 is omitted. And there is one caveat: if you ask callgrind to only distinguish n levels, XXX'n will include all XXX'm with m > n.
If you run "valgrind --tool=callgrind -h", you see in the help output: ... --separate-callers=<n> Separate functions by call chain length [0] --separate-callers<n>=<f> Separate <n> callers for function <f> --separate-recs=<n> Separate function recursions up to level [2] --separate-recs<n>=<f> Separate <n> recursions for function <f> ... These are callgrind's options which control what to do about recursive invocations. The default is that 2 levels are distinguished. The means for a function XXX, the profile may have info about XXX and XXX'2, with XXX'2 including all recursion levels above 1. Another way to distinguish invocations of the same function is to add the call chain as context ("--separate-callers" above). E.g. setting this to 2 adds a call chain of up to length 2 as context to a function symbol: XXX'Y'Z would mean all invocations of XXX only when directly called from Y which is called from Z. Distinguishing function invocations is useful for the visualization (k/qcachegrind) not to have to group all functions in recursive cycles together. Such cycle detection is done offline in the visualization. You do not really want cycles as they obfuscates profile results: inclusive cost is meaningless among functions in a cycle, so the visualization has to suppress it. Hope this helps, Josef Am 09.06.2016 um 17:13 schrieb Yang Liu: > Hi, guys! > > I'm profiling postgreSQL with callgrind. Basically, there's a call chain > in the following order. > > ExecProcNode->ExecAgg->ExecProcNode->ExecSeqScan > > ExecProcNode is called recursively through intermediate functions. And > the output file marked the second call to ExecProcNode as a call to > ExecProcNode'2. > > I read the manual, mailing list archive and callgrind's output format. > But that doesn't help me. > Cheers, > Yang Liu ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. http://sdm.link/zohomanageengine _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users