mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Ingo Molnar <mingo@kernel.org>, Paul Mackerras <paulus@samba.org>,
	Namhyung Kim <namhyung.kim@lge.com>,
	Namhyung Kim <namhyung@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Cody P Schafer <cody@linux.vnet.ibm.com>
Subject: [PATCH 2/4] perf tools: Destroy unused symsrcs
Date: Thu, 20 Feb 2014 10:32:54 +0900	[thread overview]
Message-ID: <1392859976-32760-2-git-send-email-namhyung@kernel.org> (raw)
In-Reply-To: <1392859976-32760-1-git-send-email-namhyung@kernel.org>

Stephane reported that perf report and annotate failed to process data
using lots of (> 500) shared libraries.  It was because of the limit
on number of open files (ulimit -n).

Currently when perf loads dso, it'll look for normal and dynamic
symbol tables.  And if it failed to find out both tables, it'll
iterate all of possible symtab types.  But many of them are useless
since they have no additional information and the problem is that it's
not close those files even though they're not used.  Fix it.

Reported-by: Stephane Eranian <eranian@google.com>
Cc: Cody P Schafer <cody@linux.vnet.ibm.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 tools/perf/util/symbol.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 46e2ede12c51..c3b014712fce 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -1336,6 +1336,8 @@ int dso__load(struct dso *dso, struct map *map, symbol_filter_t filter)
 
 			if (syms_ss && runtime_ss)
 				break;
+		} else {
+			symsrc__destroy(ss);
 		}
 
 	}
-- 
1.7.11.7


  reply	other threads:[~2014-02-20  1:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-20  1:32 [PATCH 1/4] perf tools: Check availability of annotate when processing samples Namhyung Kim
2014-02-20  1:32 ` Namhyung Kim [this message]
2014-02-27 13:29   ` [tip:perf/urgent] perf symbols: Destroy unused symsrcs tip-bot for Namhyung Kim
2014-02-20  1:32 ` [PATCH 3/4] perf tools: Check return value of filename__read_debuglink() Namhyung Kim
2014-02-27 13:30   ` [tip:perf/core] perf symbols: " tip-bot for Stephane Eranian
2014-02-20  1:32 ` [PATCH 4/4] perf tools: Check compatible symtab type before loading dso Namhyung Kim
2014-02-27 13:30   ` [tip:perf/core] perf symbols: " tip-bot for Namhyung Kim
2014-02-24 12:46 ` [PATCH 1/4] perf tools: Check availability of annotate when processing samples Arnaldo Carvalho de Melo
2014-02-27 13:29 ` [tip:perf/urgent] perf annotate: " tip-bot for Namhyung Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1392859976-32760-2-git-send-email-namhyung@kernel.org \
    --to=namhyung@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@ghostprotocols.net \
    --cc=cody@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung.kim@lge.com \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®