* [perf bugreport] perf doesn't delete /tmp/perf-vdso.so.* file on exit
@ 2013-02-21 9:45 Markus Trippelsdorf
2013-02-21 10:27 ` [perf patch] " Markus Trippelsdorf
0 siblings, 1 reply; 5+ messages in thread
From: Markus Trippelsdorf @ 2013-02-21 9:45 UTC (permalink / raw)
To: linux-kernel; +Cc: Ingo Molnar, Arnaldo Carvalho de Melo
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.
--
Markus
^ permalink raw reply [flat|nested] 5+ messages in thread
* [perf patch] perf doesn't delete /tmp/perf-vdso.so.* file on exit
2013-02-21 9:45 [perf bugreport] perf doesn't delete /tmp/perf-vdso.so.* file on exit Markus Trippelsdorf
@ 2013-02-21 10:27 ` Markus Trippelsdorf
2013-02-21 18:19 ` Namhyung Kim
0 siblings, 1 reply; 5+ messages in thread
From: Markus Trippelsdorf @ 2013-02-21 10:27 UTC (permalink / raw)
To: linux-kernel; +Cc: Ingo Molnar, Arnaldo Carvalho de Melo
perf top doesn't unlink /tmp/perf-vdso.so.* on exit.
Fix this by calling vdso__exit() before exit(0).
Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index c9ff395..e910d91 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -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;
}
--
Markus
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [perf patch] perf doesn't delete /tmp/perf-vdso.so.* file on exit
2013-02-21 10:27 ` [perf patch] " Markus Trippelsdorf
@ 2013-02-21 18:19 ` Namhyung Kim
2013-02-27 13:03 ` Markus Trippelsdorf
0 siblings, 1 reply; 5+ messages in thread
From: Namhyung Kim @ 2013-02-21 18:19 UTC (permalink / raw)
To: linux-kernel
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).
> @@ -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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [perf patch] perf doesn't delete /tmp/perf-vdso.so.* file on exit
2013-02-21 18:19 ` Namhyung Kim
@ 2013-02-27 13:03 ` Markus Trippelsdorf
2013-02-27 21:12 ` Namhyung Kim
0 siblings, 1 reply; 5+ messages in thread
From: Markus Trippelsdorf @ 2013-02-27 13:03 UTC (permalink / raw)
To: Namhyung Kim; +Cc: linux-kernel
On 2013.02.21 at 18:19 +0000, Namhyung Kim wrote:
> 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).
>
> > @@ -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().
The issue is fixed by commit 11859e821761.
--
Markus
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [perf patch] perf doesn't delete /tmp/perf-vdso.so.* file on exit
2013-02-27 13:03 ` Markus Trippelsdorf
@ 2013-02-27 21:12 ` Namhyung Kim
0 siblings, 0 replies; 5+ messages in thread
From: Namhyung Kim @ 2013-02-27 21:12 UTC (permalink / raw)
To: Markus Trippelsdorf; +Cc: linux-kernel
2013-02-27 (수), 14:03 +0100, Markus Trippelsdorf:
> On 2013.02.21 at 18:19 +0000, Namhyung Kim wrote:
> > 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).
> >
> > > @@ -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().
>
> The issue is fixed by commit 11859e821761.
>
Ah, right. It's much better. :)
Thanks,
Namhyung
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-02-27 21:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-21 9:45 [perf bugreport] perf doesn't delete /tmp/perf-vdso.so.* file on exit Markus Trippelsdorf
2013-02-21 10:27 ` [perf patch] " Markus Trippelsdorf
2013-02-21 18:19 ` Namhyung Kim
2013-02-27 13:03 ` Markus Trippelsdorf
2013-02-27 21:12 ` Namhyung Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).