Re: [PATCH v6 13/18] perf: add support for taken branch samplingto perf report

From: Arnaldo Carvalho de Melo
Date: Thu Feb 23 2012 - 13:12:01 EST


Em Thu, Feb 23, 2012 at 05:53:53PM +0100, Stephane Eranian escreveu:
> Ok, so I looked at that today. Adding the feature bit is trivial.
> But what's not easy is to get to the feature bit in perf report
> by the time we need it. Very quickly after parsing the options,
> we setup a bunch of things such as browser mode, sorting
> order based on the -b option. But to get to the feature bit, we
> would need to wait until after the session is created in
> __cmd_report() which is way later.
>
> So we either hoist perf_session__new() very early, i.e., as soon
> as we have the filename or we write yet another parse_header()
> function just to get to the feature bits. I would rather choose the
> first option. But none is really pretty...
>
> Arnaldo, any better idea?

Humm, lemme see...


By the time we need it is when we do setup_sorting, right? Perhaps we
can delay that till after we do perf_session__new and thus have read the
headers...

/me looks at the code.

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