From nobody Mon Apr 29 16:33:09 2024 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; dkim=fail; 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 1508236586558805.82647524812; Tue, 17 Oct 2017 03:36:26 -0700 (PDT) Received: from localhost ([::1]:37557 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4PES-0000h3-Rk for importer@patchew.org; Tue, 17 Oct 2017 06:36:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41019) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4PDd-0000P3-Og for qemu-devel@nongnu.org; Tue, 17 Oct 2017 06:35:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e4PDZ-0000gs-3b for qemu-devel@nongnu.org; Tue, 17 Oct 2017 06:35:29 -0400 Received: from mail-wr0-x22b.google.com ([2a00:1450:400c:c0c::22b]:55523) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e4PDY-0000fm-LF for qemu-devel@nongnu.org; Tue, 17 Oct 2017 06:35:24 -0400 Received: by mail-wr0-x22b.google.com with SMTP id 22so1120001wrb.12 for ; Tue, 17 Oct 2017 03:35:23 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id o18sm15245294wrc.45.2017.10.17.03.35.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Oct 2017 03:35:21 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id BCCC03E0650; Tue, 17 Oct 2017 11:35:20 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=M/bmRWyocVSV2/6EXx+F/m48LyfncvPygtNimvasjpg=; b=C/pyn9Cj6JiXwHDhWgN+fBzA5Vht0KFNOWF8OPvmqV5yM/VXq9A8pI6nv36siTtdi7 ZfOf7No9XP2rOpq5hsN/e1OiKG/sR1drCwhENH+OrdErFsBh99nAqH9FuyZU4ax0OsXr eFwg+EK4duf6qNcNBZNhxL40hrvHUier01ky4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=M/bmRWyocVSV2/6EXx+F/m48LyfncvPygtNimvasjpg=; b=FvTMElErD2Txu6zdUPXxnftb+vNlnjYupuVZqObuUAZgaXwqQ1wqxsz0GGA1MTn9vZ MSxWR8TXrTAtlvH6Z2E7I8WFUR6agL/gK8HPIrkU+Bz1hjQQfEnwXC6KKkD6Bu2KyeMl kOXbao973ayxP06y+VhvkTVAFaY3wzYyhVYQYwbE6Ssd3gjfYAG9oQvRX9cEMtALKSK8 YX/5nfFCQnJsVJ9gtm+L0B2dg7lb+OJUK6OXCeIZyXnYADW+A25VqJRvMkIG0cuRXV2M IwW725yfsz6xMKT44Mp0Auzky32m1ZaT8wX1L5AGaukH3JNySBRkHcAPDimYmlC1JKiR Dw9g== X-Gm-Message-State: AMCzsaWhV+xfWfeKWlz8nkgqFJH1D8MLId48cWBkTOMl0zZ+oPTd6qUQ rJ3E5a6eJrmSRR30zFTZjgxqow== X-Google-Smtp-Source: ABhQp+S98TY0hA3MMZhvQEiNHaohfUcUCU+09vO4g+rF3/34iBoH7rvf8TrPeTfvzyH02mRnifgafw== X-Received: by 10.223.148.227 with SMTP id 90mr3028401wrr.43.1508236522186; Tue, 17 Oct 2017 03:35:22 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: riku.voipio@iki.fi Date: Tue, 17 Oct 2017 11:35:14 +0100 Message-Id: <20171017103514.5859-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.14.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::22b Subject: [Qemu-devel] [PATCH] linux-user/main: support dfilter 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: =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org, Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 This adds the -dfilter support to linux-user. There is a minor checkpatch complaint about formatting which I've ignored for aesthetic reasons. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Laurent Vivier Reviewed-by: Richard Henderson --- v2 - add r-b tags - expand comment to mention checkpatch failure --- linux-user/main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/linux-user/main.c b/linux-user/main.c index 829f974662..5072aa855b 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -3854,6 +3854,11 @@ static void handle_arg_log(const char *arg) qemu_set_log(mask); } =20 +static void handle_arg_dfilter(const char *arg) +{ + qemu_set_dfilter_ranges(arg, NULL); +} + static void handle_arg_log_filename(const char *arg) { qemu_set_log_filename(arg, &error_fatal); @@ -4054,6 +4059,8 @@ static const struct qemu_argument arg_table[] =3D { {"d", "QEMU_LOG", true, handle_arg_log, "item[,...]", "enable logging of specified items " "(use '-d help' for a list of items)"}, + {"dfilter", "QEMU_DFILTER", true, handle_arg_dfilter, + "range[,...]","filter logging based on address range"}, {"D", "QEMU_LOG_FILENAME", true, handle_arg_log_filename, "logfile", "write logs to 'logfile' (default stderr)"}, {"p", "QEMU_PAGESIZE", true, handle_arg_pagesize, --=20 2.14.1