From nobody Sat May 4 08:17:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.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 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1566570388; cv=none; d=zoho.com; s=zohoarc; b=QJI9rzMpt3hNRmbw0pceP8bHHdQzjcRhGf1xTaynCQVUvD+FBgRc3FN5oWnWeiOfDExtZ66I5pZYTEZ1X2DVkTpD1yxTAhc23fl6cNGWoSiOUF9qw0Vmiy4SXeNXu3QE34888IhycLAbCQpJYICdy2L5N712r3OyHQJJj8jutoc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566570388; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=U3YVdm4/CB1f/LaAuB4v/4Rlt+UeAQg6Pjog6ZOuMRg=; b=EcivDosE3Lb3dolADbo+7wQsxxg+7ZUcL8131PUQlY7fDvke3V5dVmWbGmirRxafJ7ShsXLd2oAct+F9horUN61itb6Dm3e1Oa3eqO+PH2xy3QbH8O83L4+bGUFqlQ4ELWbWQXGtND9fkf+AkmR3135uc+Mc20d6TcqxbvFPrnQ= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1566570388946300.38414514290184; Fri, 23 Aug 2019 07:26:28 -0700 (PDT) Received: from localhost ([::1]:56702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i1AWJ-0002Dx-MJ for importer@patchew.org; Fri, 23 Aug 2019 10:26:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48328) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i1ASE-0006dM-N9 for qemu-devel@nongnu.org; Fri, 23 Aug 2019 10:22:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i1ASD-00018a-Nc for qemu-devel@nongnu.org; Fri, 23 Aug 2019 10:22:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57922) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i1ASD-00018D-Ik for qemu-devel@nongnu.org; Fri, 23 Aug 2019 10:22:13 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D71A918C4275 for ; Fri, 23 Aug 2019 14:22:12 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-118.brq.redhat.com [10.40.204.118]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 23F605D6B2; Fri, 23 Aug 2019 14:22:05 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Date: Fri, 23 Aug 2019 16:22:03 +0200 Message-Id: <20190823142203.5210-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.62]); Fri, 23 Aug 2019 14:22:12 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2] trace: Clarify DTrace/SystemTap help message X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , "Daniel P . Berrange" , Stefan Hajnoczi Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Most tracing backends are implemented within QEMU, except the DTrace/SystemTap backends. One side effect is when running 'qemu -trace help', an incomplete list of trace events is displayed when using the DTrace/SystemTap backends. This is partly due to trace events registered as modules with trace_init(), and since the events are not used within QEMU, the linker optimize and remove the unused modules (which is OK in this particular case). Currently only the events compiled in trace-root.o and in the last trace.o member of libqemuutil.a are linked, resulting in an incomplete list of events. To avoid confusion, improve the help message, recommending to use the proper systemtap script to display the events list. Before: $ lm32-softmmu/qemu-system-lm32 -trace help 2>&1 | wc -l 70 After: $ lm32-softmmu/qemu-system-lm32 -trace help Run 'qemu-trace-stap list qemu-system-lm32' to print a list of names of trace points with the DTrace/SystemTap backends. $ qemu-trace-stap list qemu-system-lm32 | wc -l 1136 Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- v2: Consider when multiple trace backends are used (Stefan) --- trace/control.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/trace/control.c b/trace/control.c index 43fb7868db..d9cafc161b 100644 --- a/trace/control.c +++ b/trace/control.c @@ -165,6 +165,12 @@ void trace_list_events(void) while ((ev =3D trace_event_iter_next(&iter)) !=3D NULL) { fprintf(stderr, "%s\n", trace_event_get_name(ev)); } +#ifdef CONFIG_TRACE_DTRACE + fprintf(stderr, "This list of names of trace points may be incomplete " + "when using the DTrace/SystemTap backends.\n" + "Run 'qemu-trace-stap list %s' to print the full list.= \n", + error_get_progname()); +#endif } =20 static void do_trace_enable_events(const char *line_buf) --=20 2.20.1