Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4262081ybp; Mon, 7 Oct 2019 05:58:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqxMjPeOCkkt39s/tIRi/hPIjm5JTE3RlKmZyNIcthQOEyh6OS0qcod1H1J88kapvTAviuCA X-Received: by 2002:a17:906:7f18:: with SMTP id d24mr4752193ejr.82.1570453114077; Mon, 07 Oct 2019 05:58:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570453114; cv=none; d=google.com; s=arc-20160816; b=O+NXguFGJ+Fu0+7wCf9Djs5T6YEA3rqrSC98i6+uTckhQpGiUxktstiiMsJJEyQyrj pU2lwjZSwiT8zpJFT4oHNlZIj9g5C3HR1AKm5I0XPnkJSIfVZm3JAwalRUqKVvfHy/KC n402PHHtzhrXiCO0vZHw/T3pKqMwTNxDjT2g5CYiwrASlO0KhSH9PlPuY/d0HQUC+fjY xCd2+wR8ydmUY0keHUl1F/j82t8/uaxIEhrfY61hdI47tNA9aQomksyZ2aW6ejIxcGQ8 jZa3JsMvOqMZ4IgDpwpubzK0JvdWbokVsJz7CpZn1P30Zt6hkDp0Lz87zQsRzyiLftEE V8WQ== 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=LW9+AMKcZ2RDKea2ZejTBR59cKxqXyAl8FcjJxR/GnMpALJ3ORoi4wQ0Ka7/Kh/riw OteakTUWlr0iInVnXaJOMCOMS3SaqZJLWdvdSGloFJhBOC3t6/8cFi/bvNZyvntfQeyX B9Tmaab1Fj7I9DdGSyc5rPnyG2KTBhOcSNmdZX3YVwMNU2jJtQXfUllxfarLl0alTBRQ slJYWwdJcXl3QegibwHS2zn4qNWPbw6VcXQosi1YvsZSxfQjlVc2NcqgvgjUbGn5/f80 uNGAxLpTQbZ8viLGG9WCfAgRfhmp0XQBmWKuCM1/RsgjUhGJjdDddH50RrcX7tuotFr8 7Spg== 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 m1si7005735ejb.44.2019.10.07.05.58.10; Mon, 07 Oct 2019 05:58:34 -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 S1728567AbfJGMzM (ORCPT + 99 others); Mon, 7 Oct 2019 08:55:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:27650 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728545AbfJGMzL (ORCPT ); Mon, 7 Oct 2019 08:55:11 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E2AF830A7B9A; Mon, 7 Oct 2019 12:55:10 +0000 (UTC) Received: from krava.brq.redhat.com (unknown [10.43.17.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4668A5D9CC; Mon, 7 Oct 2019 12:55:09 +0000 (UTC) From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: lkml , Ingo Molnar , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Michael Petlan Subject: [PATCH 36/36] libperf: Add pr_err macro Date: Mon, 7 Oct 2019 14:53:44 +0200 Message-Id: <20191007125344.14268-37-jolsa@kernel.org> In-Reply-To: <20191007125344.14268-1-jolsa@kernel.org> References: <20191007125344.14268-1-jolsa@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Mon, 07 Oct 2019 12:55:11 +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