Messages in this thread Patch in this message | | | From | Namhyung Kim <> | Subject | Re: [BUG] perf report/annotate: consuming too many file descriptors | Date | Fri, 14 Feb 2014 14:19:13 +0900 |
| |
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:
| |