perf symbols: Fix directory descriptor leaking
authorGui Jianfeng <guijianfeng@cn.fujitsu.com>
Thu, 24 Jun 2010 07:04:02 +0000 (15:04 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 16 Jul 2010 17:16:47 +0000 (14:16 -0300)
commit74534341c1214ac5993904680616afe698dde3b6
tree6126c003df7ab245b5a90f677b5206930e074cf7
parent58c3439083f8fde61de842c93d1407f0f881cd92
perf symbols: Fix directory descriptor leaking

When I ran "perf kvm ... top", I encountered the following error output.

  Error: perfcounter syscall returned with -1 (Too many open files)

  Fatal: No CONFIG_PERF_EVENTS=y kernel support configured?

Looking into perf, I found perf opens too many directories at
initialization time, but forgets to close them. Here is the fix.

LKML-Reference: <4C230362.5080704@cn.fujitsu.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/symbol.c