All of lore.kernel.org
 help / color / mirror / Atom feed
* ftrace/perf_event leak
@ 2010-09-01  8:42 Avi Kivity
  2010-09-01  9:04 ` Peter Zijlstra
  0 siblings, 1 reply; 14+ messages in thread
From: Avi Kivity @ 2010-09-01  8:42 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Frederic Weisbecker, Steven Rostedt
  Cc: kvm-devel, Linux Kernel Mailing List

  I recently added perf_event support to kvm_stat, to display kvm 
tracepoints as statistics (I'd like to fold this to tools/perf 
eventually, but that's another story).  However I'm seeing a resource 
leak - after I quit the tool, there are quite a few references into the 
kvm module:

   kvm_intel              43655  0
   kvm                   272984  269 kvm_intel

The tool is just a python script that reads 
/sys/kernel/debug/tracing/events/kvm to find out which events are 
available, uses perf_event_open() to create one group per cpu to which a 
lot of events are attached.  The only special thing I can think of is 
that we use an ioctl to attach a filter to many perf_event descriptors.

You can find the source at 
http://git.kernel.org/?p=virt/kvm/qemu-kvm.git;a=blob_plain;f=kvm/kvm_stat;hb=5bd5f131b50cb373ff4e2a3632c6dad00a1f0b55.  
All it needs are the kvm modules loaded; no need to actually run a 
guest.  Run as root.

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


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

end of thread, other threads:[~2010-09-09 19:45 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-01  8:42 ftrace/perf_event leak Avi Kivity
2010-09-01  9:04 ` Peter Zijlstra
2010-09-01  9:26   ` Avi Kivity
2010-09-01  9:35     ` Peter Zijlstra
2010-09-01  9:38     ` Li Zefan
2010-09-01  9:41       ` Peter Zijlstra
2010-09-01 10:38       ` Avi Kivity
2010-09-01 11:02         ` Peter Zijlstra
2010-09-01 11:07           ` Ingo Molnar
2010-09-01 12:15           ` Frederic Weisbecker
2010-09-01 13:59             ` Steven Rostedt
2010-09-01 17:32               ` Ingo Molnar
2010-09-02  1:20             ` Li Zefan
2010-09-09 19:45       ` [tip:perf/core] perf, trace: Fix module leak tip-bot for Li Zefan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.