Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1378861
| From | tip-bot for Wang Nan <tipbot@zytor.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [tip:perf/core] perf session: Make ordered_events reusable |
| Date | 2016-04-14 15:40 +0200 |
| Message-ID | <rnPF1-2kG-27@gated-at.bofh.it> (permalink) |
| References | <rnols-6Jw-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Commit-ID: b26dc73018d2e3a68cad0cf0bad902a8637f9bdf Gitweb: http://git.kernel.org/tip/b26dc73018d2e3a68cad0cf0bad902a8637f9bdf Author: Wang Nan <wangnan0@huawei.com> AuthorDate: Wed, 13 Apr 2016 08:21:04 +0000 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitDate: Thu, 14 Apr 2016 08:57:54 -0300 perf session: Make ordered_events reusable ordered_events__free() leaves linked lists and timestamps not cleared, so unable to be reused after ordered_events__free(). Which is inconvenient after 'perf record' supports generating multiple perf.data output and process build-ids for each of them. Use ordered_events__reinit() for this. Signed-off-by: Wang Nan <wangnan0@huawei.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Zefan Li <lizefan@huawei.com> Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1460535673-159866-2-git-send-email-wangnan0@huawei.com Signed-off-by: He Kuang <hekuang@huawei.com> [ Split from larger patch ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/util/session.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 91d4528..ca1827c 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -1836,7 +1836,11 @@ out: out_err: ui_progress__finish(); perf_session__warn_about_errors(session); - ordered_events__free(&session->ordered_events); + /* + * We may switching perf.data output, make ordered_events + * reusable. + */ + ordered_events__reinit(&session->ordered_events); auxtrace__free_events(session); session->one_mmap = false; return err;
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 01/10] perf tools: Make ordered_events reusable Wang Nan <wangnan0@huawei.com> - 2016-04-13 10:30 +0200 Re: [PATCH 01/10] perf tools: Make ordered_events reusable Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-04-13 17:30 +0200 [tip:perf/core] perf ordered_events: Introduce reinit() tip-bot for Wang Nan <tipbot@zytor.com> - 2016-04-14 15:40 +0200 [tip:perf/core] perf session: Make ordered_events reusable tip-bot for Wang Nan <tipbot@zytor.com> - 2016-04-14 15:40 +0200
csiph-web