Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2146209imm; Thu, 9 Aug 2018 08:03:24 -0700 (PDT) X-Google-Smtp-Source: AA+uWPz962oYGZWF46elz05T44TPUdl+nz4nJP/ENzSRpDhJPd75KcFh+8K4OvldNktgz5suFqSP X-Received: by 2002:a17:902:9a8b:: with SMTP id w11-v6mr2387339plp.333.1533827004567; Thu, 09 Aug 2018 08:03:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533827004; cv=none; d=google.com; s=arc-20160816; b=rYELjFMhEgWyy3a0sMxhUwPc51nNlFNiMhcaOmzZ4z/uCpkoYmHpAKJ/IjXOOTSlUr bPWuK0SRpm/l6qDf2ZEuCvybIKN0JsJ1PUHkpoDy6jLngbwe1D6gh4ldULa+1zrHR2F4 Aai5zt6btXCD+ESWCi/zlbkU8c6AwbLcOGlLv/ZCd5cE+noDPJnpTg7yQrtFII31Lh4s XxMhKWg0wu03Ecv5s9XxbPOesTJ/kSg5ukJrmVef4SLw1GkZu7Z1hO3wcy5z3EwdhpiC 2vHMuOIy1bglv53lRM6CMBbM6DdG+CNX4nkeHnztCl78i3Vw99yXFTIJ1Vqm1gt0N1Pf DVow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=TXt7FXqSf7yJ4DZOOJyFG/13tG92oXOaWXfxqOoYfvA=; b=tFsAOzT9ZFYeDqF6dyebB9p6ZkqcXJMLABFF93kICxM1vureLpxqvFH9qHtgsBIl7I XpusAWSy0/tkW3xbCNiV32YAFzHa3bicXwDUB2K58CH1x6U2sNZoNV+j8xU04RGyDx8m kV+fSqy/H9sPze3sckc7+rjacIboqB4KzhRv8BZ5nUAi78DsWuaLDG7byu8z/lpIdD6M hXF3hyqiduSrv6YiKd5PttK1i25fu/I+YCvk0lgiLtpJYGF0kEOt5lMrlnQyzND060nW lBaWqQYjEb4vAmK7JjMYkwLy3KL5TbwZTRyRnsoy+dsGhi/FCTk1sxV4H8PoehCRdQYw 0h0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="YWFekC/u"; 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=pass (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 z188-v6si7393976pfb.26.2018.08.09.08.03.10; Thu, 09 Aug 2018 08:03:24 -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; dkim=pass header.i=@kernel.org header.s=default header.b="YWFekC/u"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733161AbeHIR0v (ORCPT + 99 others); Thu, 9 Aug 2018 13:26:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:38914 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730634AbeHIR0u (ORCPT ); Thu, 9 Aug 2018 13:26:50 -0400 Received: from jouet.infradead.org (179-240-153-38.3g.claro.net.br [179.240.153.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 49F242183D; Thu, 9 Aug 2018 15:01:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1533826893; bh=Q9RAoZ3nDFwM+cal/MS8O3GIdJy0GgG4WDNiTpJJAZ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YWFekC/uuVVwMKESnwwleUwprnrfcxeUwlyI4KwsujvdrZciIzt00ZeIKWA8jMy9W 4r8hDGGcIKlmv3NebW03NX/hcW5wI2cMJrIsISHh3k05GnS5aK4r9AboNLclQ3LKNf Q9s9S+8Bcp9Obg5TcoVpCDo+ddiUU5mf1U9rjFTY= From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Arnaldo Carvalho de Melo , Adrian Hunter , David Ahern , Jiri Olsa , Namhyung Kim , Wang Nan Subject: [PATCH 37/44] perf bpf: Add bpf__setup_output_event() strerror() counterpart Date: Thu, 9 Aug 2018 11:58:15 -0300 Message-Id: <20180809145822.21391-38-acme@kernel.org> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180809145822.21391-1-acme@kernel.org> References: <20180809145822.21391-1-acme@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnaldo Carvalho de Melo That is just bpf__strerror_setup_stdout() renamed to the more general "setup_output_event" method, keep the existing stdout() as a wrapper. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-nwnveo428qn0b48axj50vkc7@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/bpf-loader.c | 4 ++-- tools/perf/util/bpf-loader.h | 15 +++++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/tools/perf/util/bpf-loader.c b/tools/perf/util/bpf-loader.c index 95a27bb6f1a1..80dead642719 100644 --- a/tools/perf/util/bpf-loader.c +++ b/tools/perf/util/bpf-loader.c @@ -1791,8 +1791,8 @@ int bpf__strerror_apply_obj_config(int err, char *buf, size_t size) return 0; } -int bpf__strerror_setup_stdout(struct perf_evlist *evlist __maybe_unused, - int err, char *buf, size_t size) +int bpf__strerror_setup_output_event(struct perf_evlist *evlist __maybe_unused, + int err, char *buf, size_t size) { bpf__strerror_head(err, buf, size); bpf__strerror_end(buf, size); diff --git a/tools/perf/util/bpf-loader.h b/tools/perf/util/bpf-loader.h index 6be0eec043c6..8eca75145ac2 100644 --- a/tools/perf/util/bpf-loader.h +++ b/tools/perf/util/bpf-loader.h @@ -83,9 +83,7 @@ int bpf__strerror_apply_obj_config(int err, char *buf, size_t size); int bpf__setup_stdout(struct perf_evlist *evlist); int bpf__setup_output_event(struct perf_evlist *evlist, const char *name); -int bpf__strerror_setup_stdout(struct perf_evlist *evlist, int err, - char *buf, size_t size); - +int bpf__strerror_setup_output_event(struct perf_evlist *evlist, int err, char *buf, size_t size); #else #include @@ -200,11 +198,16 @@ bpf__strerror_apply_obj_config(int err __maybe_unused, } static inline int -bpf__strerror_setup_stdout(struct perf_evlist *evlist __maybe_unused, - int err __maybe_unused, char *buf, - size_t size) +bpf__strerror_setup_output_event(struct perf_evlist *evlist __maybe_unused, + int err __maybe_unused, char *buf, size_t size) { return __bpf_strerror(buf, size); } + #endif + +static inline int bpf__strerror_setup_stdout(struct perf_evlist *evlist, int err, char *buf, size_t size) +{ + return bpf__strerror_setup_output_event(evlist, err, buf, size); +} #endif -- 2.14.4