Am 18.12.2015 um 14:50 schrieb Rohit Takhar: > Suppose I have a class |TEST| and there is a function |func()|. How can > I restrict callgrind to get information about this function only. I know > how to do it in C++, but it is not working in python. > I tried following > methods: |--toggle-collect=func| and |--toggle-collect=TEST::func|
These actually are too low-level, as they work on binary code, which would enable/disable collection for specific functions in the Python interpreter. You could do a Python extension module allowing to call a C functions from Python which enables/disables callgrind collection by usingthe Valgrind client request macro "CALLGRIND_TOGGLE_COLLECT". Then call this function from your python code whenever you want to toggle collection state. Josef > > Thanks, > Rohit > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > Valgrind-users mailing list > Valgrind-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/valgrind-users > ------------------------------------------------------------------------------ _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users