gpt4 book ai didi

ubuntu - valgrind massif heap profiler 没有详细的快照 View - 你如何放大/缩小?

转载 作者:行者123 更新时间:2023-12-04 19:12:11 25 4
gpt4 key购买 nike

所以我试图在 Ubuntu 18 中查看我的 c++ 程序的堆内存使用情况

我使用以下方法运行它:
valgrind --tool=massif --smc-check=all ./myprogram
我得到了相当大的输出,这没关系。我使用 massif-visualizer 查看它。

我得到一个漂亮的图表和所有这些。但我想在我的程序结束时详细查看它的关闭情况。但我似乎无法放大图 TableView ,而且我看不到这样做的选项。

手册页(here)这样说:

Massif generates a few detailed snapshots that essentially make up the tree. If you want to get an overview in a more comfortable way than the simple tree view, switch over to the detailed snapshot tab and see the tree visualized as a call graph. Zoom in, zoom out, use the birds eye view and see what contributes to a given snapshot. Note that function calls with the same memory cost are grouped to easily find the interesting parts.



但我看不到“ switch over to the detailed snapshot tab”的选项......还有其他人知道该怎么做吗?

Ubuntu 18

地 block 可视化器 0.7

最佳答案

代替 massif 可视化器,您可以使用 kcachegrind 来可视化内存
使用 valgrind 3.13 中出现的新的“xtree 功能”。

这是 valgrind --help 的摘录:

  user options for Valgrind tools that replace malloc:
--alignment=<number> set minimum alignment of heap allocations [16]
--redzone-size=<number> set minimum size of redzones added before/after
heap blocks (in bytes). [16]
--xtree-memory=none|allocs|full profile heap memory in an xtree [none]
and produces a report at the end of the execution
none: no profiling, allocs: current allocated
size/blocks, full: profile current and cumulative
allocated size/blocks and freed size/blocks.
--xtree-memory-file=<file> xtree memory report file [xtmemory.kcg.%p]

http://www.valgrind.org/docs/manual/manual-core.html#manual-core.xtree
了解更多信息。

关于ubuntu - valgrind massif heap profiler 没有详细的快照 View - 你如何放大/缩小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51599832/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com