diff options
author | Jiri Olsa <jolsa@kernel.org> | 2016-10-10 03:03:07 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-10-24 10:07:33 -0400 |
commit | f45f56151ac64aef687546d99b33df294faaa19c (patch) | |
tree | 5ec756b693f68b4482a2b4ce2f72c972ad9da113 /tools/perf/util/header.c | |
parent | 02bc11de567273da8ab25c54336ddbb71986f38f (diff) |
perf report: Move captured info to generic header info
It's not displayed in TUI now, putting it into generic part.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-5fk88kejqgi50ye7xdkhiloz@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/header.c')
-rw-r--r-- | tools/perf/util/header.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index 2f3eded54b0c..05f562760958 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c | |||
@@ -2250,9 +2250,18 @@ int perf_header__fprintf_info(struct perf_session *session, FILE *fp, bool full) | |||
2250 | struct header_print_data hd; | 2250 | struct header_print_data hd; |
2251 | struct perf_header *header = &session->header; | 2251 | struct perf_header *header = &session->header; |
2252 | int fd = perf_data_file__fd(session->file); | 2252 | int fd = perf_data_file__fd(session->file); |
2253 | struct stat st; | ||
2254 | int ret; | ||
2255 | |||
2253 | hd.fp = fp; | 2256 | hd.fp = fp; |
2254 | hd.full = full; | 2257 | hd.full = full; |
2255 | 2258 | ||
2259 | ret = fstat(fd, &st); | ||
2260 | if (ret == -1) | ||
2261 | return -1; | ||
2262 | |||
2263 | fprintf(fp, "# captured on: %s", ctime(&st.st_ctime)); | ||
2264 | |||
2256 | perf_header__process_sections(header, fd, &hd, | 2265 | perf_header__process_sections(header, fd, &hd, |
2257 | perf_file_section__fprintf_info); | 2266 | perf_file_section__fprintf_info); |
2258 | return 0; | 2267 | return 0; |