public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: acme@redhat.com, a.p.zijlstra@chello.nl, mingo@elte.hu,
	paulus@samba.org, cjashfor@linux.vnet.ibm.com,
	eranian@google.com, gorcunov@openvz.org, tzanussi@gmail.com,
	mhiramat@redhat.com, rostedt@goodmis.org, robert.richter@amd.com,
	fche@redhat.com, linux-kernel@vger.kernel.org,
	masami.hiramatsu.pt@hitachi.com, drepper@gmail.com
Subject: Re: [RFCv2 00/15] perf: Add backtrace post dwarf unwind
Date: Wed, 18 Apr 2012 08:51:37 +0200	[thread overview]
Message-ID: <20120418065134.GA25568@somewhere> (raw)
In-Reply-To: <1334661441-4420-1-git-send-email-jolsa@redhat.com>

On Tue, Apr 17, 2012 at 01:17:05PM +0200, Jiri Olsa wrote:
> hi,
> sending another RFC version. There are some fixies and some
> yet unresolved issues outlined below.
> 
> thanks for comments,
> jirka
> 
> v2 changes:
> 	02/16 - fixed register enums
> 	12/16 - fixed the perf_evlist__* names
> 	14/16 - 'fp' stays default even if compiled with dwarf unwind
> 	15/16 - added cache to the DSO data interface, it makes the
>                 dwarf unwind real fast now
> 
> v2 not solved yet:
>   1) generic user regs capturing
>      discussed in here:
>        http://marc.info/?l=linux-kernel&m=133304076114629&w=2
> 
>      Looks like we could have a generic way of getting registers
>      on samples and support more than only user level registers.
>      But looks like it wasn't completely decided what register
>      levels are worth to store..

Right but I think this is outside the scope of this patchset.
Especially without a proper usecase in tools, we can only do
mistakes by implementing early support for other kind of regs dump in
samples.

> 
>      It looks to me that each level could add its own registers
>      mask and it'd be used/saved if the mask is non zero.
>      The same way the user level regs are dealt with now ;).
> 
>      Or we could add something that Stephane came up with:
>        attr->sample_type |= PERF_SAMPLE_REGS
>        attr->sample_regs = EAX | EBX | EDI | ESI |.....
>        attr->sample_reg_mode = { INTR, PRECISE, USER }

If we do this we won't be able to record user regs and, say, precise regs
at the same time. These should be different sample types that can be set
at the same time: PERF_SAMPLE_UREGS | PERF_SAMPLE_PRECISE_REGS | ...

And then have attr->sample_uregs, attr->sample_pregs, ...

This is scary because I fear we'll need to increase the size of attr
and the ABI is then going to become incompatible. We'll probably need a way
to extend properly.

Anyway, no need to implement support for regs samples (other than user) in
this patchset. But we indeed need to make plans such that the ABI is ready to
host that later.

> 
>      But I guess we need to decide what levels make sense
>      to store first. Also if there's like 2 or 3 only, it might be
>      better to use separate masks as pointed out above.
> 
>   2) compat task handling
>      we dont handle compat tasks unwinding currently, we probably want
>      to make it part of the 1) solution or add something like:
> 	__u64 user_regs_compat;

Yep. One question I have for those who know well architectures support
in general is: do we have some archs that support more than just one
kind of compat/emulated mode?

If so I think we can't rely on that native/compat dichotomy but rather
we need to treat all these modes as different architectures.

In this case, attr->sample_regs would only make sense with some arch ID.

Anybody, more clues on this?

> 
>      Handling the compat task would also need some other changes in the
>      unwind code and I'm not completely sure how libunwind deals with that,
>      need to check.

Indeed.

> 
>      How much do we want this? ;)

I think we do. But there is no emergency. We can do it incrementally once
we have native support. But then again I think we need to ensure we got the
things right to make the ABI able to host that in the future.

> 
>   3) registers version names
>      this one is now probably connected to 1) and 2) ;)
>      I kept the register version, since I think it might be usefull
>      for dealing with compat tasks - to recognize what type of registers
>      were stored

Right. Hm, I need to look at this deeper.

Thanks!

      parent reply	other threads:[~2012-04-18  6:51 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-17 11:17 [RFCv2 00/15] perf: Add backtrace post dwarf unwind Jiri Olsa
2012-04-17 11:17 ` [PATCH 01/16] uaccess: Add new copy_from_user_gup API Jiri Olsa
2012-04-17 11:17 ` [PATCH 02/16] perf: Unified API to record selective sets of arch registers Jiri Olsa
2012-04-23 10:10   ` Stephane Eranian
2012-04-23 10:33     ` Jiri Olsa
2012-04-26 15:28       ` Jiri Olsa
2012-05-02 12:00         ` Stephane Eranian
2012-05-02 12:26           ` Jiri Olsa
2012-05-02 12:36             ` Stephane Eranian
2012-05-02 12:58               ` Jiri Olsa
2012-05-02 14:46                 ` Stephane Eranian
2012-05-03 10:25                   ` Jiri Olsa
2012-04-17 11:17 ` [PATCH 03/16] perf: Add ability to dump user regs Jiri Olsa
2012-04-23 10:15   ` Stephane Eranian
2012-04-17 11:17 ` [PATCH 04/16] perf: Add ability to dump part of the user stack Jiri Olsa
2012-04-17 11:17 ` [PATCH 05/16] perf: Add attribute to filter out user callchains Jiri Olsa
2012-04-17 11:17 ` [PATCH 06/16] perf, tool: Factor DSO symtab types to generic binary types Jiri Olsa
2012-04-17 11:17 ` [PATCH 07/16] perf, tool: Add interface to read DSO image data Jiri Olsa
2012-04-17 11:17 ` [PATCH 08/16] perf, tool: Add '.note' check into search for NOTE section Jiri Olsa
2012-04-17 11:17 ` [PATCH 09/16] perf, tool: Back [vdso] DSO with real data Jiri Olsa
2012-04-17 11:17 ` [PATCH 10/16] perf, tool: Add interface to arch registers sets Jiri Olsa
2012-04-17 11:17 ` [PATCH 11/16] perf, tool: Add libunwind dependency for dwarf cfi unwinding Jiri Olsa
2012-04-17 11:17 ` [PATCH 12/16] perf, tool: Support user regs and stack in sample parsing Jiri Olsa
2012-04-17 11:17 ` [PATCH 13/16] perf, tool: Support for dwarf cfi unwinding on post processing Jiri Olsa
2012-04-17 11:17 ` [PATCH 14/16] perf, tool: Support for dwarf mode callchain on perf record Jiri Olsa
2012-04-17 11:17 ` [PATCH 15/16] perf, tool: Add dso data caching Jiri Olsa
2012-04-17 11:17 ` [PATCH 16/16] perf, tool: Add dso data caching tests Jiri Olsa
2012-04-18  6:51 ` Frederic Weisbecker [this message]

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=20120418065134.GA25568@somewhere \
    --to=fweisbec@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=cjashfor@linux.vnet.ibm.com \
    --cc=drepper@gmail.com \
    --cc=eranian@google.com \
    --cc=fche@redhat.com \
    --cc=gorcunov@openvz.org \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mhiramat@redhat.com \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=robert.richter@amd.com \
    --cc=rostedt@goodmis.org \
    --cc=tzanussi@gmail.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