寻找低影响的c ++分析器 [英] Looking for a low impact c++ profiler

查看:90
本文介绍了寻找低影响的c ++分析器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个低影响,os独立分析器的c ++代码。

I am looking for a low impact, os-independent profiler for c++ code.

当我说低影响力时,我指的是比valgrind更不侵犯的东西。我计划在基于MIPS的嵌入式环境(因此os独立性)中使用它,并尝试valgrind的移植版本,它完全改变了性能特征(在工作中太多的海森堡原则),所以我不能去那条路线。我们知道内存总线速度是瓶颈,很有可能解释为什么valgrind是如此干扰。

When I say low impact, I am referring to something less intrusive than valgrind. I plan to use it in a MIPS-based embeded environment (hence the os-independance) and tried a ported version of valgrind and it completely changed the performance characteristics (way too much Heisenberg principle at work) so I cant go that route. We know the memory bus speed is a bottleneck which most-likely explains why valgrind was so intrusive.

我创建了一个基于检查点的家庭成长类型的分析器,让我测量代码的某些部分。基本上,我必须修改代码(并重新编译)在代码中的战略位置设置检查点。然后,当执行时,它存储每个检查点被命中的次数和从上一个检查点被命中以来的时间。然后,运行它后,我可以转储检查点,并为每个计算:num-hits,max-time,min-time,avg-time等。

I have created a home grown type of profiler based on checkpoints that lets me measure certain parts of the code. Basically I have to modify the code (and recompile) to set checkpoints in strategic places in the code. Then, when executed, it stores the number of times each checkpoint is hit and the time since the last checkpoint was hit. Then, after running it, I can dump the checkpoints and for each it calculates: num-hits, max-time, min-time, avg-time, etc.

这个分析器(我称之为LowImpactProfiler)工作正常,但我想知道是否有更好的东西。

This profiler (I called it LowImpactProfiler) works ok, but I wonder if there is something better out there.

我认为oProfile,这是一个抽样profiler,没有运行Linux,我认为这很难实现。

Ive considered oProfile, which is a sampling profiler, but since Im not running Linux, I think it will be really dificult to implement.

推荐答案

我使用了 Shiny 在非常有限的嵌入式设备上配置文件,并取得巨大成功。从您的描述,它采取类似的方法,你的LowImpactProfiler。

I've used Shiny to profile on very limited embedded devices with great success. From your description, it takes a similar approach to your LowImpactProfiler.

这篇关于寻找低影响的c ++分析器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆