perf, tools: Optimize skipping after end of time range

When using --time options to only show data for a time range
for a large perf.data file, perf may burn a lot of CPU time skipping
data.

Optimize one particular easy case. When the trace
is already after the last time stamp in the range
stop processing perf.data and exit early.

Note this has a minor behavior change for perf script.
The --show-* options ignore timer filtering, and with the
early exit their output will be truncated too. I think
that's acceptable, and eventually we should fix those
to filter on time too.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
8 files changed