Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1277959
| From | "Wangnan (F)" <wangnan0@huawei.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] perf probe: Adjust dso->long_name for offline module |
| Date | 2015-11-26 04:30 +0100 |
| Message-ID | <qyVpU-7d5-3@gated-at.bofh.it> (permalink) |
| References | <qyGAy-5Fi-7@gated-at.bofh.it> <qyO56-266-47@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 2015/11/26 3:35, Arnaldo Carvalho de Melo wrote:
> Em Wed, Nov 25, 2015 at 11:30:59AM +0000, Wang Nan escreveu:
>> If libelf unable to open debuginfo for an offline module but the ko has
>> symtab, something unexpected may happen.
>>
>> # rm -rf ~/.debug/
>> # mv /usr/lib64/elfutils/libebl_x86_64.so{,.bak}
>> # ./perf probe -m /home/wangnan/kmodule/mymodule.ko my_func
>> [mymodule] with build id 326ab42550ef3d24944f53c817533728367effeb not found, continuing without symbols
>> Failed to find symbol my_func in /home/wangnan/kmodule/mymodule.ko
> Understood, since we are giving the path to that module, we can, if its
> build-id matches the one for the online module, use it, is that the
> case, i.e. do we check, int his scenario, that the build-id matches?
Please see my test result in v2 patch [1]. In symsrc__init() build-id
would be checked.
[1]
http://lkml.kernel.org/r/1448507949-187812-1-git-send-email-wangnan0@huawei.com
# ./perf probe -m ./mymodule.ko my_func
Added new event:
probe:my_func (on my_func in /home/wangnan/kmodule/mymodule.ko)
You can now use it in all perf tools, such as:
perf record -e probe:my_func -aR sleep 1
# ./perf probe -d '*'
Removed event: probe:my_func
# mv ./mymodule.{ko,.bak}
# mv ./moduleb.ko mymodule.ko
# ./perf probe -m ./mymodule.ko my_func
/home/wangnan/kmodule/mymodule.ko with build id 326ab42550ef3d24944f53c817533728367effeb not found, continuing without symbols
Failed to find symbol my_func in /home/wangnan/kmodule/mymodule.ko
Error: Failed to add events.
# ./perf probe -v -m ./mymodule.ko my_func
probe-definition(0): my_func
symbol:my_funcfile:(null) line:0 offset:0 return:0 lazy:(null)
0 arguments
Could not open debuginfo. Try to use symbols.
symsrc__init: build id mismatch for /home/wangnan/kmodule/mymodule.ko.
/home/wangnan/kmodule/mymodule.ko with build id 326ab42550ef3d24944f53c817533728367effeb not found, continuing without symbols
Failed to find symbol my_func in /home/wangnan/kmodule/mymodule.ko
Error: Failed to add events. Reason: No such file or directory (Code: -2)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] perf probe: Adjust dso->long_name for offline module Wang Nan <wangnan0@huawei.com> - 2015-11-25 12:40 +0100
Re: [PATCH] perf probe: Adjust dso->long_name for offline module Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-11-25 20:40 +0100
Re: [PATCH] perf probe: Adjust dso->long_name for offline module "Wangnan (F)" <wangnan0@huawei.com> - 2015-11-26 04:30 +0100
RE: [PATCH] perf probe: Adjust dso->long_name for offline module 平松雅巳 / HIRAMATU,MASAMI <masami.hiramatsu.pt@hitachi.com> - 2015-11-26 02:20 +0100
Re: [PATCH] perf probe: Adjust dso->long_name for offline module "Wangnan (F)" <wangnan0@huawei.com> - 2015-11-26 02:40 +0100
[PATCH v2] perf probe: Adjust dso->long_name for offline module Wang Nan <wangnan0@huawei.com> - 2015-11-26 04:30 +0100
[PATCH v3] perf probe: Adjust dso->long_name for offline module Wang Nan <wangnan0@huawei.com> - 2015-11-26 05:10 +0100
Re: [PATCH v3] perf probe: Adjust dso->long_name for offline module Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-11-26 17:50 +0100
[tip:perf/core] perf machine: Adjust dso-> long_name for offline module tip-bot for Wang Nan <tipbot@zytor.com> - 2015-11-27 08:50 +0100
csiph-web