From dtmoore:
Currently PerfParser::ParseRawEvents provides "two" operations. 1) it uses ProcessEvents to process all of the parsed perf events. 2) it sorts the "raw" perf events stored in the reader.
The sorting code should be pulled out of ParseRawEvents, either into quipper::PerfReader or as a separate call in PerfParser. The former is preferred since the sorting has nothing to do with the parsing phase and the operation does destructive changes to the reader object.
This would allow callers which don't care about using quipper's parser, but which do want a sorted PerfDataProto, to get just what they need. (eg code which converts perf to profile proto).
Comment 1 by bugdroid1@chromium.org
, Dec 15 2016