* [PATCH] perf record: Fix s390 random record__auxtrace_init return value
@ 2018-04-23 14:29 Thomas Richter
2018-04-26 5:55 ` [tip:perf/urgent] perf record: Fix s390 undefined record__auxtrace_init() " tip-bot for Thomas Richter
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Richter @ 2018-04-23 14:29 UTC (permalink / raw)
To: linux-kernel, linux-perf-users, acme
Cc: brueckner, schwidefsky, heiko.carstens, Thomas Richter
Command perf record calls
cmd_report
+---> record__auxtrace_init
+---> auxtrace_record__init()
On s390 function auxtrace_record__init() returns random return
value due to missing initialization.
This sometime causes perf record to exit immediately without
error message and creating a perf.data file.
Fix this by setting error return code to zero before return
from platform specific function which does not set the
error code in call cases.
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
---
tools/perf/arch/s390/util/auxtrace.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/perf/arch/s390/util/auxtrace.c b/tools/perf/arch/s390/util/auxtrace.c
index 6cb48e4cffd9..3afe8256eff2 100644
--- a/tools/perf/arch/s390/util/auxtrace.c
+++ b/tools/perf/arch/s390/util/auxtrace.c
@@ -87,6 +87,7 @@ struct auxtrace_record *auxtrace_record__init(struct perf_evlist *evlist,
struct perf_evsel *pos;
int diagnose = 0;
+ *err = 0;
if (evlist->nr_entries == 0)
return NULL;
--
2.14.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* [tip:perf/urgent] perf record: Fix s390 undefined record__auxtrace_init() return value
2018-04-23 14:29 [PATCH] perf record: Fix s390 random record__auxtrace_init return value Thomas Richter
@ 2018-04-26 5:55 ` tip-bot for Thomas Richter
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Thomas Richter @ 2018-04-26 5:55 UTC (permalink / raw)
To: linux-tip-commits
Cc: brueckner, tmricht, linux-kernel, schwidefsky, tglx,
heiko.carstens, mingo, hpa, acme
Commit-ID: 5d9946c3e5e38e07ab7019db9413a96807a325f2
Gitweb: https://git.kernel.org/tip/5d9946c3e5e38e07ab7019db9413a96807a325f2
Author: Thomas Richter <tmricht@linux.ibm.com>
AuthorDate: Mon, 23 Apr 2018 16:29:40 +0200
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 23 Apr 2018 12:05:02 -0300
perf record: Fix s390 undefined record__auxtrace_init() return value
Command 'perf record' calls:
cmd_report()
record__auxtrace_init()
auxtrace_record__init()
On s390 function auxtrace_record__init() returns random return value due
to missing initialization.
This sometime causes 'perf record' to exit immediately without error
message and creating a perf.data file.
Fix this by setting error the return code to zero before returning from
platform specific functions which may not set the error code in call
cases.
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Link: http://lkml.kernel.org/r/20180423142940.21143-1-tmricht@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/arch/s390/util/auxtrace.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/perf/arch/s390/util/auxtrace.c b/tools/perf/arch/s390/util/auxtrace.c
index 6cb48e4cffd9..3afe8256eff2 100644
--- a/tools/perf/arch/s390/util/auxtrace.c
+++ b/tools/perf/arch/s390/util/auxtrace.c
@@ -87,6 +87,7 @@ struct auxtrace_record *auxtrace_record__init(struct perf_evlist *evlist,
struct perf_evsel *pos;
int diagnose = 0;
+ *err = 0;
if (evlist->nr_entries == 0)
return NULL;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-04-26 5:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-23 14:29 [PATCH] perf record: Fix s390 random record__auxtrace_init return value Thomas Richter
2018-04-26 5:55 ` [tip:perf/urgent] perf record: Fix s390 undefined record__auxtrace_init() " tip-bot for Thomas Richter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome