Skip to contentSkip to conversation

perf doesn't delete /tmp/perf-vdso.so.* file on exit

perf bugreport In review Markus Trippelsdorf 2 participants 5 messages Feb 21, 2013 – Feb 27, 2013 perf events

lore
Share & tools
lore
#0 lore raw

Perf doesn't properly clean up /tmp/perf-vdso.so-XXXXXX on exit. So these files keep accumulating in /tmp every time perf is run.

Signature · 1 line
Markus
#1 lore raw

PATCH 1/1 perf doesn't delete /tmp/perf-vdso.so.* file on exit

perf top doesn't unlink /tmp/perf-vdso.so.* on exit. Fix this by calling vdso__exit() before exit(0).

tools/perf/builtin-top.c +2 -0
index c9ff395..e910d91 100644
@@ -20,6 +20,7 @@
 #include "builtin.h"
 
 #include "perf.h"
+#include "vdso.h"
 
 #include "util/annotate.h"
 #include "util/cache.h"
@@ -602,6 +603,7 @@ static void *display_thread_tui(void *arg)
 				      &top->session->header.env);
 
 	exit_browser(0);
+	vdso__exit();
 	exit(0);
 	return NULL;
 }
Signature · 1 line
Markus
maintainer
#2 lore raw

tools/perf/builtin-top.c static void *display_thread_tui(void *arg) · line 609

Quoted 12 lines · Markus Trippelsdorf <markus <at> trippelsdorf.de> writes:

perf top doesn't unlink /tmp/perf-vdso.so.* on exit. Fix this by calling vdso__exit() before exit(0).

tools/perf/builtin-top.c +1 -0
@@ -602,6 +603,7 @@ static void *display_thread_tui(void *arg)
 				      &top->session->header.env);
 
 	exit_browser(0);
+	vdso__exit();
 	exit(0);
 	return NULL;
 }

I don't think it's enough - it doesn't cover all exit paths. I'd suggest making it to use atexit/on_exit().

Thanks,
Namhyung

#3 lore raw
Quoted 8 lines · Namhyung Kim
Quoted 7 lines · Markus Trippelsdorf <markus <at> trippelsdorf.de> writes:

perf top doesn't unlink /tmp/perf-vdso.so.* on exit. Fix this by calling vdso__exit() before exit(0).

tools/perf/builtin-top.c +0 -0
@@ -602,6 +603,7 @@ static void *display_thread_tui(void *arg)
 				      &top->session->header.env);
 
Quoted 8 lines

tools/perf/builtin-top.c static void *display_thread_tui(void *arg) · line 609

Quoted 5 lines
tools/perf/builtin-top.c +1 -0
 	exit_browser(0);
+	vdso__exit();
 	exit(0);
 	return NULL;
 }

I don't think it's enough - it doesn't cover all exit paths. I'd suggest making it to use atexit/on_exit().

The issue is fixed by commit 11859e821761.

Signature · 1 line
Markus
maintainer
#4 lore raw

2013-02-27 (수), 14:03 +0100, Markus Trippelsdorf:

Quoted 18 lines · Namhyung Kim
Quoted 8 lines
Quoted 7 lines · Markus Trippelsdorf <markus <at> trippelsdorf.de> writes:

perf top doesn't unlink /tmp/perf-vdso.so.* on exit. Fix this by calling vdso__exit() before exit(0).

tools/perf/builtin-top.c +0 -0
@@ -602,6 +603,7 @@ static void *display_thread_tui(void *arg)
 				      &top->session->header.env);
 
Quoted 8 lines

tools/perf/builtin-top.c static void *display_thread_tui(void *arg) · line 609

Quoted 5 lines
tools/perf/builtin-top.c +1 -0
 	exit_browser(0);
+	vdso__exit();
 	exit(0);
 	return NULL;
 }

I don't think it's enough - it doesn't cover all exit paths. I'd suggest making it to use atexit/on_exit().

Quoted 2 lines

The issue is fixed by commit 11859e821761.

Ah, right. It's much better. :)

Thanks,
Namhyung