Messages in this thread | | | Date | Thu, 23 Feb 2012 16:11:32 -0200 | From | Arnaldo Carvalho de Melo <> | Subject | Re: [PATCH v6 13/18] perf: add support for taken branch sampling to perf report |
| |
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
| |