Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2146355imm; Thu, 9 Aug 2018 08:03:29 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzm1q7mvVfoFfwuLnLronHdtTkogQrU7Ds1TrIDvwDrJrSdy7VywZ2HBY3T81OrANjL3k+D X-Received: by 2002:a63:fb07:: with SMTP id o7-v6mr2561674pgh.333.1533827009579; Thu, 09 Aug 2018 08:03:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533827009; cv=none; d=google.com; s=arc-20160816; b=zAsDcCWoXHL5/0JUwsjvfmUvnKQBLwIf9zqdZpO/O1FKOuVNPh84bwJVRNewZExl6O xZ5pToTaZotQoeou4LbNB5m1jZH4058Gv8EaLyWktkaks/+7D3W1df7rFztlhzzB/Fsb DvIWHCUcijaMzC7mmJYKkTbzNXZefjNkFnxZyhbHba3k7KVUSkpZonFFvQlgTfoTfVmU mJdW5CvbjvlyvA1OuUEhT/2s9nN9lp2eP1ZNNH6DZnJkaBG43m3MmG5jPsnQZyJwI7ql bGlHg4iqsMrKgY56rj7nhfE9hsWIesdY/CV4cHX3HyzDE/MeOEqISTdVmOjyKJpRWJPt 7ZDA== 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=gngnIXjC0e2JSBRuy3RJMB0OAtS0XVUAjMoybr27bkg=; b=Vqa6PtvWXqy/IxJkCTK4ECumkzTsR/lBkwc4YDOkUeWoHurt4SJA0topkmqw0LJ2rx 5JdgUOWGQPDJwG2h+/QTHxxi+q0bhA96wXd2jsZPjdDaDyuBr830hhvpSJ5K7eDyNNQH s8v6Nvt5wtqV91GkpHofNb7k/ts+We9PGAqKXEAMUxlclKHE9CAUrfFZCyApRzUFIksE 9wkSL7FaDwFG62b/CmgMdWYNWL9mA1rgiI8xzjGG4Ll7dd9istNCKJjazFLnE2MgAS8G AM1MAnxHQ/HE+Qe856dD6HdbcsA98MO/MLoHU8fBDBopGh0Uqdwvyvr3hbok2h0B2RO3 hWtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2ikF1wLL; 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 a20-v6si7297991pgb.600.2018.08.09.08.03.15; Thu, 09 Aug 2018 08:03:29 -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=2ikF1wLL; 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 S1733175AbeHIR0z (ORCPT + 99 others); Thu, 9 Aug 2018 13:26:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:39016 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730634AbeHIR0y (ORCPT ); Thu, 9 Aug 2018 13:26:54 -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 CDD3C21D62; Thu, 9 Aug 2018 15:01:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1533826897; bh=vfkCU3/XhDr04yYhv/AK7zeq6XzLa9mC3mHh89ZQ2Q4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2ikF1wLLqg52mKQRKC43vUwLMjz/ENsXCnMdJ98YtpqJClwj68LgTVY5e/tnZlmg/ 2VH1e1i9TBoHXBM79FMBaDcluSYVEw7kr+bO2i0mBbbrlS3RG1eCU2o7wA5ebVv8U0 TWBfGteSBkeYeI5wzav4IKSfUw09ZLV/Oz/YlsNE= 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 38/44] perf bpf: Add wrappers to BPF_FUNC_probe_read(_str) functions Date: Thu, 9 Aug 2018 11:58:16 -0300 Message-Id: <20180809145822.21391-39-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 Will be used shortly in the augmented syscalls work together with a PERF_COUNT_SW_BPF_OUTPUT software event to insert syscalls + pointer contents in the perf ring buffer, to be consumed by 'perf trace' beautifiers. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-ajlkpz4cd688ulx1u30htkj3@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/include/bpf/bpf.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/perf/include/bpf/bpf.h b/tools/perf/include/bpf/bpf.h index 1f632b56bb34..47897d65e799 100644 --- a/tools/perf/include/bpf/bpf.h +++ b/tools/perf/include/bpf/bpf.h @@ -30,4 +30,7 @@ struct bpf_map { char _license[] SEC("license") = #name; \ int _version SEC("version") = LINUX_VERSION_CODE; +static int (*probe_read)(void *dst, int size, const void *unsafe_addr) = (void *)BPF_FUNC_probe_read; +static int (*probe_read_str)(void *dst, int size, const void *unsafe_addr) = (void *)BPF_FUNC_probe_read_str; + #endif /* _PERF_BPF_H */ -- 2.14.4