From patchwork Fri Oct 5 15:48:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 148199 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp615537lji; Fri, 5 Oct 2018 08:53:18 -0700 (PDT) X-Google-Smtp-Source: ACcGV60xCFBEdn4AqhC1ZO0NA2GC32xDMqxavDTOhUFQkXjIRupY6wZ6pH9ijB6J8om8MIVQO41Q X-Received: by 2002:ad4:4202:: with SMTP id k2-v6mr6732146qvp.164.1538754798275; Fri, 05 Oct 2018 08:53:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538754798; cv=none; d=google.com; s=arc-20160816; b=rM9fcbDc2cCCi5XUMtWyni8j76w0fslRPnB3D9vQKstYtzj4ZA771b7ERPvhwc7g3e sScc2WvSYdeEp829rEZaIZ7hcsNhWOTnyjdGQrN/n0ECrd2QTMbcHwppk0eRMKAp+s9j mJJCzyF7B96hLaTTuoWkZZcTioAs664P+Y0u+cxGb+84bQqlWSX233gySxEZ4brNMEQV 35npOGPwQ0DgylAHgl4iiigayqZWOxAlRlwQ16Lg8ZVE2la7dvMb6HLacij8XbfUkyro FgPzEQMimJrbXo/EJFHCbY0uIKsY/tcLoIISJBqARDjqxSyCyb0Rj6SkmYJCrfojLYn2 AtJA== 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; bh=3dtEqPV9HNNeCR5sykAVm1UXvMIxxZcWMmX2Ma4sNig=; b=D1FbLX910so6SaKCOSuPws2+nJ0jbCkyT6j7dOftgSf6r3R8lQS3ub3c7HFy3Cp7He EkKXYIcxwScPQ7zyxqP/Z85im2fFwfrWSwvGc0bIHbrWImQlYex6Q8thGy7aGWEukL1w 2OBD2SevTsQhrFGQojkPwpQSqKxykXGa0UfYFhO6jyE6mkUa9OOFqZNnFwocZLR7uXrb 4dL7YerY25Ai1gQpXKUwoihfntOVtxYsjHx+/V4bYt1km0DzmsUQOXGEcl1o/P0LJzXS mMIaF1Ik65NfO3iIoAEmblyqgbMV8nz1jhveIYo2xn1SsizvF0s6jlCYYZNkmDSdqfqI NtBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=PzdxG7Rt; 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 r31-v6si1400618qtd.29.2018.10.05.08.53.18 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 05 Oct 2018 08:53:18 -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=PzdxG7Rt; 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]:35717 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8SPl-0002W2-DZ for patch@linaro.org; Fri, 05 Oct 2018 11:53:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56901) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8SMA-0006aV-BI for qemu-devel@nongnu.org; Fri, 05 Oct 2018 11:49:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g8SM8-0006CU-IZ for qemu-devel@nongnu.org; Fri, 05 Oct 2018 11:49:34 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:34015) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g8SM8-00060C-2n for qemu-devel@nongnu.org; Fri, 05 Oct 2018 11:49:32 -0400 Received: by mail-wr1-x432.google.com with SMTP id z4-v6so14054148wrb.1 for ; Fri, 05 Oct 2018 08:49:14 -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=3dtEqPV9HNNeCR5sykAVm1UXvMIxxZcWMmX2Ma4sNig=; b=PzdxG7RtgFdQV+lAy6c2Gd31i2Xg7aiYFdPmcc1ubvepEcbTk4kiORmLn64oUPwgOS piFAlIo2kJXCVZs3CHpCJ8UkhL8B27wUqzm8+Zi9gzn8HGdgGp8DCnr8SsNpkiD6T+iK LUwoMbLysDanYLDCRnRDdVNDkzo0spQ53SKyQ= 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=3dtEqPV9HNNeCR5sykAVm1UXvMIxxZcWMmX2Ma4sNig=; b=DAfZZqLZvUnxE3XmMhFGwQ68I34nf2rSkHflJCu+ofvIc0QwVmzFtJjOLpZUoHiNkU V/5L5P3j0Fpd3hGVLwXZWxVPwLaV4+Vu7BuLVvRu4iVUUWMMstbsHSuuC7eYWfDoFpn8 7lf3EGknyzlUorv/0/qJwUxNVKBcak+pVcLASWy60RCNLar3yuBtz/UoXrJb86DpWw9e xBB9zKknGxuOYXvMl80fV8prwlS5UghVsnzZjfrUZRB4XrNrd4o2VJM8sfuZ42IR02X+ K4g2JVKZMLHm7HN4rkdIpf+7xkhrVOAtcublG9ABq2PRjKJ4FzEagKlNXmR7tKAZaBR1 HxJA== X-Gm-Message-State: ABuFfoiIdz4qEmWWjNkrZxW7hn6t3BYCbMs+yLlwNuHDGWLWL+rCZjKA +6yKX1MiyaV8t0gfiaYekl1EEw== X-Received: by 2002:adf:8022:: with SMTP id 31-v6mr9279849wrk.16.1538754553687; Fri, 05 Oct 2018 08:49:13 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id a205-v6sm2287543wmh.19.2018.10.05.08.49.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Oct 2018 08:49:12 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id D92593E0370; Fri, 5 Oct 2018 16:49:10 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Fri, 5 Oct 2018 16:48:51 +0100 Message-Id: <20181005154910.3099-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181005154910.3099-1-alex.bennee@linaro.org> References: <20181005154910.3099-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::432 Subject: [Qemu-devel] [RFC PATCH 02/21] util/log: add qemu_dfilter_append_range() 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: cota@braap.org, =?utf-8?q?Alex_Benn=C3=A9e?= , vilanova@ac.upc.edu, Pavel.Dovgaluk@ispras.ru Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This allows us to add to the dfilter range as we go. Signed-off-by: Alex Bennée --- include/qemu/log.h | 1 + util/log.c | 6 ++++++ 2 files changed, 7 insertions(+) -- 2.17.1 Reviewed-by: Richard Henderson diff --git a/include/qemu/log.h b/include/qemu/log.h index 8ed932ec24..f915b5bd91 100644 --- a/include/qemu/log.h +++ b/include/qemu/log.h @@ -117,6 +117,7 @@ void qemu_log_needs_buffers(void); void qemu_set_log_filename(const char *filename, Error **errp); void qemu_set_dfilter_ranges(const char *ranges, Error **errp); void qemu_reset_dfilter_ranges(void); +void qemu_append_dfilter_range(Range r, Error **errp); bool qemu_log_in_addr_range(uint64_t addr); int qemu_str_to_log_mask(const char *str); diff --git a/util/log.c b/util/log.c index c6c197cbb3..cc79a146d1 100644 --- a/util/log.c +++ b/util/log.c @@ -233,6 +233,12 @@ out: g_strfreev(ranges); } +void qemu_append_dfilter_range(Range r, Error **errp) +{ + maybe_allocate_dfilter(1); + g_array_append_val(debug_regions, r); +} + /* fflush() the log file */ void qemu_log_flush(void) {