[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87r499rt32.fsf@ashishki-desk.ger.corp.intel.com>
Date: Thu, 19 Dec 2013 13:14:09 +0200
From: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
David Ahern <dsahern@...il.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Jiri Olsa <jolsa@...hat.com>, Mike Galbraith <efault@....de>,
Namhyung Kim <namhyung@...il.com>,
Paul Mackerras <paulus@...ba.org>,
Stephane Eranian <eranian@...gle.com>,
Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH v0 04/71] itrace: Infrastructure for instruction flow tracing units
Peter Zijlstra <peterz@...radead.org> writes:
> On Thu, Dec 19, 2013 at 09:53:44AM +0200, Alexander Shishkin wrote:
>> Peter Zijlstra <peterz@...radead.org> writes:
>> > The thing is; why can't you zero-copy whatever buffer the hardware
>> > writes into, into the normal buffer?
>>
>> I'm not sure I understand. You mean, have the buffer split between perf
>> data and trace data?
>
> Yep, I don't see any reason why this wouldn't work.
>
> When the hardware thing sends an interrupt to notify us its buffer is
> 'full', stop the recorder, try to create a single record in the buffer
> that's big enough + 1 page, then swizzle the hardware pages and the
> buffer pages for that record, using the +1 page to page align the actual
> data. Then (re)start the hardware on the 'new' pages.
We configure the hardware thing to send an interrupt *before* the buffer
is full, keep the recorder running while userspace saves stuff to
perf.data file. Recording only stops if perf fails to read the trace
data out fast enough and the buffer fills up. So you'd have a complete
trace.
Also, we have what we call a "snapshot" mode, where we keep the hardware
thing running, writing data to a circular buffer till it's stopped, in
case we're only interested in the most recent trace data to see what it
is that takes too long to respond, etc. And while it is running, we're
getting new records in the perf stream all the time (mmaps, etc).
Put simple: perf data and trace data are two different separate types of
information that originate from two different sources, can exist and
make sense separately from one another and should not be mixed.
Regards,
--
Alex
--
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