Copy the value to start and end to struct perf_session. Cc: David Ahern <dsah...@gmail.com> Cc: Peter Zijlstra <a.p.zijls...@chello.nl> Cc: Paul Mackerras <pau...@samba.org> Cc: Ingo Molnar <mi...@redhat.com> Cc: Arnaldo Carvalho de Melo <a...@ghostprotocols.net> Cc: Arjan van de Ven <ar...@linux.intel.com> Cc: Namhyung Kim <namhy...@gmail.com> Cc: Yanmin Zhang <yanmin.zh...@intel.com> Cc: Wu Fengguang <fengguang...@intel.com> Cc: Mike Galbraith <efa...@gmx.de> Cc: Andrew Morton <a...@linux-foundation.org> Signed-off-by: Chenggang Qin <chenggang....@taobao.com>
--- tools/perf/builtin-report.c | 5 +++++ tools/perf/util/session.c | 3 +++ tools/perf/util/session.h | 2 ++ 3 files changed, 10 insertions(+), 0 deletions(-) diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index e9e9d0a..d3c1c8a 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -889,6 +889,11 @@ repeat: if (session == NULL) return -ENOMEM; + if (tstart) + session->tstart = tstart * 1e6; + if (tend) + session->tend = tend * 1e6; + report.session = session; has_br_stack = perf_header__has_feat(&session->header, diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 568b750..193bb6a 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -134,6 +134,9 @@ struct perf_session *perf_session__new(const char *filename, int mode, INIT_LIST_HEAD(&self->ordered_samples.to_free); machines__init(&self->machines); + self->tstart = 0; + self->tend = ULLONG_MAX; + if (mode == O_RDONLY) { if (perf_session__open(self, force) < 0) goto out_delete; diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h index 04bf737..c9a6c27 100644 --- a/tools/perf/util/session.h +++ b/tools/perf/util/session.h @@ -37,6 +37,8 @@ struct perf_session { int fd; bool fd_pipe; bool repipe; + u64 tstart; + u64 tend; struct ordered_samples ordered_samples; char filename[1]; }; -- 1.7.8.rc2.5.g815b -- 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/