如何让 cg_annotate 包含字典?

how to let cg_annotate include a dictionary?

我尝试使用 cg_annotate 通过使用 --include 标志来包含字典。但是,无论我在--include=后面输入什么,它总是显示手册(说明我的路径是错误的)。

例如,我在 --include= 之后输入了“.util”,但它显示了手册: the sceenview

官方手册说:

-I --include= [默认值:none] 将目录添加到列表中以在其中搜索文件。可以给出多个-I/--include选项来添加多个目录。

某处没有存储 'dictionnary' 个目录,您总是有 每次启动时给出目录列表 cg_annotate.

因此,在您的情况下,您的命令中未提供强制参数 cachegrind-out-file。这会导致 cg_annotate 停止并显示其用法。

您可能会使用 kcachegrind(和 --tool=callgrind),因为 kcachegrind 对指定源目录有一些支持(如果需要的话,通常 kcachegrind+callgrind 会自动找到源文件)。

要在kcachegrind中添加一些目录,可以使用菜单项Settings->Configure Kcachegrind,然后在Annotations选项卡中添加目录。