On Tue, May 21, 2024 at 1:04 AM Petr Mladek wrote:
[...]
> >
> > Yes, but the information you get is limited compared to what is available
> > now. You would obtain the information that a patched function was called
> > but ftrace could also give you the context and more.
>
> Another motivation
this by calling kallsyms_on_each_match_symbol without the postfix;
and then match the full name (with postfix) in klp_match_callback.
Signed-off-by: Song Liu
---
include/linux/kallsyms.h | 13 +
kernel/kallsyms.c| 21 -
kernel/livepatch/core.c | 32
g
> warnings when the initial allocation fails but there is a fallback range
> defined.
>
> Signed-off-by: Mike Rapoport (IBM)
> Acked-by: Will Deacon
nit: We should probably move the logic for ARCH_WANTS_EXECMEM_LATE
to a separate patch.
Otherwise,
Acked-by: Song Liu
ture does
> not implement execmem_arch_setup(), execmem_alloc() will fall back to
> module_alloc().
>
> Signed-off-by: Mike Rapoport (IBM)
Acked-by: Song Liu
will be used to identify the calling subsystem and to
> allow architectures define parameters for ranges suitable for that
> subsystem.
>
> No functional changes.
>
> Signed-off-by: Mike Rapoport (IBM)
> Acked-by: Masami Hiramatsu (Google)
Acked-by: Song Liu
On Fri, Apr 26, 2024 at 1:30 AM Mike Rapoport wrote:
>
> From: "Mike Rapoport (IBM)"
>
> Move the logic related to the memory allocation and freeing into
> module_memory_alloc() and module_memory_free().
>
> Signed-off-by: Mike Rapoport (IBM)
Acked-by: Song Liu
Hi Masami and Mike,
On Sat, Apr 20, 2024 at 2:11 AM Masami Hiramatsu wrote:
[...]
> > >
> > > IIUC, we need to update __execmem_cache_alloc() to take a range pointer as
> > > input. module text will use "range" for EXECMEM_MODULE_TEXT, while kprobe
> > > will use "range" for EXECMEM_KPROBE.
On Fri, Apr 19, 2024 at 1:00 PM Mike Rapoport wrote:
>
> On Fri, Apr 19, 2024 at 10:32:39AM -0700, Song Liu wrote:
> > On Fri, Apr 19, 2024 at 10:03 AM Mike Rapoport wrote:
> > [...]
> > > > >
> > > > > [1]
> > > > > https
On Fri, Apr 19, 2024 at 10:03 AM Mike Rapoport wrote:
[...]
> > >
> > > [1] https://lore.kernel.org/all/20240411160526.2093408-1-r...@kernel.org
> >
> > For the ROX to work, we need different users (module text, kprobe, etc.) to
> > have
> > the same execmem_range. From [1]:
> >
> > static void
On Thu, Apr 18, 2024 at 11:56 PM Mike Rapoport wrote:
>
> On Thu, Apr 18, 2024 at 02:01:22PM -0700, Song Liu wrote:
> > On Thu, Apr 18, 2024 at 10:54 AM Mike Rapoport wrote:
> > >
> > > On Thu, Apr 18, 2024 at 09:13:27AM -0700, Song Liu wrote:
> > >
On Thu, Apr 18, 2024 at 10:54 AM Mike Rapoport wrote:
>
> On Thu, Apr 18, 2024 at 09:13:27AM -0700, Song Liu wrote:
> > On Thu, Apr 18, 2024 at 8:37 AM Mike Rapoport wrote:
> > > > >
> > > > > I'm looking at execmem_types more as definition of the cons
On Thu, Apr 18, 2024 at 8:37 AM Mike Rapoport wrote:
>
[...]
> >
> > Is +/- 2G enough for all realistic use cases? If so, I guess we don't
> > really need
> > EXECMEM_ANYWHERE below?
> >
> > > >
> > > > * I'm not sure about BPF's requirements; it seems happy doing the same
> > > > as
> > > >
On Tue, Apr 16, 2024 at 12:23 AM Mike Rapoport wrote:
>
> On Mon, Apr 15, 2024 at 06:36:39PM +0100, Mark Rutland wrote:
> > On Mon, Apr 15, 2024 at 09:52:41AM +0200, Peter Zijlstra wrote:
> > > On Thu, Apr 11, 2024 at 07:00:41PM +0300, Mike Rapoport wrote:
> > > > +/**
> > > > + * enum
-- if we're going to all this might as well do it
> > now. And for that I'd just like to ask you paint the bikeshed with
> > Song Liu as he's been the one slowly making way to help us get there
> > with the "module: replace module_layout with module_memory",
> > an
n EADDRNOTAVAIL when func matches
> several symbols")
> Signed-off-by: Andrii Nakryiko
Acked-by: Song Liu
On Sat, Sep 23, 2023 at 8:39 AM Mike Rapoport wrote:
>
> On Thu, Sep 21, 2023 at 03:34:18PM -0700, Song Liu wrote:
> > On Mon, Sep 18, 2023 at 12:30 AM Mike Rapoport wrote:
> > >
> >
> > [...]
> >
> > > diff --git a/arch/s390/kernel/module.c b/ar
On Fri, Sep 22, 2023 at 12:17 AM Christophe Leroy
wrote:
>
>
>
> Le 22/09/2023 à 00:52, Song Liu a écrit :
> > On Mon, Sep 18, 2023 at 12:31 AM Mike Rapoport wrote:
> >>
> > [...]
> >> diff --git a/include/linux/execmem.h b/include/linux/execmem.h
&g
On Mon, Sep 18, 2023 at 12:31 AM Mike Rapoport wrote:
>
[...]
> diff --git a/include/linux/execmem.h b/include/linux/execmem.h
> index 519bdfdca595..09d45ac786e9 100644
> --- a/include/linux/execmem.h
> +++ b/include/linux/execmem.h
> @@ -29,6 +29,7 @@
> * @EXECMEM_KPROBES: parameters for
On Mon, Sep 18, 2023 at 12:30 AM Mike Rapoport wrote:
>
[...]
> diff --git a/arch/s390/kernel/module.c b/arch/s390/kernel/module.c
> index 42215f9404af..db5561d0c233 100644
> --- a/arch/s390/kernel/module.c
> +++ b/arch/s390/kernel/module.c
> @@ -21,6 +21,7 @@
> #include
> #include
>
On Mon, Sep 18, 2023 at 12:31 AM Mike Rapoport wrote:
>
[...]
> @@ -135,5 +138,13 @@ struct execmem_params __init *execmem_arch_params(void)
>
> range->pgprot = prot;
>
> + execmem_params.ranges[EXECMEM_KPROBES].start = VMALLOC_START;
> +
On Mon, Sep 18, 2023 at 12:30 AM Mike Rapoport wrote:
>
[...]
> +
> +/**
> + * enum execmem_type - types of executable memory ranges
> + *
> + * There are several subsystems that allocate executable memory.
> + * Architectures define different restrictions on placement,
> + * permissions,
On Mon, Sep 18, 2023 at 12:30 AM Mike Rapoport wrote:
>
[...]
> +
> +#include
> +#include
> +#include
> +#include
> +
> +static void *execmem_alloc(size_t size)
> +{
> + return module_alloc(size);
> +}
> +
> +void *execmem_text_alloc(enum execmem_type type, size_t size)
> +{
> +
> On Apr 20, 2021, at 10:31 AM, Jiri Olsa wrote:
>
> On Mon, Apr 19, 2021 at 01:36:48PM -0700, Song Liu wrote:
>
> SNIP
>
>> if (stat_config.initial_delay < 0) {
>> @@ -784,11 +790,11 @@ static int __run_perf_stat(int argc, c
# use bpf for both cycles and cs
Suggested-by: Jiri Olsa
Signed-off-by: Song Liu
---
tools/perf/util/bpf_counter.c | 2 +-
tools/perf/util/evsel.h| 1 +
tools/perf/util/parse-events.c | 8 +++-
tools/perf/util/parse-events.l | 2 +-
4 files changed, 10 insertions(+), 3 deletions
e sesssion.
For example:
perf config stat.bpf-counter-events=instructions
perf stat -e instructions,cs
The second command will use BPF for "instructions" but not "cs".
Signed-off-by: Song Liu
---
tools/perf/Documentation/perf-stat.txt | 2 ++
tools/perf/bu
perf_attr_map could be shared among different version of perf binary. Add
bperf_attr_map_compatible() to check whether the existing attr_map is
compatible with current perf binary.
Signed-off-by: Song Liu
---
tools/perf/util/bpf_counter.c | 19 +++
1 file changed, 19 insertions
By following the same protocol, other tools can share hardware PMCs with
perf. Move perf_event_attr_map_entry and BPF_PERF_DEFAULT_ATTR_MAP_PATH to
bpf_perf.h for other tools to use.
Signed-off-by: Song Liu
---
tools/lib/perf/include/perf/bpf_perf.h | 31 ++
tools/perf
ges v1 => v2:
1. Separte 2/3 from 1/3. (Jiri)
2. Rename bperf.h to bpf_perf.h. (Jiri)
3. Other small fixes/optimizations. (Jiri)
Song Liu (4):
perf util: move bpf_perf definitions to a libperf header
perf bpf: check perf_attr_map is compatible with the perf binary
perf-stat: introdu
> On Apr 19, 2021, at 7:26 AM, Jiri Olsa wrote:
>
> On Fri, Apr 16, 2021 at 03:13:24PM -0700, Song Liu wrote:
>
> SNIP
>
>> +/*
>> + * Returns:
>> + * 0 if all events use BPF;
>> + * 1 if some events do NOT use BPF;
>&
> On Apr 17, 2021, at 9:45 AM, Namhyung Kim wrote:
>
> Hi Song,
>
> On Sat, Apr 17, 2021 at 7:13 AM Song Liu wrote:
>>
>> Currently, to use BPF to aggregate perf event counters, the user uses
>> --bpf-counters option. Enable "use bpf by default&quo
e sesssion.
For example:
perf config stat.bpf-counter-events=instructions
perf stat -e instructions,cs
The second command will use BPF for "instructions" but not "cs".
Signed-off-by: Song Liu
---
tools/perf/Documentation/perf-stat.txt | 2 ++
tools/perf/bu
# use bpf for both cycles and cs
Suggested-by: Jiri Olsa
Signed-off-by: Song Liu
---
tools/perf/util/bpf_counter.c | 2 +-
tools/perf/util/evsel.h| 1 +
tools/perf/util/parse-events.c | 8 +++-
tools/perf/util/parse-events.l | 2 +-
4 files changed, 10 insertions(+), 3 deletions
perf_attr_map could be shared among different version of perf binary. Add
bperf_attr_map_compatible() to check whether the existing attr_map is
compatible with current perf binary.
Signed-off-by: Song Liu
---
tools/perf/util/bpf_counter.c | 19 +++
1 file changed, 19 insertions
By following the same protocol, other tools can share hardware PMCs with
perf. Move perf_event_attr_map_entry and BPF_PERF_DEFAULT_ATTR_MAP_PATH to
bpf_perf.h for other tools to use.
Signed-off-by: Song Liu
---
tools/lib/perf/include/perf/bpf_perf.h | 31 ++
tools/perf
ier. (Jiri)
2. Allow configuring stat.bpf-counter-events with any event name (instead
of limiting to hardware events). (Jiri)
Changes v1 => v2:
1. Separte 2/3 from 1/3. (Jiri)
2. Rename bperf.h to bpf_perf.h. (Jiri)
3. Other small fixes/optimizations. (Jiri)
Song Liu (4):
perf util
> On Apr 8, 2021, at 11:24 AM, Jiri Olsa wrote:
>
> On Thu, Apr 08, 2021 at 06:08:20PM +0000, Song Liu wrote:
>>
>>
>>> On Apr 8, 2021, at 10:45 AM, Jiri Olsa wrote:
>>>
>>> On Thu, Apr 08, 2021 at 05:28:10PM +, Song Liu wrote:
>>
> On Apr 8, 2021, at 11:50 AM, Arnaldo Carvalho de Melo wrote:
>
> Em Thu, Apr 08, 2021 at 08:24:47PM +0200, Jiri Olsa escreveu:
>> On Thu, Apr 08, 2021 at 06:08:20PM +, Song Liu wrote:
>>>
>>>
>>>> On Apr 8, 2021, at 10:45 AM, Jiri Olsa wr
> On Apr 8, 2021, at 10:45 AM, Jiri Olsa wrote:
>
> On Thu, Apr 08, 2021 at 05:28:10PM +0000, Song Liu wrote:
>>
>>
>>> On Apr 8, 2021, at 10:20 AM, Jiri Olsa wrote:
>>>
>>> On Thu, Apr 08, 2021 at 04:39:33PM +, Song Liu wrote:
>>
> On Apr 8, 2021, at 10:20 AM, Jiri Olsa wrote:
>
> On Thu, Apr 08, 2021 at 04:39:33PM +0000, Song Liu wrote:
>>
>>
>>> On Apr 8, 2021, at 4:47 AM, Jiri Olsa wrote:
>>>
>>> On Tue, Apr 06, 2021 at 05:36:01PM -0700, Song Liu wrote:
&g
> On Apr 8, 2021, at 4:47 AM, Jiri Olsa wrote:
>
> On Tue, Apr 06, 2021 at 05:36:01PM -0700, Song Liu wrote:
>> Currently, to use BPF to aggregate perf event counters, the user uses
>> --bpf-counters option. Enable "use bpf by default" events with a config
>
n the same sesssion.
For example:
perf config stat.bpf-counter-events=instructions
perf stat -e instructions,cs
The second command will use BPF for "instructions" but not "cs".
Signed-off-by: Song Liu
---
tools/perf/Documentation/perf-stat.txt | 2 ++
tools/perf/bu
By following the same protocol, other tools can share hardware PMCs with
perf. Move perf_event_attr_map_entry and BPF_PERF_DEFAULT_ATTR_MAP_PATH to
bpf_perf.h for other tools to use.
Signed-off-by: Song Liu
---
tools/lib/perf/include/perf/bpf_perf.h | 31 ++
tools/perf
perf_attr_map could be shared among different version of perf binary. Add
bperf_attr_map_compatible() to check whether the existing attr_map is
compatible with current perf binary.
Signed-off-by: Song Liu
---
tools/perf/util/bpf_counter.c | 19 +++
1 file changed, 19 insertions
f.h. (Jiri)
3. Other small fixes/optimizations. (Jiri)
Song Liu (3):
perf util: move bpf_perf definitions to a libperf header
perf bpf: check perf_attr_map is compatible with the perf binary
perf-stat: introduce config stat.bpf-counter-events
tools/lib/perf/include/perf/bpf_perf.h |
> On Apr 6, 2021, at 7:21 AM, Jiri Olsa wrote:
>
> On Fri, Apr 02, 2021 at 05:29:38PM -0700, Song Liu wrote:
>> Currently, to use BPF to aggregate perf event counters, the user uses
>> --bpf-counters option. Enable "use bpf by default" events with a config
>
> On Apr 6, 2021, at 7:21 AM, Jiri Olsa wrote:
>
> On Fri, Apr 02, 2021 at 05:29:37PM -0700, Song Liu wrote:
>> By following the same protocol, other tools can share hardware PMCs with
>> perf. Move perf_event_attr_map_entry and BPERF_DEFAULT_ATTR_MAP_PATH to
>> bpe
n the same sesssion.
For example:
perf config stat.bpf-counter-events=instructions
perf stat -e instructions,cs
The second command will use BPF for "instructions" but not "cs".
Signed-off-by: Song Liu
---
tools/perf/Documentation/perf-stat.txt | 2 ++
tools/perf/bu
-off-by: Song Liu
---
tools/lib/perf/include/perf/bperf.h | 29 +++
tools/perf/util/bpf_counter.c | 44 ++---
2 files changed, 50 insertions(+), 23 deletions(-)
create mode 100644 tools/lib/perf/include/perf/bperf.h
diff --git a/tools/lib/perf/include
On Thu, Apr 1, 2021 at 10:58 AM Yang Yingliang wrote:
>
> Signed-off-by: Yang Yingliang
Please add a short commit log.
Thanks,
Song
> ---
> tools/lib/bpf/linker.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/lib/bpf/linker.c b/tools/lib/bpf/linker.c
> index
On Thu, Apr 1, 2021 at 12:22 AM Wan Jiabing wrote:
>
> struct btf_type is declared twice. One is declared at 35th line.
> The blew one is not needed. Remove the duplicate.
>
> Signed-off-by: Wan Jiabing
Acked-by: Song Liu
> On Mar 31, 2021, at 11:46 PM, Wan Jiabing wrote:
>
> struct bpf_prog is declared twice. There is one declaration
> which is independent on the MACRO at 18th line.
> So the below one is not needed though. Remove the duplicate.
>
> Signed-off-by: Wan Jiabing
> On Mar 30, 2021, at 8:11 AM, Namhyung Kim wrote:
>
> On Tue, Mar 30, 2021 at 3:33 PM Song Liu wrote:
>>> On Mar 29, 2021, at 4:33 AM, Namhyung Kim wrote:
>>>
>>> On Mon, Mar 29, 2021 at 2:17 AM Song Liu wrote:
>>>>> On Mar 23, 2021,
> On Mar 31, 2021, at 9:59 AM, Oleg Nesterov wrote:
>
> On 03/28, Hillf Danton wrote:
>>
>> On Sat, 27 Mar 2021 18:53:08 Oleg Nesterov wrote:
>>> Hi Hillf,
>>>
>>> it seems that you already understand the problem ;) I don't.
>>
>> It is simpler than you thought - I always blindly believe
On Wed, Mar 31, 2021 at 12:14 AM He Fengqing wrote:
>
> 'stack' parameter is not used in ___bpf_prog_run,
> the base address have been set to FP reg. So consequently remove it.
>
> Signed-off-by: He Fengqing
Acked-by: Song Liu
> On Mar 30, 2021, at 3:37 PM, Pedro Tammela wrote:
>
> The current code only checks flags in 'bpf_ringbuf_output()'.
>
> Signed-off-by: Pedro Tammela
Acked-by: Song Liu
> On Mar 30, 2021, at 7:22 AM, Pedro Tammela wrote:
>
> Em seg., 29 de mar. de 2021 às 13:10, Song Liu
> escreveu:
>>
>>
>>
>>> On Mar 28, 2021, at 9:10 AM, Pedro Tammela wrote:
>>>
>>> The current code only checks flags in 'bpf
On Mon, Mar 29, 2021 at 7:11 PM He Fengqing wrote:
>
> Remove unused bpf_load_pointer function in filter.h
>
> Signed-off-by: He Fengqing
Acked-by: Song Liu
[...]
> On Mar 29, 2021, at 4:33 AM, Namhyung Kim wrote:
>
> On Mon, Mar 29, 2021 at 2:17 AM Song Liu wrote:
>>> On Mar 23, 2021, at 9:21 AM, Namhyung Kim wrote:
>>>
>>> As we can run many jobs (in container) on a big machine, we want to
>>> measure
On Mon, Mar 29, 2021 at 11:13 AM Jisheng Zhang
wrote:
>
> From: Jisheng Zhang
>
> This is useful for cross compile process to point linker to the
> correct libelf, libcap, libz path.
LGTM:
Acked-by: Song Liu
btw: Do we also need LDFLAGS for some other binaries, like test_cpp,
> On Mar 28, 2021, at 9:10 AM, Pedro Tammela wrote:
>
> 'bpf_ring_buffer__poll()' abstracts the polling method, so abstract the
> constants that make the implementation don't wait or wait indefinetly
> for data.
>
> Signed-off-by: Pedro Tammela
> ---
> tools/lib/bpf/libbpf.h
> On Mar 28, 2021, at 9:10 AM, Pedro Tammela wrote:
>
> The current code only checks flags in 'bpf_ringbuf_output()'.
>
> Signed-off-by: Pedro Tammela
> ---
> include/uapi/linux/bpf.h | 8
> kernel/bpf/ringbuf.c | 13 +++--
> tools/include/uapi/linux/bpf.h |
p in processing,
> so let's provide a more descriptive notation for this value.
>
> Signed-off-by: Pedro Tammela
Acked-by: Song Liu
> On Mar 23, 2021, at 9:21 AM, Namhyung Kim wrote:
>
> This enables reading event group's counter values together with a
> PERF_EVENT_IOC_READ_CGROUP command like we do in the regular read().
> Users should give a correct size of buffer to be read.
>
> Signed-off-by: Namhyung Kim
> ---
>
> On Mar 23, 2021, at 9:21 AM, Namhyung Kim wrote:
>
> As we can run many jobs (in container) on a big machine, we want to
> measure each job's performance during the run. To do that, the
> perf_event can be associated to a cgroup to measure it only.
>
> However such cgroup events need to
l it be a problem if a slow writer (say a slow scp) writes to the
shared library while the shared library is in use?
Thanks,
Song
>
> From,
> Collin
>
> On Mon, Mar 22, 2021 at 4:55 PM Song Liu wrote:
> On Mon, Mar 22, 2021 at 3:00 PM Collin Fijalkovich
> wrote:
> >
On Fri, Mar 26, 2021 at 12:45 PM Colin King wrote:
>
> From: Colin Ian King
>
> The variable id is being assigned a value that is never
> read, the assignment is redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: C
> On Mar 23, 2021, at 9:21 AM, Namhyung Kim wrote:
>
> As we can run many jobs (in container) on a big machine, we want to
> measure each job's performance during the run. To do that, the
> perf_event can be associated to a cgroup to measure it only.
>
> However such cgroup events need to
> On Mar 23, 2021, at 9:21 AM, Namhyung Kim wrote:
>
> As we can run many jobs (in container) on a big machine, we want to
> measure each job's performance during the run. To do that, the
> perf_event can be associated to a cgroup to measure it only.
>
> However such cgroup events need to
> On Mar 23, 2021, at 2:10 PM, Arnaldo Carvalho de Melo wrote:
>
> Em Fri, Mar 19, 2021 at 04:14:42PM +0000, Song Liu escreveu:
>>> On Mar 19, 2021, at 8:58 AM, Namhyung Kim wrote:
>>> On Sat, Mar 20, 2021 at 12:35 AM Arnaldo Carvalho de Melo
>>> wrote
> On Mar 19, 2021, at 11:41 AM, Arnaldo Carvalho de Melo
> wrote:
>
> Em Thu, Mar 18, 2021 at 10:15:13PM +0100, Jiri Olsa escreveu:
>> On Tue, Mar 16, 2021 at 02:18:35PM -0700, Song Liu wrote:
>>> bperf is off by default. To enable it, pass --bpf-counters option t
On Mon, Mar 22, 2021 at 3:00 PM Collin Fijalkovich
wrote:
>
> Transparent huge pages are supported for read-only non-shmem filesystems,
> but are only used for vmas with VM_DENYWRITE. This condition ensures that
> file THPs are protected from writes while an application is running
> (ETXTBSY).
On Wed, Mar 17, 2021 at 7:05 AM Jan Glauber wrote:
>
> Reading /proc/mdstat with a read buffer size that would not
> fit the unused status line in the first read will skip this
> line from the output.
>
> So 'dd if=/proc/mdstat bs=64 2>/dev/null' will not print something
> like: unused devices:
> On Mar 19, 2021, at 11:55 AM, Jiri Olsa wrote:
>
> On Fri, Mar 19, 2021 at 03:41:57PM -0300, Arnaldo Carvalho de Melo wrote:
>
> SNIP
>
>> LD
>> /tmp/build/perf/util/bpf_skel/.tmp//bootstrap/libbpf/staticobjs/libbpf-in.o
>> LINK
> On Mar 19, 2021, at 8:58 AM, Namhyung Kim wrote:
>
> Hi Arnaldo,
>
> On Sat, Mar 20, 2021 at 12:35 AM Arnaldo Carvalho de Melo
> wrote:
>>
>> Em Fri, Mar 19, 2021 at 09:54:59AM +0900, Namhyung Kim escreveu:
>>> On Fri, Mar 19, 2021 at 9:22 AM Song
> On Mar 18, 2021, at 5:09 PM, Arnaldo wrote:
>
>
>
> On March 18, 2021 6:14:34 PM GMT-03:00, Jiri Olsa wrote:
>> On Thu, Mar 18, 2021 at 03:52:51AM +, Song Liu wrote:
>>>
>>>
>>>> On Mar 17, 2021, at 6:11 AM, Arnaldo Carvalho de Me
> On Mar 18, 2021, at 6:49 AM, Namhyung Kim wrote:
>
> On Thu, Mar 18, 2021 at 4:22 PM Song Liu wrote:
>>
>>
>>
>>> On Mar 17, 2021, at 10:54 PM, Namhyung Kim wrote:
>>>
>>
>> [...]
>>
>>>> +
>>>
> On Mar 17, 2021, at 11:07 PM, Namhyung Kim wrote:
>
> On Wed, Mar 17, 2021 at 6:18 AM Song Liu wrote:
>>
>> Add a test to compare the output of perf-stat with and without option
>> --bpf-counters. If the difference is more than 10%, the test is considered
>
> On Mar 17, 2021, at 10:54 PM, Namhyung Kim wrote:
>
[...]
>> +
>> +static int bperf_reload_leader_program(struct evsel *evsel, int attr_map_fd,
>> + struct perf_event_attr_map_entry
>> *entry)
>> +{
>> + struct bperf_leader_bpf *skel =
> On Mar 17, 2021, at 9:32 PM, Namhyung Kim wrote:
>
> On Thu, Mar 18, 2021 at 12:52 PM Song Liu wrote:
>>
>>
>>
>>> On Mar 17, 2021, at 6:11 AM, Arnaldo Carvalho de Melo
>>> wrote:
>>>
>>> Em Wed, Mar 17, 2021 at 02:29:28P
> On Mar 17, 2021, at 6:11 AM, Arnaldo Carvalho de Melo wrote:
>
> Em Wed, Mar 17, 2021 at 02:29:28PM +0900, Namhyung Kim escreveu:
>> Hi Song,
>>
>> On Wed, Mar 17, 2021 at 6:18 AM Song Liu wrote:
>>>
>>> perf uses performance monitoring coun
) not
depend on the behavior of IO subsystem (for less noise from caching). So
far, the best option we found is stressapptest.
Signed-off-by: Song Liu
---
tools/perf/tests/shell/stat_bpf_counters.sh | 34 +
1 file changed, 34 insertions(+)
create mode 100755 tools/perf/tests
Take measurements of t0 and ref_time after enable_counters(), so that
they only measure the time consumed when the counters are enabled.
Signed-off-by: Song Liu
---
tools/perf/builtin-stat.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/tools/perf/builtin-stat.c
r default attr-map path.
7. Use cpu__max_cpu() instead of libbpf_num_possible_cpus().
8. Add flag "enabled" to the follower program. Then move follower attach
to bperf__load() and simplify bperf__enable().
Song Liu (3):
perf-stat: introduce bperf, share hardware PMCs with BPF
fs/bpf/perf_attr_map. The user could change the path with
option --bpf-attr-map.
Signed-off-by: Song Liu
---
Known limitations:
1. Do not support per cgroup events;
2. Do not support monitoring of BPF program (perf-stat -b);
3. Do not support event groups;
4. Do not support inherit events during f
> On Mar 15, 2021, at 8:34 AM, Andi Kleen wrote:
>
>> I still think that there is value in taking those measurements after we
>> enable the counters, as, for instance, for interval mode we want
>> measurements with the counters enabled, whatever happens before the
>> counters are enabled is
> On Mar 15, 2021, at 7:09 AM, Jiri Olsa wrote:
>
> On Mon, Mar 15, 2021 at 07:51:11AM +0000, Song Liu wrote:
>
> SNIP
[...]
>>
>> It is mostly to cover corner cases, like something else used the same
>> name.
>
> about that.. we just take the o
> On Mar 14, 2021, at 3:48 PM, Jiri Olsa wrote:
>
> On Thu, Mar 11, 2021 at 06:02:57PM -0800, Song Liu wrote:
>> perf uses performance monitoring counters (PMCs) to monitor system
>> performance. The PMCs are limited hardware resources. For example,
>> Intel CPU
> On Mar 13, 2021, at 2:06 PM, Jiri Olsa wrote:
>
> On Fri, Mar 12, 2021 at 04:09:53PM +0000, Song Liu wrote:
>>
>>
>>> On Mar 12, 2021, at 7:45 AM, Song Liu wrote:
>>>
>>>
>>>
>>>> On Mar 12, 2021, at 4:12 AM, Jiri O
> On Mar 12, 2021, at 6:47 PM, Namhyung Kim wrote:
>
> On Sat, Mar 13, 2021 at 12:38 AM Song Liu wrote:
>>
>>
>>
>>> On Mar 12, 2021, at 12:36 AM, Namhyung Kim wrote:
>>>
>>> Hi,
>>>
>>> On Fri, Mar 12, 2021
> On Mar 12, 2021, at 6:24 AM, Arnaldo Carvalho de Melo wrote:
>
> Em Thu, Mar 11, 2021 at 06:02:57PM -0800, Song Liu escreveu:
>> perf uses performance monitoring counters (PMCs) to monitor system
>> performance. The PMCs are limited hardware resources. For example,
> On Mar 12, 2021, at 7:45 AM, Song Liu wrote:
>
>
>
>> On Mar 12, 2021, at 4:12 AM, Jiri Olsa wrote:
>>
>> On Thu, Mar 11, 2021 at 06:02:57PM -0800, Song Liu wrote:
>>> perf uses performance monitoring counters (PMCs) to monitor system
>>
> On Mar 12, 2021, at 6:24 AM, Arnaldo Carvalho de Melo wrote:
>
> Em Thu, Mar 11, 2021 at 06:02:57PM -0800, Song Liu escreveu:
>> perf uses performance monitoring counters (PMCs) to monitor system
>> performance. The PMCs are limited hardware resources. For example,
> On Mar 12, 2021, at 4:12 AM, Jiri Olsa wrote:
>
> On Thu, Mar 11, 2021 at 06:02:57PM -0800, Song Liu wrote:
>> perf uses performance monitoring counters (PMCs) to monitor system
>> performance. The PMCs are limited hardware resources. For example,
>> Intel CPU
> On Mar 12, 2021, at 12:36 AM, Namhyung Kim wrote:
>
> Hi,
>
> On Fri, Mar 12, 2021 at 11:03 AM Song Liu wrote:
>>
>> perf uses performance monitoring counters (PMCs) to monitor system
>> performance. The PMCs are limited hardware resources. For example,
cles -a
perf stat --use-bpf -e cycles -C 1,3,4
perf stat --use-bpf -e cycles -p 123
perf stat --use-bpf -e cycles -t 100,101
Signed-off-by: Song Liu
---
tools/perf/Makefile.perf | 1 +
tools/perf/builtin-stat.c | 20 +-
tools/perf/util/bpf_c
> On Mar 6, 2021, at 12:08 AM, Ian Rogers wrote:
>
> Add -Wall -Werror when compiling BPF skeletons.
>
> Signed-off-by: Ian Rogers
Acked-by: Song Liu
> ---
> tools/perf/Makefile.perf | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/to
> On Mar 6, 2021, at 12:08 AM, Ian Rogers wrote:
>
> Missed space after #include.
>
> Signed-off-by: Ian Rogers
Acked-by: Song Liu
> ---
> tools/perf/util/bpf_counter.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/u
> On Mar 6, 2021, at 12:08 AM, Ian Rogers wrote:
>
> Fixes -Wall warnings.
>
> Signed-off-by: Ian Rogers
Acked-by: Song Liu
Thanks for the clean up!
> ---
> tools/perf/util/bpf_skel/bpf_prog_profiler.bpf.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
, as those in
handle__sched_wakeup, are much faster with task local storage. If we
disable hashtab prealloc, task local storage is much faster for all 3
functions.
Acked-by: Andrii Nakryiko
Signed-off-by: Song Liu
---
tools/bpf/runqslower/runqslower.bpf.c | 33 +--
1 file
Add a test with recursive bpf_task_storage_[get|delete] from fentry
programs on bpf_local_storage_lookup and bpf_local_storage_update. Without
proper deadlock prevent mechanism, this test would cause deadlock.
Signed-off-by: Song Liu
---
.../bpf/prog_tests/task_local_storage.c | 23
1 - 100 of 1579 matches
Mail list logo