public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH core] perf data: Adding error message if perf_data__create_dir fails
@ 2022-02-18 15:23 Alexey Bayduraev
  2022-02-18 15:23 ` [PATCH urgent] perf data: Fix double free in perf_session__delete Alexey Bayduraev
  2022-02-20 22:43 ` [PATCH core] perf data: Adding error message if perf_data__create_dir fails Jiri Olsa
  0 siblings, 2 replies; 8+ messages in thread
From: Alexey Bayduraev @ 2022-02-18 15:23 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Jiri Olsa, Namhyung Kim, Alexander Shishkin, Peter Zijlstra,
	Ingo Molnar, linux-kernel, Andi Kleen, Adrian Hunter,
	Alexander Antonov, Alexei Budankov

There is no notification about data directory creation failure. Add it.

Signed-off-by: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
---
 tools/perf/builtin-record.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 0bc6529814b2..0306d5911de2 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -1186,8 +1186,10 @@ static int record__mmap_evlist(struct record *rec,
 
 	if (record__threads_enabled(rec)) {
 		ret = perf_data__create_dir(&rec->data, evlist->core.nr_mmaps);
-		if (ret)
+		if (ret) {
+			pr_err("Failed to create data directory: %s\n", strerror(errno));
 			return ret;
+		}
 		for (i = 0; i < evlist->core.nr_mmaps; i++) {
 			if (evlist->mmap)
 				evlist->mmap[i].file = &rec->data.dir.files[i];
-- 
2.19.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-02-21 19:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-18 15:23 [PATCH core] perf data: Adding error message if perf_data__create_dir fails Alexey Bayduraev
2022-02-18 15:23 ` [PATCH urgent] perf data: Fix double free in perf_session__delete Alexey Bayduraev
2022-02-20 22:46   ` Jiri Olsa
2022-02-20 22:43 ` [PATCH core] perf data: Adding error message if perf_data__create_dir fails Jiri Olsa
2022-02-21 13:24   ` Bayduraev, Alexey V
2022-02-21 18:24     ` Jiri Olsa
2022-02-21 18:45       ` Bayduraev, Alexey V
2022-02-21 19:16         ` Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox