<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 23, 2017 at 7:34 PM, Daniel P. Berrange <span dir="ltr"><<a href="mailto:berrange@redhat.com" target="_blank">berrange@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="m_4707355577226286444gmail-">On Mon, Jan 23, 2017 at 07:26:58PM +0530, Nitesh Konkar wrote:<br>
> Hi Daniel,<br>
><br>
><br>
> On Mon, Jan 23, 2017 at 4:08 PM, Daniel P. Berrange <<a href="mailto:berrange@redhat.com" target="_blank">berrange@redhat.com</a>><br>
> wrote:<br>
><br>
> > On Mon, Jan 23, 2017 at 04:03:21PM +0530, Nitesh Konkar wrote:<br>
> ><br>
> > > @@ -9570,16 +9570,17 @@ qemuDomainSetPerfEvents(virDom<wbr>ainPtr dom,<br>
> > >      if (def) {<br>
> > >          for (i = 0; i < nparams; i++) {<br>
> > >              virTypedParameterPtr param = &params[i];<br>
> > > -            enabled = param->value.b;<br>
> > > +            state = param->value.i;<br>
> ><br>
> > NACK, this semantic change is not backwards compatible - this will break<br>
> > all applications & language bindings currently using libvirt perf events.<br>
> ><br>
> > Oh I see . I didn't realize that. Any other API/place you suggest, through<br>
> which<br>
> we can get this functionality in?<br>
<br>
</span>Why not just reset counters to zero when first enabling the perf<br>
event. If people want to reset them again later, they can just<br>
disable+enable the event to get the reset<br></blockquote><div>I think, if this patch gets in: <a href="https://www.redhat.com/archives/libvir-list/2017-January/msg00956.html" target="_blank">https://www.redhat.com/<wbr>archives/libvir-list/2017-<wbr>January/msg00956.html</a><br></div><div>then disable+enable would be equivalent to a reset operation.<br></div><div>As of today, every enable request is creating a new fd, thus leaking the previous one. <br><br></div><div>Thanks,<br></div><div>Nitesh<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Regards,<br>
Daniel<br>
<div class="m_4707355577226286444gmail-HOEnZb"><div class="m_4707355577226286444gmail-h5">--<br>
|: <a href="http://berrange.com" rel="noreferrer" target="_blank">http://berrange.com</a>      -o-    <a href="http://www.flickr.com/photos/dberrange/" rel="noreferrer" target="_blank">http://www.flickr.com/photos/d<wbr>berrange/</a> :|<br>
|: <a href="http://libvirt.org" rel="noreferrer" target="_blank">http://libvirt.org</a>              -o-             <a href="http://virt-manager.org" rel="noreferrer" target="_blank">http://virt-manager.org</a> :|<br>
|: <a href="http://entangle-photo.org" rel="noreferrer" target="_blank">http://entangle-photo.org</a>       -o-    <a href="http://search.cpan.org/%7Edanberr/" rel="noreferrer" target="_blank">http://search.cpan.org/~danber<wbr>r/</a> :|<br>
</div></div></blockquote></div><br></div></div>