From: "Liu, Changcheng via lttng-dev" <lttng-dev@lists.lttng.org>
To: "Christophe Bédard" <bedard.christophe@gmail.com>
Cc: lttng-dev@lists.lttng.org, changcheng.liu@intel.com
Subject: Re: [lttng-dev] get function names with lttng-ust-cyg-profile
Date: Wed, 24 Jun 2020 09:41:41 +0800 [thread overview]
Message-ID: <20200624014141.GA4166707@jerryopenix> (raw)
Message-ID: <20200624014141.nXOKnFpav0QR7CnhxoEk9Jw9q0YEdS-gZXbqjkAU0m4@z> (raw)
In-Reply-To: <CAAS9doZNif9Cw=kmo0hvKuF_qVBiqX_233JWFr4fTc5A72eLvw@mail.gmail.com>
On 12:52 Tue 23 Jun, Christophe Bédard wrote:
> Hi,
>
> Babeltrace is doing exactly what it should as far as I know.
>
> yes, but babeltrace can provide the information if:
> * ip and vpid contexts are enabled (for userspace), e.g.
>
> $ lttng add-context --userspace --type=ip --type=vpid
>
> * LTTng state dump events are enabled, e.g.
>
> $ lttng enable-event --userspace 'lttng_ust_statedump:*'
Thanks Christophe. I works now that the function entry name could be got
after 1) add ip&vpid context 2) enable state dump
Do you know how to print the call site function_name/offset?
For example:
11 getchar();
12
13 x = add3(x);
Currently, it only shows call_site address instead of function name with offset.
func_entry: { cpu_id = 2 }, { ip = 0x55CFA4F5C1EE, debug_info = { bin = "instrument+0x11ee", func = "main+0", src = "instrument.c:7" }, vpid = 8523 }, { addr = 0x55CFA4F5C1EE, call_site = 0x7F27C4B1E0B3 }
func_entry: { cpu_id = 1 }, { ip = 0x55CFA4F5C1A9, debug_info = { bin = "instrument+0x11a9", func = "add3+0", src = "instrument.c:3" }, vpid = 8523 }, { addr = 0x55CFA4F5C1A9, call_site = 0x55CFA4F5C237 }
func_exit: { cpu_id = 1 }, { ip = 0x55CFA4F5C1A9, debug_info = { bin = "instrument+0x11a9", func = "add3+0", src = "instrument.c:3" }, vpid = 8523 }, { addr = 0x55CFA4F5C1A9, call_site = 0x55CFA4F5C237 }
func_exit: { cpu_id = 1 }, { ip = 0x55CFA4F5C1EE, debug_info = { bin = "instrument+0x11ee", func = "main+0", src = "instrument.c:7" }, vpid = 8523 }, { addr = 0x55CFA4F5C1EE, call_site = 0x7F27C4B1E0B3 }
B.R.
Changcheng
>
> see this (from bt2 but it also applies to
> bt1): [1]https://babeltrace.org/docs/v2.0/man7/babeltrace2-filter.lttng
> -utils.debug-info.7/#doc-lttng-prereq
> Note that the Python bindings for babeltrace don't provide/expose this
> debug info.
> Christophe
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
next prev parent reply other threads:[~2020-06-24 1:45 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-23 14:37 get function names with lttng-ust-cyg-profile Liu, Changcheng via lttng-dev
2020-06-23 14:37 ` [lttng-dev] " Liu, Changcheng via lttng-dev
2020-06-23 15:12 ` Matthew Khouzam via lttng-dev
2020-06-23 15:12 ` [lttng-dev] " Matthew Khouzam via lttng-dev
2020-06-23 16:52 ` Christophe Bédard via lttng-dev
2020-06-23 16:52 ` [lttng-dev] " Christophe Bédard via lttng-dev
2020-06-24 1:10 ` Liu, Changcheng via lttng-dev
2020-06-24 1:10 ` [lttng-dev] " Liu, Changcheng via lttng-dev
2020-06-24 1:41 ` Liu, Changcheng via lttng-dev [this message]
2020-06-24 1:41 ` Liu, Changcheng via lttng-dev
2020-06-26 14:19 ` Christophe Bédard via lttng-dev
2020-06-26 14:19 ` [lttng-dev] " Christophe Bédard via lttng-dev
2020-06-26 14:22 ` Liu, Changcheng via lttng-dev
2020-06-26 14:22 ` [lttng-dev] " Liu, Changcheng via lttng-dev
2020-06-27 2:38 ` Liu, Changcheng via lttng-dev
2020-06-27 2:38 ` [lttng-dev] " Liu, Changcheng via lttng-dev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200624014141.GA4166707@jerryopenix \
--to=lttng-dev@lists.lttng.org \
--cc=bedard.christophe@gmail.com \
--cc=changcheng.liu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).