繁体   English   中英

Perf:内核模块符号未在分析中显示

[英]Perf: kernel module symbols not showing up in profiling

在加载和运行内核模块然后通过perf进行分析。

$perf record -a -g --call-graph dwarf sleep 30' $perf report

perf的报告中没有我的内核模块的符号。 虽然符号存在于/proc/kallsyms. 此外,该模块不存在于perf buildid-list这个答案说使模块成为内核模块,我试过但没有帮助。 导致这种情况的可能原因是什么?

消息Failed to open [thrUserCtrl], continuing without symbols听起来像perf无法找到您的模块。 尝试安装它

/lib/modules/`uname -r`/extra

目录如https://wiki.centos.org/HowTos/BuildingKernelModules中所述:

 6. In this example, the file cifs.ko has just been created. As root, copy the .ko file to the /lib/modules/<kernel-version>/extra/ directory. 
   [root@host linux-2.6.18.i686]# cp fs/cifs/cifs.ko /lib/modules/`uname -r`/extra

(在/lib/modules更改文件后不要忘记depmod -a命令)

此消息在map__load生成: httpmap__load

int map__load(struct map *map)
{
    const char *name = map->dso->long_name;
    int nr;
    ...
    nr = dso__load(map->dso, map);
    if (nr < 0) {
        if (map->dso->has_build_id) {
         ...
        } else
            pr_warning("Failed to open %s", name);

        pr_warning(", continuing without symbols\n");
        return -1;

dso__load函数返回错误时。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM