Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp794432ybe; Fri, 13 Sep 2019 06:30:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqwuXh2X9xcIdWZq+ZMKj0a0iBwEZQXdVREwCtXvbQkLwkgQYbniSKFLUGkxtXPSEVvDoPO8 X-Received: by 2002:a17:906:11c6:: with SMTP id o6mr7212782eja.132.1568381411144; Fri, 13 Sep 2019 06:30:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568381411; cv=none; d=google.com; s=arc-20160816; b=ZA3KC0mQfHgUqJHMPNcG9iOleF2qatg2CWz1xabeOtOS8X8Chr1DhyPtVp5HNr2Isq zCK6AH14M63vDex6OV5aCHrO3/x1GFqse222I2B6hYcbYNzaqX/tBm3EEfFkDeFjf7LI tovctPQPnvhv5WJJ0OEYtPJMvmdqE84Oimb5PZapWOECVO/v6k+nuki5qwyPMP7CTNtx dAXvCQlK07cgcqwXKZgYpslkrvZ3l5hNfPIwm66GCp1jb0ED/sER3TC4gOJ97dpw977q FMlRmdtZ7xGysHRRnlUq+G93fpV3O8xwF5Q/7/UXHJaSF6m5pozksX9DNIfC2uYDMHSZ Usmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=gJyVrA+AyJ3EzxKiNe2jjVgJgw5Iz2AXAgMu1xG4VlI=; b=0Gc/jR7ZlPMdNI6b29TXxQIUN5AwtaWehHQ73Vyv5vuuDOCCtNqXGkzwP9hqUgYuL0 DGIfhCT5QIR9zl4eDK6pjiC24oiAjWHKkIIhcTwZUuwStv32tH1dIZRLbW+hlpBamW8a 7ix8mft9UzTnEDSfGoNXGu7/v/4ftOFJNtBnFurA4OPjBzzDJ84duRGlkuItxY7ij6CC 20m6sx0WJga9ITerPf+iCODlRj7rETevvA1kLL6BkPHopNmVoQ6BQhZpP7BbwPPJF4P7 qakGTh3GE5NHsx1hspEsImZMqR9x1iUZPtUS59Vwp/XaahhcedFRbeXpIunuS8YYAdqY uV8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id um14si14861702ejb.343.2019.09.13.06.29.41; Fri, 13 Sep 2019 06:30:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391594AbfIMN04 (ORCPT + 99 others); Fri, 13 Sep 2019 09:26:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54350 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390732AbfIMN0y (ORCPT ); Fri, 13 Sep 2019 09:26:54 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BDFE6308402D; Fri, 13 Sep 2019 13:26:51 +0000 (UTC) Received: from krava.brq.redhat.com (unknown [10.43.17.36]) by smtp.corp.redhat.com (Postfix) with ESMTP id 56B925C1D4; Fri, 13 Sep 2019 13:26:49 +0000 (UTC) From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: lkml , Ingo Molnar , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Michael Petlan Subject: [PATCH 73/73] libperf: Add pr_err macro Date: Fri, 13 Sep 2019 15:23:55 +0200 Message-Id: <20190913132355.21634-74-jolsa@kernel.org> In-Reply-To: <20190913132355.21634-1-jolsa@kernel.org> References: <20190913132355.21634-1-jolsa@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Fri, 13 Sep 2019 13:26:51 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org And missing include for "perf/core.h" header, which provides LIBPERF_* debug levels and adding missing pr_err support. Link: http://lkml.kernel.org/n/tip-sgq5yeyvitp655s2iq3e75ls@git.kernel.org Signed-off-by: Jiri Olsa --- tools/perf/lib/include/perf/core.h | 1 + tools/perf/lib/internal.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/tools/perf/lib/include/perf/core.h b/tools/perf/lib/include/perf/core.h index 2a80e4b6f819..a3f6d68edad7 100644 --- a/tools/perf/lib/include/perf/core.h +++ b/tools/perf/lib/include/perf/core.h @@ -9,6 +9,7 @@ #endif enum libperf_print_level { + LIBPERF_ERR, LIBPERF_WARN, LIBPERF_INFO, LIBPERF_DEBUG, diff --git a/tools/perf/lib/internal.h b/tools/perf/lib/internal.h index 37db745e1502..2c27e158de6b 100644 --- a/tools/perf/lib/internal.h +++ b/tools/perf/lib/internal.h @@ -2,6 +2,8 @@ #ifndef __LIBPERF_INTERNAL_H #define __LIBPERF_INTERNAL_H +#include + void libperf_print(enum libperf_print_level level, const char *format, ...) __attribute__((format(printf, 2, 3))); @@ -11,6 +13,7 @@ do { \ libperf_print(level, "libperf: " fmt, ##__VA_ARGS__); \ } while (0) +#define pr_err(fmt, ...) __pr(LIBPERF_ERR, fmt, ##__VA_ARGS__) #define pr_warning(fmt, ...) __pr(LIBPERF_WARN, fmt, ##__VA_ARGS__) #define pr_info(fmt, ...) __pr(LIBPERF_INFO, fmt, ##__VA_ARGS__) #define pr_debug(fmt, ...) __pr(LIBPERF_DEBUG, fmt, ##__VA_ARGS__) -- 2.21.0