Hello, I often find myself in the situation where the PID count has cycled back to zero, sometimes multiple times in a profiling session (certainly caused by the thousands of compiling processes being launched). Would it be possible to have KCacheGrind order the valgrind core files by last modification date, instead of PID number ? Thanks
You can embed the contents of arbitrary environment variables in the filename by putting "%q{VARNAME}" as part of the --callgrind-out-file= option. That might be helpful.
Interesting suggestion. For multithreaded code, this time will be the same for multiple files. Is this about the ordering in the "parts overview"? Does it help to add a column "Creation time" or similar, and you could sort the entries by clicking the header? PS: Julians workaround also sounds good to me.
hi! yes, both the workaround and your suggestion look fine (of course, not having to remember to add some argument to the valgrind command line would be better !). > For multithreaded code, this time will be the same for multiple files. hmm... then maybe there could be a hierarchy for the ordering : first creation time, then PID ?
(note: I'm entirely willing to implement the feature myself if I'm pointed out roughly where this should happen in the code)
> hmm... then maybe there could be a hierarchy for the ordering : first creation time, then PID ? This should be done automatically by the Qt widget... Adding the column should be easy, by looking at the source of the parts list in libviews/partview.h/cpp (you can use github.com/KDE/kcachegrind, and point me to your changes in a repo clone). For the file date, this must be added as variable to TraceData, and filled out in libcore/cachegrindloader when reading a file.