Skip to content

Commit e865e7d

Browse files
author
Fox Snowpatch
committed
1 parent 182544a commit e865e7d

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

tools/perf/arch/powerpc/util/auxtrace.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,19 @@ struct auxtrace_record *auxtrace_record__init(struct evlist *evlist,
7070
struct evsel *pos;
7171
int found = 0;
7272

73+
/*
74+
* Assign err value to zero here. Any fail later
75+
* will set appropriate return code to err.
76+
* Even if we haven't found any event for auxtrace, perf
77+
* record should continue for other events. NULL return
78+
* will indicate that there is no auxtrace record initialized.
79+
*
80+
* Not having "err" set here will affect monitoring
81+
* of other events also because perf record will fail seeing
82+
* random value in err.
83+
*/
84+
*err = 0;
85+
7386
evlist__for_each_entry(evlist, pos) {
7487
if (strstarts(pos->name, "vpa_dtl")) {
7588
found = 1;

0 commit comments

Comments
 (0)