Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f45f5615 authored by Jiri Olsa's avatar Jiri Olsa Committed by Arnaldo Carvalho de Melo
Browse files

perf report: Move captured info to generic header info



It's not displayed in TUI now, putting it into generic part.

Signed-off-by: default avatarJiri 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 02bc11de
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2250,9 +2250,18 @@ int perf_header__fprintf_info(struct perf_session *session, FILE *fp, bool full)
	struct header_print_data hd;
	struct perf_header *header = &session->header;
	int fd = perf_data_file__fd(session->file);
	struct stat st;
	int ret;

	hd.fp = fp;
	hd.full = full;

	ret = fstat(fd, &st);
	if (ret == -1)
		return -1;

	fprintf(fp, "# captured on: %s", ctime(&st.st_ctime));

	perf_header__process_sections(header, fd, &hd,
				      perf_file_section__fprintf_info);
	return 0;
+0 −10
Original line number Diff line number Diff line
@@ -2025,20 +2025,10 @@ int perf_session__cpu_bitmap(struct perf_session *session,
void perf_session__fprintf_info(struct perf_session *session, FILE *fp,
				bool full)
{
	struct stat st;
	int fd, ret;

	if (session == NULL || fp == NULL)
		return;

	fd = perf_data_file__fd(session->file);

	ret = fstat(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");
}