From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Stephane Eranian <eranian@google.com>
Cc: Nilay Vaish <nilayvaish@gmail.com>,
Linux Kernel list <linux-kernel@vger.kernel.org>,
Jiri Olsa <jolsa@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
Anton Blanchard <anton@ozlabs.org>,
Namhyung Kim <namhyung@kernel.org>
Subject: Re: [PATCH 1/9] perf/jit: improve error messages from JVMTI
Date: Fri, 14 Oct 2016 12:20:05 -0300 [thread overview]
Message-ID: <20161014152005.GC12815@kernel.org> (raw)
In-Reply-To: <CABPqkBRGwCiMBnFoW+jj20RFcwJv3MHeAPhUE4KctrBTXheN+A@mail.gmail.com>
Em Fri, Oct 14, 2016 at 05:57:25AM -0700, Stephane Eranian escreveu:
> On Fri, Oct 14, 2016 at 4:13 AM, Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> > Em Thu, Oct 13, 2016 at 03:05:40PM -0500, Nilay Vaish escreveu:
> >> Do we not need to release the memory for err_msg if the condition for
> >> the 'if' statement evaluates to false? Is it that we are going to
> >> kill the process, so no need to release the memory?
> > I guess that print_error() is called only when an error was returned
> > somewhere, that ret parameter, then if there was no error
> > (JVMTI_ERROR_NONE) in translating that numeric code to an string,
> > err_msg, it can then be used with warnx() (the main purpose of
> > print_error()) and then deallocated.
> >
> > For err != JVMTI_ERROR_NONE it silently goes back to the caller that
> > expected it to print something.
> >
> > I.e. probably it should have an else clause, something like:
> >
> > if (err == JVMTI_ERROR_NONE) {
> > warnx("%s failed with %s", msg, err_msg);
> > (*jvmti)->Deallocate(jvmti, (unsigned char *)err_msg);
> > } else {
> > warnx("%s failed with an unknown error %d", msg, (int)ret);
> > }
> >
> > Stephane?
> I will fix all of the comments over the week-end. I am away from office today.
I have almost all of them fixed, will fix this one too, if you agree
with the analysis.
- Arnaldo
next prev parent reply other threads:[~2016-10-14 15:21 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-13 10:59 [PATCH 0/9] perf/jit: various improvements Stephane Eranian
2016-10-13 10:59 ` [PATCH 1/9] perf/jit: improve error messages from JVMTI Stephane Eranian
2016-10-13 20:05 ` Nilay Vaish
2016-10-14 11:13 ` Arnaldo Carvalho de Melo
2016-10-14 12:57 ` Stephane Eranian
2016-10-14 15:20 ` Arnaldo Carvalho de Melo [this message]
2016-10-17 13:52 ` Stephane Eranian
2016-10-24 18:58 ` [tip:perf/core] perf jit: Improve " tip-bot for Stephane Eranian
2016-10-13 10:59 ` [PATCH 2/9] perf/jit: enable jitdump support without dwarf Stephane Eranian
2016-10-13 18:16 ` Arnaldo Carvalho de Melo
2016-10-13 18:37 ` Arnaldo Carvalho de Melo
2016-10-13 18:51 ` Arnaldo Carvalho de Melo
2016-10-13 19:03 ` Arnaldo Carvalho de Melo
2016-10-13 19:44 ` Arnaldo Carvalho de Melo
2016-10-24 18:58 ` [tip:perf/core] perf jit: Enable " tip-bot for Maciej Debski
2016-10-13 10:59 ` [PATCH 3/9] perf/jit: remove unecessary padding in jitdump file Stephane Eranian
2016-10-24 18:59 ` [tip:perf/core] perf jit: Remove " tip-bot for Stephane Eranian
2016-10-13 10:59 ` [PATCH 4/9] perf/jit: make perf skip unknown records Stephane Eranian
2016-10-24 18:59 ` [tip:perf/core] perf jit: Make " tip-bot for Stefano Sanfilippo
2016-10-13 10:59 ` [PATCH 5/9] perf/jit: do not assume pgoff is zero Stephane Eranian
2016-10-24 19:00 ` [tip:perf/core] perf jit: Do " tip-bot for Stefano Sanfilippo
2016-10-13 10:59 ` [PATCH 6/9] perf/jit: add unwinding support Stephane Eranian
2016-10-24 19:00 ` [tip:perf/core] perf jit: Add " tip-bot for Stefano Sanfilippo
2016-10-13 10:59 ` [PATCH 7/9] perf/jit: generate .eh_frame/.eh_frame_hdr in DSO Stephane Eranian
2016-10-24 19:01 ` [tip:perf/core] perf jit: Generate " tip-bot for Stefano Sanfilippo
2016-10-13 10:59 ` [PATCH 8/9] perf/jit: Check JITHEADER_VERSION Stephane Eranian
2016-10-24 19:01 ` [tip:perf/core] perf jit: " tip-bot for Stefano Sanfilippo
2016-10-13 10:59 ` [PATCH 9/9] perf/jit: add jitdump format specification document Stephane Eranian
2016-10-24 19:02 ` [tip:perf/core] perf jit: Add " tip-bot for Stephane Eranian
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=20161014152005.GC12815@kernel.org \
--to=acme@kernel.org \
--cc=anton@ozlabs.org \
--cc=eranian@google.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=nilayvaish@gmail.com \
--cc=peterz@infradead.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