From patchwork Mon Feb 1 15:47:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 1434223 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=LpqHe4xn; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DTt170MK6z9sWP for ; Tue, 2 Feb 2021 02:59:19 +1100 (AEDT) Received: from localhost ([::1]:42986 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6bbg-00046F-00 for incoming@patchwork.ozlabs.org; Mon, 01 Feb 2021 10:59:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43240) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6bTA-0001mb-Mf for qemu-devel@nongnu.org; Mon, 01 Feb 2021 10:50:30 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:55555) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l6bT7-00086X-1X for qemu-devel@nongnu.org; Mon, 01 Feb 2021 10:50:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612194623; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4p3cFaJrxY2t1gwr/N4Nd8NbirLWXZLRVYNPehY0rHI=; b=LpqHe4xnU1b3aCgHsBYNmwl8/pU1kpsNk39G4vW9AI1Rq6lWRP8z7fGDKY62Du4ctp4+b6 y7jcMzBumVtF2mOBLoqxKAm3i+QuvH/dgvfmmpRHL+XGupx1xjGanrT5ZJxoGymxWngMUl n8Yxb4b1XNnwZk0RDWpbzSLKWgunm90= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-290-BUgqfHWjNeeiDdkK-O-JTQ-1; Mon, 01 Feb 2021 10:50:21 -0500 X-MC-Unique: BUgqfHWjNeeiDdkK-O-JTQ-1 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0012310A92FB; Mon, 1 Feb 2021 15:48:05 +0000 (UTC) Received: from localhost (ovpn-115-140.ams2.redhat.com [10.36.115.140]) by smtp.corp.redhat.com (Postfix) with ESMTP id 953615D735; Mon, 1 Feb 2021 15:48:05 +0000 (UTC) From: Stefan Hajnoczi To: qemu-devel@nongnu.org Subject: [PULL 09/11] simpletrace: build() missing 2 required positional arguments Date: Mon, 1 Feb 2021 15:47:01 +0000 Message-Id: <20210201154703.180022-10-stefanha@redhat.com> In-Reply-To: <20210201154703.180022-1-stefanha@redhat.com> References: <20210201154703.180022-1-stefanha@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=stefanha@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=stefanha@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.351, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: Peter Maydell , Eduardo Habkost , qemu-block@nongnu.org, =?utf-8?q?Vol?= =?utf-8?q?ker_R=C3=BCmelin?= , Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Stefan Hajnoczi , Cleber Rosa , Paolo Bonzini Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Volker Rümelin Commit 4e66c9ef64 "tracetool: add input filename and line number to Event" forgot to add a line number and a filename argument at one build method call site. Traceback (most recent call last): File "./scripts/simpletrace.py", line 261, in run(Formatter()) File "./scripts/simpletrace.py", line 236, in run process(events, sys.argv[2], analyzer, read_header=read_header) File "./scripts/simpletrace.py", line 177, in process dropped_event = Event.build("Dropped_Event(uint64_t num_events_dropped)") TypeError: build() missing 2 required positional arguments: 'lineno' and 'filename' Add the missing arguments. Signed-off-by: Volker Rümelin Reviewed-by: Philippe Mathieu-Daudé Message-id: 20210131173415.3392-1-vr_qemu@t-online.de Signed-off-by: Stefan Hajnoczi --- scripts/simpletrace.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/simpletrace.py b/scripts/simpletrace.py index 20f0026066..d61fb0bd87 100755 --- a/scripts/simpletrace.py +++ b/scripts/simpletrace.py @@ -174,7 +174,9 @@ def process(events, log, analyzer, read_header=True): if read_header: read_trace_header(log) - dropped_event = Event.build("Dropped_Event(uint64_t num_events_dropped)") + frameinfo = inspect.getframeinfo(inspect.currentframe()) + dropped_event = Event.build("Dropped_Event(uint64_t num_events_dropped)", + frameinfo.lineno + 1, frameinfo.filename) edict = {"dropped": dropped_event} idtoname = {dropped_event_id: "dropped"}