valgrind massif 堆分析器没有详细的快照视图 - 你如何缩放 in/out?
valgrind massif heap profiler no detailed snapshot view - how do you zoom in/out?
所以我试图在 Ubuntu 18
中查看我的 C++ 程序的堆内存使用情况
我有 运行 它使用:
valgrind --tool=massif --smc-check=all ./myprogram
我得到了相当大的输出,没关系。我使用 massif-visualizer 查看它。
我得到了一个漂亮的图表等等。但我想在我的程序结束时详细查看它的关闭情况。但我似乎无法放大图表视图,而且我看不到执行此操作的选项。
手册页(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
massif-visualizer 0.7
您可以使用 kcachegrind 来可视化内存,而不是 massif visualizer
使用 valgrind 3.13 中出现的新 'xtree feature'。
这是 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 18
中查看我的 C++ 程序的堆内存使用情况我有 运行 它使用:
valgrind --tool=massif --smc-check=all ./myprogram
我得到了相当大的输出,没关系。我使用 massif-visualizer 查看它。
我得到了一个漂亮的图表等等。但我想在我的程序结束时详细查看它的关闭情况。但我似乎无法放大图表视图,而且我看不到执行此操作的选项。
手册页(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
massif-visualizer 0.7
您可以使用 kcachegrind 来可视化内存,而不是 massif visualizer 使用 valgrind 3.13 中出现的新 'xtree feature'。
这是 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 获取更多信息。