All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Song Liu <song@kernel.org>
Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com,
	acme@redhat.com, namhyung@kernel.org, jolsa@kernel.org,
	songliubraving@fb.com
Subject: Re: [PATCH v5 5/5] perf-stat: introduce bpf_counter_ops->disable()
Date: Tue, 27 Apr 2021 16:42:02 -0300	[thread overview]
Message-ID: <YIhpCuTPWPwURiQh@kernel.org> (raw)
In-Reply-To: <YIhlmhyBPxTOZRZa@kernel.org>

Em Tue, Apr 27, 2021 at 04:27:22PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Sun, Apr 25, 2021 at 02:43:33PM -0700, Song Liu escreveu:
> > Introduce bpf_counter_ops->disable(), which is used stop counting the
> > event.
> 
> [acme@five perf]$ perf test -v python
> Couldn't bump rlimit(MEMLOCK), failures may take place when creating BPF maps, etc
> 19: 'import perf' in python                                         :
> --- start ---
> test child forked, pid 1497924
> python usage test: "echo "import sys ; sys.path.append('/tmp/build/perf/python'); import perf" | '/usr/bin/python3' "
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> ImportError: /tmp/build/perf/python/perf.cpython-39-x86_64-linux-gnu.so: undefined symbol: bpf_counter__disable
> test child finished with -1
> ---- end ----
> 'import perf' in python: FAILED!
> [acme@five perf]$
> 
> I'll fix this up in my local tree, if you need to respin, please pick
> patches from tmp.perf/core, will refresh it later today.

Added this:


diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c
index 278abecb5bdfc0d2..27940edb161c2d8c 100644
--- a/tools/perf/util/python.c
+++ b/tools/perf/util/python.c
@@ -100,6 +100,11 @@ int bpf_counter__install_pe(struct evsel *evsel __maybe_unused, int cpu __maybe_
 	return 0;
 }
 
+int bpf_counter__disable(struct evsel *evsel __maybe_unused)
+{
+	return 0;
+}
+
 /*
  * Support debug printing even though util/debug.c is not linked.  That means
  * implementing 'verbose' and 'eprintf'.



      reply	other threads:[~2021-04-27 19:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-25 21:43 [PATCH v5 0/5] perf util: bpf perf improvements Song Liu
2021-04-25 21:43 ` [PATCH v5 1/5] perf util: move bpf_perf definitions to a libperf header Song Liu
2021-04-25 21:43 ` [PATCH v5 2/5] perf bpf: check perf_attr_map is compatible with the perf binary Song Liu
2021-04-25 21:43 ` [PATCH v5 3/5] perf-stat: introduce config stat.bpf-counter-events Song Liu
2021-04-25 21:43 ` [PATCH v5 4/5] perf-stat: introduce ':b' modifier Song Liu
2021-04-25 21:43 ` [PATCH v5 5/5] perf-stat: introduce bpf_counter_ops->disable() Song Liu
2021-04-26 21:27   ` Jiri Olsa
2021-04-26 22:18     ` Song Liu
2021-04-27 12:33       ` Jiri Olsa
2021-04-27 19:30         ` Song Liu
2021-04-29 22:40           ` Song Liu
2021-05-03 14:09             ` Jiri Olsa
2021-05-03 15:25               ` Arnaldo Carvalho de Melo
2021-04-27 19:27   ` Arnaldo Carvalho de Melo
2021-04-27 19:42     ` Arnaldo Carvalho de Melo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YIhpCuTPWPwURiQh@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=jolsa@kernel.org \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.org \
    --cc=song@kernel.org \
    --cc=songliubraving@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.