Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp874312ybg; Fri, 18 Oct 2019 08:38:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqwzr5oK/tdvHWyn9Jbj2OFc+S/WAX30g0sTK/jvftaSCETSdD8RIE2AspEAtEdurePi7xxa X-Received: by 2002:aa7:d3ca:: with SMTP id o10mr10360266edr.279.1571413085816; Fri, 18 Oct 2019 08:38:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571413085; cv=none; d=google.com; s=arc-20160816; b=URiWb6UdHOYGiwhW4QjMsUo3YSPm7CHVqZdQA/4o1811AFnU0mBVh6hF8cm9LKUw6H mEbiKARAesrHbT33VjrThPcm3RBqAB56juuSx3gHlu4XOCTpYEak6q+ni854tF6a72/R hiACpp5TfR1HXhCFvEQ56DthhwNjoFEOuZnNTUd4HlIM0Ri5tu45BUcmU+260jRDBN9R pCsQqyf6dmq7FbT4I/sA/bISd0WoQoCl2K8My+xOqnEs34HtZo+bbHlHiU/AMyQ5aShW hLQrpchwQhGGst/NQfoNtlYNAELel620WuOUTNS9PEi9CH1pgqkeJh5xqsU1OC8su5XP 9LBQ== 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=bMf+3n1o6CjctLeQ5J9Rrh/UOdyfvJ3h1AvwNRFkx2WWT9JCxEtlgVhC34u8e4GyID fk63WwdZt9UNgLk/xeeQIT7xpsHsOIgqKO7EnBM3xpALMi1cURu2terpKZfzq3vCP10R aWdOjU3E23AI+kpNP/ZE+iDZC9qwoM/oowNEFlF2QPbet4G8f9ZC3bJ0WJXpA87zmPYD nuT6UreXWmoMapFpBGb30zHqce9odZfPXrDvDpCewvZn4HXUQ39Jlc0JZDAAlufoIKoK Tbc0qxqlHrf4dZ2JwXWnJMNXmQO3Y6/Sg0iuKwhhlbIywY+AuCqCZCnxkXdLBZsAv9jo Uv4w== 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 r14si3694264eju.69.2019.10.18.08.37.42; Fri, 18 Oct 2019 08:38:05 -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 S2409275AbfJQK7w (ORCPT + 99 others); Thu, 17 Oct 2019 06:59:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60834 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2409262AbfJQK7s (ORCPT ); Thu, 17 Oct 2019 06:59:48 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 257CE8AC700; Thu, 17 Oct 2019 10:59:48 +0000 (UTC) Received: from krava.brq.redhat.com (unknown [10.43.17.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id CF74F5D71C; Thu, 17 Oct 2019 10:59:45 +0000 (UTC) From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: lkml , Ingo Molnar , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Michael Petlan , Andi Kleen , Stephane Eranian , Jin Yao , Alexey Budankov Subject: [PATCH 10/10] libperf: Add pr_err macro Date: Thu, 17 Oct 2019 12:59:18 +0200 Message-Id: <20191017105918.20873-11-jolsa@kernel.org> In-Reply-To: <20191017105918.20873-1-jolsa@kernel.org> References: <20191017105918.20873-1-jolsa@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.69]); Thu, 17 Oct 2019 10:59:48 +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