lkml.org 
[lkml]   [2014]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [BUG] perf report/annotate: consuming too many file descriptors
Date
Hi Stephane,

On Thu, 13 Feb 2014 17:26:30 +0100, Stephane Eranian wrote:
> Hi,
>
> Your patch does solve the file consumption problem on my test case.
> We still open and do the ELF read 5 times.

Cool. Could you also confirm what's the problem case - whether it's
stripped or static linked?

>
> Now, if on top of your patch, we also add the following, we save one
> open().

I think you need one more patch below on top of yours since the
filename__read_debuglink() always return -1.

Thanks,
Namhyung


diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
index 3e9f336740fa..8ac4a4fe2abd 100644
--- a/tools/perf/util/symbol-elf.c
+++ b/tools/perf/util/symbol-elf.c
@@ -506,6 +506,8 @@ int filename__read_debuglink(const char *filename, char *debuglink,
/* the start of this section is a zero-terminated string */
strncpy(debuglink, data->d_buf, size);

+ err = 0;
+
out_elf_end:
elf_end(elf);
out_close:


\
 
 \ /
  Last update: 2014-02-14 07:23    [W:0.055 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site