From: Jiri Olsa <jolsa@redhat.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Jiri Olsa <jolsa@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
kernel-team@lge.com, David Ahern <dsahern@gmail.com>,
Adrian Hunter <adrian.hunter@intel.com>
Subject: Re: [PATCH 1/2] perf tools: Decompress kernel module when reading DSO data
Date: Thu, 1 Jun 2017 13:29:38 +0200 [thread overview]
Message-ID: <20170601112937.GB15888@krava> (raw)
In-Reply-To: <20170601090605.5809-1-namhyung@kernel.org>
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?
thanks,
jirka
next prev parent reply other threads:[~2017-06-01 11:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-01 9:06 Namhyung Kim
2017-06-01 9:06 ` [PATCH 2/2] perf test: Decompress kernel module before objdump Namhyung Kim
2017-06-01 11:29 ` [PATCH 1/2] perf tools: Decompress kernel module when reading DSO data Jiri Olsa
2017-06-03 1:41 ` Namhyung Kim
2017-06-01 11:29 ` Jiri Olsa [this message]
2017-06-03 1:43 ` 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=20170601112937.GB15888@krava \
--to=jolsa@redhat.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=dsahern@gmail.com \
--cc=jolsa@kernel.org \
--cc=kernel-team@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.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
Powered by JetHome