From patchwork Wed Oct 18 12:33:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 116280 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp6012580qgn; Wed, 18 Oct 2017 05:34:15 -0700 (PDT) X-Received: by 10.55.215.153 with SMTP id t25mr2181370qkt.285.1508330055169; Wed, 18 Oct 2017 05:34:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508330055; cv=none; d=google.com; s=arc-20160816; b=J9ChXNrK34jw9nctjKNEVreCntOvDI4LFTeoMSdUGK3GppFZMGCWbIh3Bl1dOgKozV Kn2dOyQr/PxsFhKzHvPLs1Mz1B5kSk4agaAzVsicIdpv4fPz0EK/c5XBYfkHv3ZhmHSE c5CXX6mXau35KaCXmKJDBj3JgD1UaKWVb3kuaCUx0wIWvucqy6ltCfFIM9txOFxNq+iP 0OBa82aoFJnNoZ6ODU0hFNqeurxzsAgu5TJR4zUfxuQ6C4ZGUfRSkHU4rI14cG5MagT0 eJjpCCQIuKbNKJxStFMOqbUTyuTkiKEZYdtISMvgbfG8qUTd6JtjRyXHiMNH9OrI4gYK HBWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=a6Fx/kvZnuCI53JZEHGshgwcKPKG0/PHcayuflh6CVA=; b=DDXhC7r+VaW25qpJRWEB0DhCCk+GXu50HyPl+4aEwv6yo/pthR+PN9iDd2vC4eSXFE JNrPSMo1wo7KjjqxCxmu0fhDRlxpz1P9tUnhCVkqoxRv9X5Bj+XM7XVKYDTK40GMj+7u HYmn7kGuz29DpXjqlwqiyx8Zc/p57IqQvYJ8wa4u0cYRP7lMmXh3kEVnGw+biejAjRu0 xXBlTxFkWxfKZAASG+sJiQ0NKnJaUGTt0iJbB1WXxX85Oi5W+vuZBJ1nyXf4oc1XwaBZ FDnFAxiH/JLEBHPA2sw9wtIzG7dAP5wULy9uGLN3E0PwefhgEtj5BT5sb/gM6YEs1Gj+ Lg3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=L29KteA1; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id z4si1080550qkf.140.2017.10.18.05.34.14 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 18 Oct 2017 05:34:15 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=L29KteA1; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:44430 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4nY5-0005LA-3H for patch@linaro.org; Wed, 18 Oct 2017 08:34:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58656) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4nXe-0005HZ-0U for qemu-devel@nongnu.org; Wed, 18 Oct 2017 08:33:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e4nXa-0003zt-Ij for qemu-devel@nongnu.org; Wed, 18 Oct 2017 08:33:46 -0400 Received: from mail-lf0-x242.google.com ([2a00:1450:4010:c07::242]:56610) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e4nXa-0003zc-Bm for qemu-devel@nongnu.org; Wed, 18 Oct 2017 08:33:42 -0400 Received: by mail-lf0-x242.google.com with SMTP id 90so5615949lfs.13 for ; Wed, 18 Oct 2017 05:33:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=a6Fx/kvZnuCI53JZEHGshgwcKPKG0/PHcayuflh6CVA=; b=L29KteA1E6dWy8PAw/8Qqn9U5UPoj9mgH+ivkmnKOMouGQchxjL0e0Njxk+tz3z4bw W7OGh1flQwi4f8CXRg1N2f9rZGyOPoqeepKK0pfjC3aselZebv16ELX4hR6sRhYctrNG a3UdLufM+erOLdRBIkFN4lB6b3lrBxeFWL/ys= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=a6Fx/kvZnuCI53JZEHGshgwcKPKG0/PHcayuflh6CVA=; b=pRCn8kLNQWAuysx7cJGItX0sTWBc61cU7dQjb8o/Qy2O5yQSmleJk41JpymR15unMk 2TdQs6H5paa3+W7Cy+Rvn4uhhcOdxmIycLPvEly8AoO0duIDtp7Ca7UiXM4+tIG97zWm ycPv/jcYZ+jGhOynQJ6EqL2UFjWi52MMzT5sU8jhJmkHxNeABf6t+wMK0eXTRNsDawaw mSzljL7diuaYnh8VnPgbRrZ/zdYqoQpJKX/DkSyqhqoJps261Nn8fuktCoYJwTbwai8Y HPILyZLbrvLmJmBHR125jtsnCuKt5G4W6hweQ8d77fwesgF58P6AnJLt/FV5A2tZu3eE qHGA== X-Gm-Message-State: AMCzsaU3kkGkHra4dxh8S425bzFYSjt3sqzDnUJTORQt7yMSi/rgttcS jxWu8zYa3yE604leKwUT6iMel8lijS4= X-Google-Smtp-Source: ABhQp+RDNDlZDfiYbmYw27VxHi12zfWPBh1JXTq6CDhXwI60ZnfFuWbiApMj0gE+7+9gAOfjwRXCxw== X-Received: by 10.25.59.90 with SMTP id i87mr5014990lfa.46.1508330020907; Wed, 18 Oct 2017 05:33:40 -0700 (PDT) Received: from berserk.kos.to (91-157-170-157.elisa-laajakaista.fi. [91.157.170.157]) by smtp.gmail.com with ESMTPSA id j71sm2590718lfk.6.2017.10.18.05.33.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Oct 2017 05:33:39 -0700 (PDT) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Wed, 18 Oct 2017 15:33:23 +0300 Message-Id: <8423fa9010f2cadd50e8c21a20c62dc5b977704c.1508329282.git.riku.voipio@linaro.org> X-Mailer: git-send-email 2.14.2 In-Reply-To: References: MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::242 Subject: [Qemu-devel] [PULL 09/10] 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_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Alex Bennée 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ée Reviewed-by: Laurent Vivier Reviewed-by: Richard Henderson Signed-off-by: Riku Voipio --- linux-user/main.c | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.14.2 diff --git a/linux-user/main.c b/linux-user/main.c index fd54d344bb..dde04c769a 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -3869,6 +3869,11 @@ static void handle_arg_log(const char *arg) qemu_set_log(mask); } +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); @@ -4066,6 +4071,8 @@ static const struct qemu_argument arg_table[] = { {"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,