【问题标题】:callgrind with spawn-fcgi not creating profiling data带有 spawn-fcgi 的 callgrind 不创建分析数据
【发布时间】:2014-02-05 00:00:08
【问题描述】:

我需要分析我的以 spawn-fcgi 开头的 c++ 应用程序。 我尝试使用 callgrind,但 KCachegrind 中的 callgrind 输出未显示我的应用程序的任何信息。

valgrind --tool=callgrind --dump-instr=yes --simulate-cache=yes --collect-jumps=yes --demangle=no --trace-children=yes --callgrind-out-file=%p spawn-fcgi -s /tmp/sock.tmp ./myApp arg1 arg2

此命令创建两个文件 10012 和 10013,但第二个文件为空。 第一个文件包含位置 spawn-fcgi、ld-2.*.so amd libc 的功能信息。

请建议正确的选项来获取我的应用程序的分析信息。

【问题讨论】:

    标签: valgrind callgrind spawn-fcgi


    【解决方案1】:

    当分析的 fastcgi 进程在退出时崩溃时,我遇到了类似的行为(因此统计信息不会在使用 SIGSEGV 终止时转储)。

    我使用callgrind_control 工具在任意时间点转储统计数据:

    callgrind_control --dump
    

    您还可以使用callgrind_control -i off 停止收集统计信息,使用callgrind_control -i on 重新启用,使用callgrind_control -z 重置。

    详见callgrind_control手册http://valgrind.org/docs/manual/cl-manual.html

    【讨论】:

      猜你喜欢
      • 2017-10-28
      • 2023-03-07
      • 1970-01-01
      • 1970-01-01
      • 2012-11-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-10-29
      相关资源
      最近更新 更多