From: Namhyung Kim <namhyung@kernel.org>
To: "平松雅巳 / HIRAMATU,MASAMI" <masami.hiramatsu.pt@hitachi.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Jiri Olsa <jolsa@redhat.com>, LKML <linux-kernel@vger.kernel.org>,
David Ahern <dsahern@gmail.com>,
Frederic Weisbecker <fweisbec@gmail.com>
Subject: Re: [PATCH v3] perf tools: Introduce perf_thread for backtrace
Date: Fri, 4 Dec 2015 22:15:16 +0900 [thread overview]
Message-ID: <20151204131516.GE22102@danjae.kornet> (raw)
In-Reply-To: <50399556C9727B4D88A595C8584AAB375264001D@GSjpTKYDCembx32.service.hitachi.net>
Hi Masami,
On Thu, Dec 03, 2015 at 07:13:15AM +0000, 平松雅巳 / HIRAMATU,MASAMI wrote:
> From: Namhyung Kim [mailto:namhyung@kernel.org]
> >
> >On Thu, Dec 03, 2015 at 12:15:12AM +0000, 平松雅巳 / HIRAMATU,MASAMI wrote:
> >> >From: Namhyung Kim [mailto:namhyung@gmail.com] On Behalf Of Namhyung Kim
> >> >
> >> >Backtrace is a crucial info for debugging. And upcoming refcnt
> >> >tracking facility also wants to use it.
> >>
> >> Note that the refcnt backtrace symbol resolution will work at
> >> exit. This means that it can not depend on the feature in perf
> >> tools itself. (and of course, since the refcnt tries to find unused
> >> objects in perf tools at exit, if we use perf_thread, it will
> >> detect the objects related to the perf_thread are leaked)
> >
> >Hmm.. right.
> >
> >I think we can leave the perf_thread outside of refcnt infrastructure.
> >IOW it should be created before refcnt debugging is activated and
> >released after refcnt is done. What do you think?
>
> Would you mean we don't debug the objects related to a perf_thread?
> It will mean that you don't debug anything, since perf_thread involves
> most of refcnt using objects, like dso, map, map_groups etc. And some
> bugs are actually found at where those objects are handled.
>
> I would not like to care about the output quality of the backtrace_symbols.
> I only need the top 2-3 addresses of the backtrace buffer, because I have
> (eu-)addr2line command to find the actual source code lines from those
> addresses :). If you need, I can also provide an address decoder awk/shell
> script for that.
>
> Instead, I prefer to avoid complexity on the "debugging feature"(because
> it can introduce new bugs,) and make it more robust (e.g. if we failed to
> get symbol, just shows the raw address)
>
> BTW, the robustness is a key point for debugging. Please consider the case
> that you hit an error on the objects in the perf_thread, it could cause
> double fault(segv again) on the same object. That is what I actually don't
> want.
I understand your point. If you object, I won't insist it strongly.
It's possible there's a bug in perf_thread symbol resolution. But
it's pretty straightforward and simple use case so if there's a bug in
that code, it should be found beforehand IMHO.
Thanks,
Namhyung
next prev parent reply other threads:[~2015-12-04 13:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-02 5:42 [PATCH v2] " Namhyung Kim
2015-12-02 8:16 ` Jiri Olsa
2015-12-02 15:33 ` [PATCH v3] " Namhyung Kim
2015-12-02 16:27 ` Jiri Olsa
2015-12-03 0:15 ` 平松雅巳 / HIRAMATU,MASAMI
2015-12-03 1:15 ` Namhyung Kim
2015-12-03 7:13 ` 平松雅巳 / HIRAMATU,MASAMI
2015-12-04 13:15 ` Namhyung Kim [this message]
2015-12-06 3:36 ` 平松雅巳 / HIRAMATU,MASAMI
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=20151204131516.GE22102@danjae.kornet \
--to=namhyung@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=dsahern@gmail.com \
--cc=fweisbec@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@kernel.org \
/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
all inboxes | Powered by JetHome®