Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1656666

Re: [PATCH 1/2] perf tools: Decompress kernel module when reading DSO data

From Namhyung Kim <namhyung@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 1/2] perf tools: Decompress kernel module when reading DSO data
Date 2017-06-03 03:50 +0200
Message-ID <tO6mt-v6-3@gated-at.bofh.it> (permalink)
References <tNuhb-Bs-3@gated-at.bofh.it> <tNwCl-1Yg-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Jun 1, 2017 at 8:29 PM, Jiri Olsa <jolsa@redhat.com> wrote:
> On Thu, Jun 01, 2017 at 06:06:04PM +0900, Namhyung Kim wrote:
>
> SNIP
>
>> -     }
>> -
>> -     unlink(tmpbuf);
>> -
>> -out:
>> -     free(m.ext);
>> -     return fd;
>> -}
>> -
>>  bool symsrc__possibly_runtime(struct symsrc *ss)
>>  {
>>       return ss->dynsym || ss->opdsec;
>> @@ -702,9 +668,13 @@ int symsrc__init(struct symsrc *ss, struct dso *dso, const char *name,
>>       int fd;
>>
>>       if (dso__needs_decompress(dso)) {
>> -             fd = decompress_kmodule(dso, name, type);
>> +             char buf[32];
>> +
>> +             fd = dso__decompress_kmodule(dso, name, buf, sizeof(buf));
>>               if (fd < 0)
>>                       return -1;
>> +
>> +             unlink(buf);
>
> I wonder we could make this more clear and add:
>
>   dso__decompress_kmodule_fd
>   dso__decompress_kmodule_path
>
> _fd version would remove the file and _path version would close the descriptor
>
> in any case, could you please split the change so the
> changes to decompress_kmodule are apparent?

Will do.

Thanks,
Namhyung

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] perf tools: Decompress kernel module when reading DSO data Namhyung Kim <namhyung@kernel.org> - 2017-06-01 11:10 +0200
  [PATCH 2/2] perf test: Decompress kernel module before objdump Namhyung Kim <namhyung@kernel.org> - 2017-06-01 11:10 +0200
  Re: [PATCH 1/2] perf tools: Decompress kernel module when reading  DSO data Jiri Olsa <jolsa@redhat.com> - 2017-06-01 13:30 +0200
    Re: [PATCH 1/2] perf tools: Decompress kernel module when reading DSO data Namhyung Kim <namhyung@kernel.org> - 2017-06-03 03:50 +0200
  Re: [PATCH 1/2] perf tools: Decompress kernel module when reading  DSO data Jiri Olsa <jolsa@redhat.com> - 2017-06-01 13:40 +0200
    Re: [PATCH 1/2] perf tools: Decompress kernel module when reading DSO data Namhyung Kim <namhyung@kernel.org> - 2017-06-03 03:50 +0200

csiph-web