Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jiri Olsa and committed by
Arnaldo Carvalho de Melo
f45f5615 02bc11de

+9 -10
+9
tools/perf/util/header.c
··· 2250 2250 struct header_print_data hd; 2251 2251 struct perf_header *header = &session->header; 2252 2252 int fd = perf_data_file__fd(session->file); 2253 + struct stat st; 2254 + int ret; 2255 + 2253 2256 hd.fp = fp; 2254 2257 hd.full = full; 2258 + 2259 + ret = fstat(fd, &st); 2260 + if (ret == -1) 2261 + return -1; 2262 + 2263 + fprintf(fp, "# captured on: %s", ctime(&st.st_ctime)); 2255 2264 2256 2265 perf_header__process_sections(header, fd, &hd, 2257 2266 perf_file_section__fprintf_info);
-10
tools/perf/util/session.c
··· 2025 2025 void perf_session__fprintf_info(struct perf_session *session, FILE *fp, 2026 2026 bool full) 2027 2027 { 2028 - struct stat st; 2029 - int fd, ret; 2030 - 2031 2028 if (session == NULL || fp == NULL) 2032 2029 return; 2033 2030 2034 - fd = perf_data_file__fd(session->file); 2035 - 2036 - ret = fstat(fd, &st); 2037 - if (ret == -1) 2038 - return; 2039 - 2040 2031 fprintf(fp, "# ========\n"); 2041 - fprintf(fp, "# captured on: %s", ctime(&st.st_ctime)); 2042 2032 perf_header__fprintf_info(session, fp, full); 2043 2033 fprintf(fp, "# ========\n#\n"); 2044 2034 }