[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABPqkBR9hewjNUJf9ByD-jHc42e_qwQiKoP68RyL7BU8Q7BGgQ@mail.gmail.com>
Date: Thu, 24 May 2012 12:06:57 +0200
From: Stephane Eranian <eranian@...gle.com>
To: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Jiri Olsa <jolsa@...hat.com>, acme@...hat.com, mingo@...e.hu,
paulus@...ba.org, cjashfor@...ux.vnet.ibm.com, fweisbec@...il.com,
gorcunov@...nvz.org, tzanussi@...il.com, mhiramat@...hat.com,
robert.richter@....com, fche@...hat.com,
linux-kernel@...r.kernel.org, masami.hiramatsu.pt@...achi.com,
drepper@...il.com, asharma@...com, benjamin.redelings@...cent.org
Subject: Re: [PATCH 02/16] perf: Add ability to attach registers dump to sample
On Thu, May 24, 2012 at 11:50 AM, Peter Zijlstra <a.p.zijlstra@...llo.nl> wrote:
> On Wed, 2012-05-23 at 21:32 +0200, Jiri Olsa wrote:
>> /*
>> + * Values for sample_regs when PERF_SAMPLE_REGS is set.
>> + * Defines register set to be attached to the sample.
>> + */
>> +enum perf_sample_regs {
>> + PERF_SAMPLE_REGS_USER = 1U << 0, /* user registers */
>> + PERF_SAMPLE_REGS_MAX = 1U << 1, /* non-ABI */
>> +};
>
>
>
>> + __u64 sample_regs; /* enum perf_sample_regs */
>> +
>> + /*
>> + * Arch specific mask for PERF_SAMPLE_REGS_USER setup.
>> + * Defines set of user regs to dump on samples.
>> + * See asm/perf_regs.h for details.
>> + */
>> + __u64 sample_regs_user;
>
> This all just smells.. :/
>
> So you're wasting 64 bits to specify PERF_SAMPLE_REGS_USER while also
> implying we'll need another u64 for every other value of
> perf_sample_regs?
>
> What are we doing here and why?
>
I think this is related to a discusion we had earlier about which
machine state you want
to sample.
There are 3 possible machine states:
1- user level (even when sample is in kernel AND assuming you did
not hit a kernel only thread)
2- interrupted state (@ PMU interrupt)
3- precise state (state captured by PEBS on Intel, for instance)
Jiri is only interested in 1/. I am interested in the other two as well.
Question: is there a situation where we could need more than one machine
state per sample?
If not, then a single bitmask is enough.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists