Re: [PATCH spice-server v3] red-channel: Initialize statistic node correctly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 30, 2017 at 02:50:12PM -0400, Frediano Ziglio wrote:
> > 
> > On Thu, Mar 30, 2017 at 01:45:05PM +0100, Frediano Ziglio wrote:
> > > The default memset(0) on the node did not init it correctly.
> > 
> > "Doing a memset(0) on a SpiceStatNode does not create an empty/unattached
> > node, but instead creates a node whose parent is the node '0'. This node
> > could be non-existing, or totally unrelated to the empty node we wanted
> > to create."
> > 
> 
> SpiceStatNode contains a reference to the node which is basically
> an index (0-based) on an array inside the statistic file.
> The value ~0 is special and for a parent/node means invalid and the
> child will appended as sibling from the root.
> The memset(0) basically will initialize the node to the first node
> in the array whatever is it. So node/counters created with parent as
> this not initialized node will be child of the node 0
> (being the first will be the first node/counter created).
> 
> > > This patch create the 0 node as soon as the file is created
> > > to use as default memset(0) compatible node.
> > 
> > "This patch creates a default '0' node as soon as the file is created.
> > This will make the behaviour of 0-filled nodes more in line with what
> > one would expect."
> > 
> 
> Yes. As all counters are created for channels creating a "default_channel"
> node make sense and being 0 make the trick work.

These were suggestions for improving the commit log in cas this was not
clear, ACK from me with a more detailed commit log along these lines.

Christophe

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]