qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Anthony Harivel <aharivel@redhat.com>
Cc: qemu-devel@nongnu.org, pbonzini@redhat.com
Subject: Re: Convert an error_report to tracepoint
Date: Mon, 30 Sep 2024 12:43:01 +0100	[thread overview]
Message-ID: <ZvqOxVzk_N24SYa9@redhat.com> (raw)
In-Reply-To: <D4JL6KP1Z58Q.1P5U7QZQU7AKP@redhat.com>

On Mon, Sep 30, 2024 at 01:36:21PM +0200, Anthony Harivel wrote:
> Hello, 
> 
> There is an error_report() in target/i386/kvm/vmsr_energy.c that would 
> benefit for being a tracepoint because this is not actually an "error" 
> as per se, but more a notification that could be used for debugging, and 
> it is quite verbose.
> 
> Could someone give me some pointer on how I could manage that so I can 
> send a patch to rectify this ?

Modify the file target/i386/kvm/trace-events   to define your desired
tracepoint(s).

Then #include "trace-event.h"  in your vmsr_energy.c  file

Call your probepoint using  trace_{probe name}(...args...)

See docs/devel/tracing.rst for general info on tracing

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2024-09-30 11:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-30 11:36 Convert an error_report to tracepoint Anthony Harivel
2024-09-30 11:43 ` Daniel P. Berrangé [this message]
2024-09-30 11:53   ` Anthony Harivel

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=ZvqOxVzk_N24SYa9@redhat.com \
    --to=berrange@redhat.com \
    --cc=aharivel@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).