From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Ian Campbell <Ian.Campbell@citrix.com>,
Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] tools/libxl: Improvements to libxl-save-helper when using valgrind
Date: Thu, 10 Apr 2014 19:14:11 +0100 [thread overview]
Message-ID: <5346DF73.3050705@citrix.com> (raw)
In-Reply-To: <21318.56947.346171.333514@mariner.uk.xensource.com>
On 10/04/14 19:09, Ian Jackson wrote:
> Andrew Cooper writes ("[PATCH] tools/libxl: Improvements to libxl-save-helper when using valgrind"):
>> Fix two unfree()'d allocations in libxl-save-helper, to get them out of the
>> way of other legitimate complains from valgrind.
>>
>> The first is easy; close the interface to libxc when done with it.
>>
>> The second requires quite a bit of code motion to fix sensibly.
>> * The three logging functions are moved up.
> Can you split the pure code motion into a separate patch ? That
> always makes things much easier to review.
Ok
>
>> * The destroy() function has been modified to be less antisocial.
> Why ? Who calls the destroy function ? It's even less appropriate to
> destroy this thing now that it's allocated statically.
Only on manual calls to xtl_logger_destroy(), which don't check for
NULLness of the function pointer before calling it.
I considered dropping it and wasn't fussed either way - I shall drop for v2.
>
>> * The global 'logger' is initialised in place. This requires changing the
>> indirection of its use in 5 locations.
> If you wrote:
>
> +static xentoollog_logger logger[1] = {{
>
> then the call sites could remain unchanged.
I did that originally, decided it was ugly. Given that changing the
indirection was small compared to the rest, I opted to fix it nicely.
>
>> This completely removes any memory allocation associated with logging
> You mean, with the logger instance. Actual log messages involve an
> allocation for every message.
>
> Ian.
I will update the message.
~Andrew
next prev parent reply other threads:[~2014-04-10 18:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-10 17:52 [PATCH] tools/libxl: Improvements to libxl-save-helper when using valgrind Andrew Cooper
2014-04-10 18:09 ` Ian Jackson
2014-04-10 18:14 ` Andrew Cooper [this message]
2014-04-11 11:06 ` Ian Jackson
2014-04-11 13:25 ` Andrew Cooper
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=5346DF73.3050705@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.