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: 979550 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="PzdxG7Rt"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42RZ6m5XvDz9s3C for ; Sat, 6 Oct 2018 01:53:36 +1000 (AEST) Received: from localhost ([::1]:35717 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8SQ2-0002W2-BO for incoming@patchwork.ozlabs.org; Fri, 05 Oct 2018 11:53:34 -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-Google-Smtp-Source: ACcGV61IGyf8f4xZ6ETWOae499MeQFWP9Aq5N4lxvi68eMBzfvKSEjPxv1XYTn8npk7tuSByyGwb2w== 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This allows us to add to the dfilter range as we go. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- include/qemu/log.h | 1 + util/log.c | 6 ++++++ 2 files changed, 7 insertions(+) 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) {