Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 349894
b: refs/heads/master
c: f0bf910
h: refs/heads/master
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo committed Dec 9, 2012
1 parent d624a59 commit 2264eb7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 044c4f8fbab513af399ff8ce7a2af2d303d85849
refs/heads/master: f0bf9107679f3670e5fbd52a934b7816256007f7
14 changes: 6 additions & 8 deletions trunk/tools/perf/builtin-buildid-list.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,16 @@ static int perf_session__list_build_ids(bool force, bool with_hits)
struct perf_session *session;

symbol__elf_init();

session = perf_session__new(input_name, O_RDONLY, force, false,
&build_id__mark_dso_hit_ops);
if (session == NULL)
return -1;

/*
* See if this is an ELF file first:
*/
if (filename__fprintf_build_id(session->filename, stdout))
if (filename__fprintf_build_id(input_name, stdout))
goto out;

session = perf_session__new(input_name, O_RDONLY, force, false,
&build_id__mark_dso_hit_ops);
if (session == NULL)
return -1;
/*
* in pipe-mode, the only way to get the buildids is to parse
* the record stream. Buildids are stored as RECORD_HEADER_BUILD_ID
Expand All @@ -69,8 +67,8 @@ static int perf_session__list_build_ids(bool force, bool with_hits)
perf_session__process_events(session, &build_id__mark_dso_hit_ops);

perf_session__fprintf_dsos_buildid(session, stdout, with_hits);
out:
perf_session__delete(session);
out:
return 0;
}

Expand Down

0 comments on commit 2264eb7

Please sign in to comment.