From: Paolo Bonzini <pbonzini@redhat.com>
To: Janosch Frank <frankja@linux.vnet.ibm.com>, qemu-devel@nongnu.org
Cc: borntraeger@de.ibm.com
Subject: Re: [Qemu-devel] [PATCH] scripts/kvm/kvm_stat: Fix tracefs access checking
Date: Wed, 3 Feb 2016 08:55:24 +0100 [thread overview]
Message-ID: <56B1B26C.3080709@redhat.com> (raw)
In-Reply-To: <1454485291-43849-1-git-send-email-frankja@linux.vnet.ibm.com>
On 03/02/2016 08:41, Janosch Frank wrote:
> The following patch fixes the access checking behavior changed in
> 7aa4ee5. Kvm_stat will now fall back to debugfs statistics if the
> tracefs ones were chosen but are not available. It will then print a
> warning and wait five seconds until it continues.
>
> Five seconds are not long, but I do not want to annoy users with
> longer delays and the message is still visible after closing
> kvm_stat.
>
> Janosch Frank (1):
> scripts/kvm/kvm_stat: Fix tracefs access checking
>
> scripts/kvm/kvm_stat | 20 +++++++++++++++-----
> 1 file changed, 15 insertions(+), 5 deletions(-)
>
I think exiting is better if the -t flag is explicitly passed:
diff --git a/scripts/kvm/kvm_stat b/scripts/kvm/kvm_stat
index bab34bb..3cf1181 100755
--- a/scripts/kvm/kvm_stat
+++ b/scripts/kvm/kvm_stat
@@ -796,11 +796,12 @@ def check_access(options):
sys.stderr.write("Please enable CONFIG_TRACING in your kernel "
"when using the option -t (default).\n"
"If it is enabled, make {0} readable by the "
- "current user.\n"
- "Falling back to debugfs statistics!\n"
- .format(PATH_DEBUGFS_TRACING))
+ "current user.\n")
+ if options.tracepoints:
+ sys.exit(1)
+
+ sys.stderr.write("Falling back to debugfs statistics!\n"
options.debugfs = True
- options.tracepoints = False
sleep(5)
return options
Otherwise okay.
Paolo
prev parent reply other threads:[~2016-02-03 7:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-03 7:41 [Qemu-devel] [PATCH] scripts/kvm/kvm_stat: Fix tracefs access checking Janosch Frank
2016-02-03 7:41 ` Janosch Frank
2016-02-03 7:55 ` Paolo Bonzini [this message]
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=56B1B26C.3080709@redhat.com \
--to=pbonzini@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=frankja@linux.vnet.ibm.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).