On Tue, May 14, 2013 at 07:13:53PM +0900, Namhyung Kim wrote:
> From: Namhyung Kim <namhyung....@lge.com>
> 
> The ftrace record command is for saving raw ftrace buffer contents
> which can be get from per_cpu/cpuX/trace_pipe_raw.
> 
> Since ftrace events are generated very frequently so single thread for
> recording mostly resulted in buffer overruns.  Thus it uses per-cpu
> recorder thread to prevent such cases and they save the contents to
> their own files.
> 
> These per-cpu data files are saved in a directory so that they can be
> easily found when needed.  I chose the default directory name as
> "perf.data.dir" and the first two (i.e. "perf.data") can be changed
> with -o option.  The structure of the directory looks like:
> 
>   $ tree perf.data.dir
>   perf.data.dir/
>   |-- perf.header
>   |-- trace-cpu0.buf
>   |-- trace-cpu1.buf
>   |-- trace-cpu2.buf
>   `-- trace-cpu3.buf
> 
> In addition to trace-cpuX.buf files, it has perf.header file also.
> The perf.header file is compatible with existing perf.data format and
> contains usual event information, feature mask and sample data.  The
> sample data is synthesized to indicate given cpu has a record file.

so AFAICS we store sample event for each cpu we recorded (in record
command) and by processing those samples (show/report) we get data
files names for each cpu

hum, I might have missed some discussion about this, but seems
like header feature fits better for this, as long as we store
only cpus.. FTRACE_CPUS or something like thius with simple array

or if we are going to use event, maybe user event via
enum perf_user_event_type fits better

jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to