ITPub博客

首页 > > > gperftools 使用 prof 查看代码时间消耗没有输出

gperftools 使用 prof 查看代码时间消耗没有输出

作者:amadan 时间:2019-09-04 15:24:59 0 删除 编辑

我用 gperftools 的 ProfilerStart 和 ProfilerStop 方式对代码时间消耗进行统计, 有文件输出, 但是使用 pprof --text 对文件进行分析的时候没有输出结果. 同时还有一些奇怪的错误如下:

Argument "MSWin32" isn't numeric in numeric eq (==) at /usr/local/bin/pprof line 4971.

Argument "linux" isn't numeric in numeric eq (==) at /usr/local/bin/pprof line 4971.

是不是因为ProfilerStart 到 ProfilerStop 之间执行的时间太短了的原因, 大概在 1000us 左右.

求大神解答.

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/2310/viewspace-3120955/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-08-06

  • 博文量
    200
  • 访问量
    14416