From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752776AbbJQKt6 (ORCPT ); Sat, 17 Oct 2015 06:49:58 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:7870 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752308AbbJQKtW (ORCPT ); Sat, 17 Oct 2015 06:49:22 -0400 From: Wang Nan To: , , CC: , , , , , , , , , , , , Wang Nan Subject: [RFC PATCH 0/7] perf tools: Config BPF maps through perf cmdline Date: Sat, 17 Oct 2015 10:48:23 +0000 Message-ID: <1445078910-73699-1-git-send-email-wangnan0@huawei.com> X-Mailer: git-send-email 1.8.3.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.107.193.248] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch set is based on commit d2f820885d8e ("perf tools: Pass available CPU number to clang compiler") in my git tree [1]. It replaces the old four patches in the git tree with improved solution. In these 7 patches: 1. perf is able to put values into map: # perf record -e mybpf.c/maps.values.value=1234/ ... 2. perf is able to control different slots in a map separately: # perf record -e mybpf.c/maps.values.value[1,4-6]=1234,maps.values.value[0,2-3]=5678/ ... 3. The second syntax can be applied to perf event also: # perf record -v -a -e evt=cycles -e mybpf.c/maps.pmu_map.event[0]=evt/ ... 4. Compatible with the old syntax: # perf record -v -a -e evt=cycles -e mybpf.c/maps.pmu_map.event=evt/ ... [1] git://git.kernel.org/pub/scm/linux/kernel/git/pi3orama/linux.git perf/ebpf He Kuang (1): perf record: Apply config to BPF objects before recording Wang Nan (6): perf tools: Add API to config maps in bpf object perf tools: Add API to apply config to BPF map perf tools: Enable BPF object configure syntax perf tools: Support setting different slots in a BPF map separately perf tools: Enable indics setting syntax for BPF maps perf tools: Enable passing event to BPF object tools/perf/builtin-record.c | 11 + tools/perf/util/bpf-loader.c | 515 +++++++++++++++++++++++++++++++++++++++++ tools/perf/util/bpf-loader.h | 42 ++++ tools/perf/util/parse-events.c | 60 ++++- tools/perf/util/parse-events.h | 5 +- tools/perf/util/parse-events.l | 11 + tools/perf/util/parse-events.y | 113 ++++++++- 7 files changed, 748 insertions(+), 9 deletions(-) -- 1.8.3.4