diff options
author | Ingo Molnar <mingo@elte.hu> | 2011-10-10 07:10:05 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-10-10 07:10:05 +0200 |
commit | 7588badafcd762034aa962ec86b82cacd4f42f74 (patch) | |
tree | 3fbfeb46f771e73e4269d655c24212b488916f6a /tools/perf/util/session.c | |
parent | d48b0e173715f678698d3678fefd40f2893ce798 (diff) | |
parent | 64c6f0c7f8db449e05ee16e35a7083df69addd1d (diff) | |
download | linux-stable-7588badafcd762034aa962ec86b82cacd4f42f74.tar.gz linux-stable-7588badafcd762034aa962ec86b82cacd4f42f74.tar.bz2 linux-stable-7588badafcd762034aa962ec86b82cacd4f42f74.zip |
Merge branch 'perf/core' of git://github.com/acmel/linux into perf/core
Diffstat (limited to 'tools/perf/util/session.c')
-rw-r--r-- | tools/perf/util/session.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 72458d9da5b1..20e011c99a94 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -1326,3 +1326,22 @@ int perf_session__cpu_bitmap(struct perf_session *session, return 0; } + +void perf_session__fprintf_info(struct perf_session *session, FILE *fp, + bool full) +{ + struct stat st; + int ret; + + if (session == NULL || fp == NULL) + return; + + ret = fstat(session->fd, &st); + if (ret == -1) + return; + + fprintf(fp, "# ========\n"); + fprintf(fp, "# captured on: %s", ctime(&st.st_ctime)); + perf_header__fprintf_info(session, fp, full); + fprintf(fp, "# ========\n#\n"); +} |