From nobody Tue Nov 4 15:30:20 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1530674386875841.0906668097696; Tue, 3 Jul 2018 20:19:46 -0700 (PDT) Received: from localhost ([::1]:43741 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1faYKO-0004Jt-Dl for importer@patchew.org; Tue, 03 Jul 2018 23:19:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47067) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1faYJL-0003wt-RL for qemu-devel@nongnu.org; Tue, 03 Jul 2018 23:18:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1faYJK-0001sM-KB for qemu-devel@nongnu.org; Tue, 03 Jul 2018 23:18:31 -0400 Received: from cmccmta3.chinamobile.com ([221.176.66.81]:7988) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1faYJF-0001pv-E9; Tue, 03 Jul 2018 23:18:26 -0400 Received: from spf.mail.chinamobile.com (unknown[172.16.121.11]) by rmmx-syy-dmz-app09-12009 (RichMail) with SMTP id 2ee95b3c3c78236-29a7e; Wed, 04 Jul 2018 11:18:16 +0800 (CST) Received: from qemu-tcmu.novalocal (unknown[112.25.65.41]) by rmsmtp-syy-appsvr06-12006 (RichMail) with SMTP id 2ee65b3c3c77b2a-fe307; Wed, 04 Jul 2018 11:18:16 +0800 (CST) X-RM-TRANSID: 2ee95b3c3c78236-29a7e X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 X-RM-TRANSID: 2ee65b3c3c77b2a-fe307 From: Yaowei Bai To: mjt@tls.msk.ru, laurent@vivier.eu Date: Wed, 4 Jul 2018 11:17:27 +0800 Message-Id: <1530674247-31200-1-git-send-email-baiyaowei@cmss.chinamobile.com> X-Mailer: git-send-email 1.8.3.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 221.176.66.81 Subject: [Qemu-devel] [PATCH v2] tracing: Use double-dash spelling for trace option X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: stefanha@redhat.com, qemu-trivial@nongnu.org, armbru@redhat.com, qemu-devel@nongnu.org, cota@braap.org, baiyaowei@cmss.chinamobile.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The '-trace' and '--trace' spellings are only both supported in qemu binary, while for qemu-nbd or qemu-img only '--trace' spelling is supported. So for the consistency of trace option invocation, we should use double-dash spelling in our documentation. This's also mentioned in https://wiki.qemu.org/BiteSizedTasks#Consistent_option_usage_in_documentati= on =2E Signed-off-by: Yaowei Bai Reviewed-by: Eric Blake --- docs/devel/tracing.txt | 6 +++--- trace/control.c | 4 ++-- trace/control.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/devel/tracing.txt b/docs/devel/tracing.txt index 6f815ec..bc52f12 100644 --- a/docs/devel/tracing.txt +++ b/docs/devel/tracing.txt @@ -18,7 +18,7 @@ for debugging, profiling, and observing execution. =20 3. Run the virtual machine to produce a trace file: =20 - qemu -trace events=3D/tmp/events ... # your normal QEMU invocation + qemu --trace events=3D/tmp/events ... # your normal QEMU invocation =20 4. Pretty-print the binary trace file: =20 @@ -157,11 +157,11 @@ The state of events can also be queried and modified = through monitor commands: * trace-event NAME on|off Enable/disable a given trace event or a group of events (using wildcards= ). =20 -The "-trace events=3D" command line argument can be used to enable t= he +The "--trace events=3D" command line argument can be used to enable = the events listed in from the very beginning of the program. This file = must contain one event name per line. =20 -If a line in the "-trace events=3D" file begins with a '-', the trac= e event +If a line in the "--trace events=3D" file begins with a '-', the tra= ce event will be disabled instead of enabled. This is useful when a wildcard was u= sed to enable an entire family of events but one noisy event needs to be disab= led. =20 diff --git a/trace/control.c b/trace/control.c index e40cfca..43fb786 100644 --- a/trace/control.c +++ b/trace/control.c @@ -253,7 +253,7 @@ void trace_init_file(const char *file) #ifdef CONFIG_TRACE_SIMPLE st_set_trace_file(file); #elif defined CONFIG_TRACE_LOG - /* If both the simple and the log backends are enabled, "-trace file" + /* If both the simple and the log backends are enabled, "--trace file" * only applies to the simple backend; use "-D" for the log backend. */ if (file) { @@ -261,7 +261,7 @@ void trace_init_file(const char *file) } #else if (file) { - fprintf(stderr, "error: -trace file=3D...: " + fprintf(stderr, "error: --trace file=3D...: " "option not supported by the selected tracing backends\n"); exit(1); } diff --git a/trace/control.h b/trace/control.h index eb65c8e..0716f90 100644 --- a/trace/control.h +++ b/trace/control.h @@ -193,7 +193,7 @@ void trace_event_set_vcpu_state_dynamic(CPUState *vcpu, /** * trace_init_backends: * @file: Name of trace output file; may be NULL. - * Corresponds to commandline option "-trace file=3D...". + * Corresponds to commandline option "--trace file=3D...". * * Initialize the tracing backend. * @@ -204,7 +204,7 @@ bool trace_init_backends(void); /** * trace_init_file: * @file: Name of trace output file; may be NULL. - * Corresponds to commandline option "-trace file=3D...". + * Corresponds to commandline option "--trace file=3D...". * * Record the name of the output file for the tracing backend. * Exits if no selected backend does not support specifying the --=20 1.8.3.1