简体   繁体   English

使用 valgrind+kcachegrind 在分析结果中缩短 function 名称

[英]Shorten function names in profling results with valgrind+kcachegrind

I work usually with valgrind+kcachegrind to profile C++ codes.我通常使用 valgrind+kcachegrind 来分析 C++ 代码。 A new code I am working with uses very long function names, so that the graphical results are a mess.我正在使用的新代码使用很长的 function 名称,因此图形结果一团糟。 I wonder how can one shorten the function names so that they fit in a small box.我想知道如何缩短 function 名称,以便它们适合放在一个小盒子里。

This is sort of a dirty workaround... you could be to write a script that does a find and replace for a list of function names for the files generated by Valgrind and then use kcachegrind to visualize the data.这是一种肮脏的解决方法......您可以编写一个脚本来查找和替换 Valgrind 生成的文件的 function 名称列表,然后使用 kcachegrind 可视化数据。

Maybe you could shorten the function names in the code by using namespaces?也许您可以使用命名空间缩短代码中的 function 名称?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM