[Spice-devel] [PATCH spice-common] Integrate recorder library

Frediano Ziglio fziglio at redhat.com
Thu Nov 22 10:58:01 UTC 2018


> 
> Hey,
> 
> On Mon, Nov 19, 2018 at 08:46:04PM +0000, Frediano Ziglio wrote:
> > From: Christophe de Dinechin <dinechin at redhat.com>
> > 
> > Allow to use recorder library. See https://github.com/c3d/recorder for
> > details.
> > The main usage will be to collect statistics while the programs will run.
> > By default the recorder will be disabled at compile time.
> > Both autoconf and Meson are supported.
> > Autoconf requires the addition of SPICE_CHECK_RECORDER call in
> > configure.ac.
> > Meson requires to add recorder option.
> 
> Just by reading that log, I wonder why this is different than what was
> discussed on the list 18 months ago? For example
> https://lists.freedesktop.org/archives/spice-devel/2017-June/037952.html
> 

Writing an updated commit message.

One of the reason to discard different solutions (SystemTap, LTTng) was portability.
We support Linux and Windows mainly. GLib structured was not also ported to Windows.

Although I think some proper simple printf-style and classic filtering (grep)
would be enough I think most of people preferred to have some ready tools
to collect and display.

> I would add a few followup patches adding a few statistics as an example
> of how it would be used, this would probably help with the discussion.
> 

Well, the current include is not wrapping much so the online documentation
at https://github.com/c3d/recorder still apply.

Some concern was about maintaining. Thinking about this and the comment on
https://lists.freedesktop.org/archives/spice-devel/2017-June/037952.html
about tweaks ("Now this is even further away from tracing. Imho, existing
argument parsing (for end-users) or environment parsing (mostly for devs,
or global tweaks) are quite fine here. We could better document the existing
environment variables, beside that, what does "tweaks" bring?"), would
be sensible to define a more restricted interface on top to limit the usage
like (this for tweaks) ?

   SPICE_TWEAK_DEFINE(my_tweak, 123, "MY_TWEAK", "This is my tweak");
   ...
   if (SPICE_TWEAK(my_tweak) > 100) ...

so for instance this can lead to use recorder library or just use a
(not literal code!)

   int my_tweak = atoi(getenv("SPICE_MY_TWEAK"));

similar definitions could be added for statistics with the intent for
instance to use other system libraries (like LTTng).

> Christophe
> 

Frediano


More information about the Spice-devel mailing list