From: David Vrabel <david.vrabel@citrix.com>
To: George Dunlap <george.dunlap@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH 09 of 10] xenalyze: add a basic plugin infrastructure
Date: Thu, 7 Jun 2012 16:26:45 +0100 [thread overview]
Message-ID: <4FD0C835.4070507@citrix.com> (raw)
In-Reply-To: <4FD08B04.30709@eu.citrix.com>
On 07/06/12 12:05, George Dunlap wrote:
> On 31/05/12 12:16, David Vrabel wrote:
>> Allow xenalyze to be include (at build time) plugins that can do
>> per-record actions and a summary. These plugins can be in C or C++.
>>
>> The plugins entry points are in struct plugin and pointers to all the
>> plugins linked in xenalyze are placed in a "plugin" section so
>> plugin_init() can find them all.
>>
>> A new command line option (-p, --plugin=PLUGIN) is added to enable one
>> or more plugins.
>>
>> A sample plugin (skeleton) is included (mostly because at least one
>> plugin must be present for the build to work).
>>
>> Signed-off-by: David Vrabel<david.vrabel@citrix.com>
> So what's the main motivation of having this plugin infrastructure? The
> one plugin example you have ("batch-size", patch 10) seems simple enough
> that it should be fairly straightforward to just add as an option, with
> not much more boilerplate than C++ already requires.
>
> Looks like potential advantages may include:
> * Ability to use C++ language (for those who care for such things)
> * Ability to use STL for complex data structures
> * Ability to add an option like the "batch-size" plugin in a concise,
> self-contained way
These are the main reasons. The last is the most important.
> Potential disadvantages include:
> * An extra O(N) loop on the hot path (where N = # of enabled plugins)
> * For each enabled plugin, an extra full function call on the hot path;
> and a C++ function at that, which (my prejudice tells me) is likely to
> be more wasteful time and space-wise than a C function.
I'd be surprised if these had any practical performance penalty but I'll
collect some measurements.
David
next prev parent reply other threads:[~2012-06-07 15:26 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <338462397-32111-1-git-send-email-david.vrabel@citrix.com>
2012-05-31 11:16 ` [PATCH 00 of 10] xenalyze: build, hypercall tracing and plugins (v2) David Vrabel
2012-05-31 11:16 ` [PATCH 01 of 10] xenalyze: add .hgignore David Vrabel
2012-05-31 11:16 ` [PATCH 02 of 10] xenalyze: automatically generate dependencies David Vrabel
2012-06-06 17:00 ` George Dunlap
2012-05-31 11:16 ` [PATCH 03 of 10] xenalyze: remove decode of unused events David Vrabel
2012-06-06 17:03 ` George Dunlap
2012-05-31 11:16 ` [PATCH 04 of 10] xenalyze: update trace.h to match xen-unstable David Vrabel
2012-06-07 10:14 ` George Dunlap
2012-06-07 10:15 ` George Dunlap
2012-05-31 11:16 ` [PATCH 05 of 10] xenalyze: correctly display of count of HW events David Vrabel
2012-06-07 10:16 ` George Dunlap
2012-05-31 11:16 ` [PATCH 06 of 10] xenalyze: move struct record_info into a header David Vrabel
2012-06-07 11:11 ` George Dunlap
2012-06-07 11:31 ` David Vrabel
2012-05-31 11:16 ` [PATCH 07 of 10] xenalyze: decode PV_HYPERCALL_V2 records David Vrabel
2012-06-07 11:35 ` George Dunlap
2012-06-07 15:20 ` David Vrabel
2012-05-31 11:16 ` [PATCH 08 of 10] xenalyze: decode PV_HYPERCALL_SUBCALL events David Vrabel
2012-05-31 11:16 ` [PATCH 09 of 10] xenalyze: add a basic plugin infrastructure David Vrabel
2012-06-07 11:05 ` George Dunlap
2012-06-07 15:26 ` David Vrabel [this message]
2012-06-07 16:02 ` George Dunlap
2012-05-31 11:16 ` [PATCH 10 of 10] xenalyze: add a batch-size plugin David Vrabel
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=4FD0C835.4070507@citrix.com \
--to=david.vrabel@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/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.