On Mon, Mar 24, 2025 at 05:30:44PM +, Mingwei Zhang wrote:
> From: Kan Liang
>
> Current perf doesn't explicitly schedule out all exclude_guest events
> while the guest is running. There is no problem with the current
> emulated vPMU. Because perf owns all the PMU counters. It can mask the
>
On Mon, Mar 24, 2025 at 05:31:14PM +, Mingwei Zhang wrote:
> From: Sandipan Das
>
> Apply the PERF_PMU_CAP_MEDIATED_VPMU flag for version 2 and later
> implementations of the core PMU. Aside from having Global Control and
> Status registers, virtualizing the PMU using the passthrough model
>
On Mon, Mar 24, 2025 at 05:30:49PM +, Mingwei Zhang wrote:
> From: Kan Liang
>
> When entering/exiting a guest, some contexts for a guest have to be
> switched. For examples, there is a dedicated interrupt vector for
> guests on Intel platforms.
>
> When PMI switch into a new guest vector, g
On Mon, Mar 24, 2025 at 05:30:45PM +, Mingwei Zhang wrote:
> From: Kan Liang
>
> Only KVM knows the exact time when a guest is entering/exiting. Expose
> two interfaces to KVM to switch the ownership of the PMU resources.
>
> All the pinned events must be scheduled in first. Extend the
> per
On Tue, May 20, 2025 at 12:09:02PM -0400, Liang, Kan wrote:
>
>
> On 2025-05-19 2:58 a.m., Namhyung Kim wrote:
> > Hello,
> >
> > On Mon, Mar 24, 2025 at 05:30:44PM +, Mingwei Zhang wrote:
> >> From: Kan Liang
> >>
> >> Current perf do
Hello,
On Mon, Mar 24, 2025 at 05:30:44PM +, Mingwei Zhang wrote:
> From: Kan Liang
>
> Current perf doesn't explicitly schedule out all exclude_guest events
> while the guest is running. There is no problem with the current
> emulated vPMU. Because perf owns all the PMU counters. It can mas
1/3 PASSED, 0 SKIPPED, 0 FAILED
>
> Fixes: a496d0cdc84d ("selftests/bpf: Add a test for kmem_cache_iter")
> Signed-off-by: T.J. Mercier
Oops, thanks for fixing this.
Acked-by: Namhyung Kim
Thanks,
Namhyung
> ---
> tools/testing/selftests/bpf/prog_tests/kmem_cache_iter
Pavlu
Cc: Sami Tolvanen
Cc: Daniel Gomez
Cc: linux-modu...@vger.kernel.org
Signed-off-by: Namhyung Kim
---
tools/perf/util/machine.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 27d5345d2b307a97..8bb34689e3ceeec4 100644
--- a/
Hello,
On Fri, Jul 12, 2024 at 12:45 PM Guilherme Amadio wrote:
>
> Hi Namhyung, Arnaldo,
>
> Here is version 3 of the patchset. I see the change to send output to devnull
> has already been applied, so I am submitting the remaining work only.
>
> The difference with previous changes is that in v
On Wed, Jul 3, 2024 at 4:05 PM Steven Rostedt wrote:
>
> On Wed, 3 Jul 2024 14:33:21 -0700
> Namhyung Kim wrote:
>
> > On Wed, Jul 03, 2024 at 03:36:17PM -0400, Steven Rostedt wrote:
> > > On Tue, 2 Jul 2024 16:40:46 -0700
> > > Namhyung Kim wrote:
> >
On Wed, Jul 03, 2024 at 03:36:17PM -0400, Steven Rostedt wrote:
> On Tue, 2 Jul 2024 16:40:46 -0700
> Namhyung Kim wrote:
>
> > +CC Steve and linux-trace-kernel list.
>
> There doesn't seem to be a cover page, and it doesn't apply on
> v6.10-rc6 nor on tip.
+CC Steve and linux-trace-kernel list.
Thanks,
Namhyung
On Fri, Jun 28, 2024 at 10:34:29PM +0200, Guilherme Amadio wrote:
> Other tools, in tools/verification and tools/tracing, make use of
> libtraceevent and libtracefs as dependencies. This allows setting
> up the feature check flags for them a
Hello,
On Thu, Apr 4, 2024 at 12:26 PM Beau Belgrave wrote:
>
> Hello,
>
> I'm looking into the possibility of capturing user data that is pointed
> to by a user register (IE: fs/gs for TLS on x86/64) for each sample via
> perf_events.
>
> I was hoping to find a way to do this similar to PERF_SAM
S' and defines macro 'HAVE_PERF_REGS_SUPPORT' for statically
> compiling the tool.
>
> [...]
Applied to perf-tools-next, thanks!
Best regards,
--
Namhyung Kim
"Michael S. Tsirkin"
Cc: Jason Wang
Cc: k...@vger.kernel.org
Cc: virtualizat...@lists.linux.dev
Cc: net...@vger.kernel.org
Signed-off-by: Namhyung Kim
---
tools/include/uapi/linux/vhost.h | 8
1 file changed, 8 insertions(+)
diff --git a/tools/include/uapi/linux/vhost.h b/too
Hi Peter,
On Tue, Apr 20, 2021 at 7:28 PM Peter Zijlstra wrote:
>
> On Fri, Apr 16, 2021 at 06:49:09PM +0900, Namhyung Kim wrote:
> > On Thu, Apr 15, 2021 at 11:51 PM Peter Zijlstra
> > wrote:
> > > > +static void perf_update_cgroup_node(struct perf_event *event
Hi Arnaldo,
Could you please pick this up? The kernel part is landed in the
tip.git already.
Thanks,
Namhyung
On Wed, Feb 10, 2021 at 5:33 PM Namhyung Kim wrote:
>
> It counts how often cgroups are changed actually during the context
> switches.
>
> # perf stat -a -e context-
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" events with a config
> option, stat.bpf-counter-events. Events with name in the option will use
> BPF.
>
> This a
The following commit has been merged into the perf/core branch of tip:
Commit-ID: d0d1dd628527c77db2391ce0293c1ed344b2365f
Gitweb:
https://git.kernel.org/tip/d0d1dd628527c77db2391ce0293c1ed344b2365f
Author:Namhyung Kim
AuthorDate:Wed, 10 Feb 2021 17:33:26 +09:00
Committer
The following commit has been merged into the perf/core branch of tip:
Commit-ID: 7c8056bb366b1b2dc8e4a3cc0b876e15a8ebca2c
Gitweb:
https://git.kernel.org/tip/7c8056bb366b1b2dc8e4a3cc0b876e15a8ebca2c
Author:Namhyung Kim
AuthorDate:Wed, 10 Feb 2021 17:33:25 +09:00
Committer
The following commit has been merged into the perf/core branch of tip:
Commit-ID: 64f6aeb6dc7a2426278fd9017264cf24bfdbebd6
Gitweb:
https://git.kernel.org/tip/64f6aeb6dc7a2426278fd9017264cf24bfdbebd6
Author:Namhyung Kim
AuthorDate:Wed, 10 Feb 2021 17:33:25 +09:00
Committer
The following commit has been merged into the perf/core branch of tip:
Commit-ID: a389ea9c161d142bf11fd4c553988c2daa9f5404
Gitweb:
https://git.kernel.org/tip/a389ea9c161d142bf11fd4c553988c2daa9f5404
Author:Namhyung Kim
AuthorDate:Wed, 10 Feb 2021 17:33:26 +09:00
Committer
On Fri, Apr 16, 2021 at 8:59 PM Peter Zijlstra wrote:
>
> On Fri, Apr 16, 2021 at 08:22:38PM +0900, Namhyung Kim wrote:
> > On Fri, Apr 16, 2021 at 7:28 PM Peter Zijlstra wrote:
> > >
> > > On Fri, Apr 16, 2021 at 11:29:30AM +0200, Peter Zijlstra wrote:
> &
On Fri, Apr 16, 2021 at 7:28 PM Peter Zijlstra wrote:
>
> On Fri, Apr 16, 2021 at 11:29:30AM +0200, Peter Zijlstra wrote:
>
> > > So I think we've had proposals for being able to close fds in the past;
> > > while preserving groups etc. We've always pushed back on that because of
> > > the resourc
On Fri, Apr 16, 2021 at 6:29 PM Peter Zijlstra wrote:
>
>
> Duh.. this is a half-finished email I meant to save for later. Anyway,
> I'll reply more.
Nevermind, and thanks for your time! :-)
Namhyung
On Fri, Apr 16, 2021 at 6:27 PM Peter Zijlstra wrote:
>
> On Fri, Apr 16, 2021 at 08:48:12AM +0900, Namhyung Kim wrote:
> > On Thu, Apr 15, 2021 at 11:51 PM Peter Zijlstra
> > wrote:
> > > On Tue, Apr 13, 2021 at 08:53:36AM -0700, Namhyung Kim wrote:
>
> >
ould be deleted when the file descriptor of the
> > perf_event is closed.
> >
> > Cc: Tejun Heo
> > Reported-by: kernel test robot
>
> What, the whole thing?
Oh, it's just for build issues when !CONFIG_CGROUP_PERF
>
> > Acked-by: Song Liu
> >
Hi Peter,
Thanks for your review!
On Thu, Apr 15, 2021 at 11:51 PM Peter Zijlstra wrote:
>
> On Tue, Apr 13, 2021 at 08:53:36AM -0700, Namhyung Kim wrote:
> > As we can run many jobs (in container) on a big machine, we want to
> > measure each job's performance during th
Arnaldo Carvalho de Melo
> Cc: Mark Rutland
> Cc: Alexander Shishkin
> Cc: Jiri Olsa
> Cc: Namhyung Kim
> Signed-off-by: Rob Herring
> ---
> tools/lib/perf/include/internal/xyarray.h | 9 -
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git
On Thu, Apr 15, 2021 at 3:23 AM Arnaldo Carvalho de Melo
wrote:
>
> Em Wed, Apr 14, 2021 at 03:02:08PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Thu, Apr 15, 2021 at 01:41:35AM +0900, Namhyung Kim escreveu:
> > > Hello,
> > >
> > > On Thu, Apr
On Thu, Apr 15, 2021 at 1:53 AM Rob Herring wrote:
>
> On Wed, Apr 14, 2021 at 11:41 AM Namhyung Kim wrote:
> >
> > Hello,
> >
> > On Thu, Apr 15, 2021 at 1:07 AM Rob Herring wrote:
> > > +void *perf_evsel__mmap_base(struct perf_e
Hello,
On Thu, Apr 15, 2021 at 1:07 AM Rob Herring wrote:
> +void *perf_evsel__mmap_base(struct perf_evsel *evsel, int cpu, int thread)
> +{
> + if (FD(evsel, cpu, thread) < 0 || MMAP(evsel, cpu, thread) == NULL)
> + return NULL;
I think you should check the cpu and the threa
Hi Kan,
On Wed, Apr 14, 2021 at 4:04 AM wrote:
> diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c
> index dd9f3c2..0d4a1a3 100644
> --- a/arch/x86/events/core.c
> +++ b/arch/x86/events/core.c
> @@ -1585,6 +1585,8 @@ static void x86_pmu_del(struct perf_event *event, int
> flags)
>
Hi Arnaldo,
On Wed, Apr 14, 2021 at 9:23 PM Arnaldo Carvalho de Melo
wrote:
>
> Em Mon, Apr 12, 2021 at 03:22:29PM +0800, Yang Jihong escreveu:
> > On 2021/3/31 10:18, Yang Jihong wrote:
> > > On 2021/3/30 15:26, Namhyung Kim wrote:
> > > > On Sat, Mar
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 which includes
the total buffer size and the cgroup id.
Acked-by: Song Liu
Signed-off-by: Namhyun
o 5.8 usec.
Thanks,
Namhyung
Namhyung Kim (2):
perf/core: Share an event with multiple cgroups
perf/core: Support reading group events with shared cgroups
include/linux/perf_event.h | 22 ++
include/uapi/linux/perf_event.h | 2 +
kernel/events/core.c
ed-by: Song Liu
Signed-off-by: Namhyung Kim
---
include/linux/perf_event.h | 22 ++
include/uapi/linux/perf_event.h | 2 +
kernel/events/core.c| 480 ++--
3 files changed, 477 insertions(+), 27 deletions(-)
diff --git a/include/linux/perf_event.h
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 which includes
the total buffer size and the cgroup id.
Acked-by: Song Liu
Signed-off-by: Namhyun
hange the HW PMU).
It keeps the counters in a hash table with cgroup id as a key.
With this change, average processing time of my internal test workload
which runs tasks in a different cgroup and communicates by pipes
dropped from 11.3 usec to 5.8 usec.
Thanks,
Namhyung
Namhyung Kim (2):
perf
value and timings.
This attaches all cgroups in a single syscall and I didn't add the
DETACH command deliberately to make the implementation simple. The
attached cgroup nodes would be deleted when the file descriptor of the
perf_event is closed.
Cc: Tejun Heo
Acked-by: Song Liu
Signed-off-b
are based on prototypes [1], [2].
>
> [1] git clone https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
> -b perf/record_threads
> [2] https://lore.kernel.org/lkml/20180913125450.21342-1-jo...@kernel.org/
>
> Suggested-by: Jiri Olsa
> Suggested-by: Namhyun
sages, but I think it's rare to
have both options and it'd be better changing them.
Suggested-by: Alexey Alexandrov
Signed-off-by: Namhyung Kim
---
tools/perf/util/record.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/record.c b/tools/perf/util
Hello,
On Thu, Apr 1, 2021 at 3:25 PM Wan Jiabing wrote:
>
> struct target is declared twice. One has been declared
> at 21st line. Remove the duplicate.
>
> Signed-off-by: Wan Jiabing
Acked-by: Namhyung Kim
I think we can move all the forward declarations to the top
(and sor
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, at 9:21 AM, Namhyung Kim wrote:
> >>>
> >>> As we can run
Hello,
On Wed, Mar 24, 2021 at 11:30 PM Alexander Antonov
wrote:
>
> The previous version can be found at:
> v4:
> https://lkml.kernel.org/r/20210203135830.38568-1-alexander.anto...@linux.intel.com/
> Changes in this revision are:
> v4 -> v5:
> - Addressed comments
Hi Yang and Arnaldo,
On Sat, Mar 27, 2021 at 11:16 AM Yang Jihong wrote:
> On 2021/3/26 20:06, Arnaldo Carvalho de Melo wrote:
> > So it seems to be working, what am I missing? Is this strictly non
> > group related?
> >
> Yes, it is non group related.
> This problem occurs only when different ev
On Mon, Mar 29, 2021 at 2:32 AM Song Liu wrote:
> > 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 s
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 each job's performance during the run. To do that, the
> > perf_eve
er to "dso,symbol" to avoid duplicate output when different
> > processes correspond to the same symbol.
> >
> > Signed-off-by: Yang Jihong
Acked-by: Namhyung Kim
Thanks,
Namhyung
> > ---
> >
> > Changes since v6:
> >- Remove separate setup
Hi Song,
Thanks for your review!
On Thu, Mar 25, 2021 at 9:56 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 each job's performance during the run. T
On Wed, Mar 24, 2021 at 12:47 PM Like Xu wrote:
>
> Hi Namhyung,
>
> On 2021/3/24 9:32, Namhyung Kim wrote:
> > Hello,
> >
> > On Mon, Mar 22, 2021 at 3:14 PM Like Xu wrote:
> >> +void reserve_lbr_buffers(struct perf_event *event)
> >> +{
> >
signal 12 sent to session 'test [11596]'
> signal 12 sent to session 'test [11596]'
> test daemon ping
> test daemon lock
> test child finished with 0
> end
> daemon operations: Ok
>
> [1] https://bugs.launchpad.net/ubuntu/+source/da
Hello,
On Mon, Mar 22, 2021 at 3:14 PM Like Xu wrote:
> +void reserve_lbr_buffers(struct perf_event *event)
> +{
> + struct kmem_cache *kmem_cache = x86_get_pmu()->task_ctx_cache;
> + struct cpu_hw_events *cpuc;
> + int cpu;
> +
> + if (!static_cpu_has(X86_FEATURE_ARCH_LBR
Hi Song,
On Wed, Mar 24, 2021 at 9:30 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 each job's performance during the run. To do that, t
value and timings.
This attaches all cgroups in a single syscall and I didn't add the
DETACH command deliberately to make the implementation simple. The
attached cgroup nodes would be deleted when the file descriptor of the
perf_event is closed.
Cc: Tejun Heo
Signed-off-by: Namhyung Kim
---
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
---
kernel/events/core.c | 119 +
in a different cgroup and communicates by pipes
dropped from 11.3 usec to 5.8 usec.
Thanks,
Namhyung
Namhyung Kim (2):
perf/core: Share an event with multiple cgroups
perf/core: Support reading group events with shared cgroups
include/linux/perf_event.h | 22 ++
include/uapi/linux/perf_ev
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 Liu wrote:
> > > > On Mar 18, 2021, at 5:09 PM, Arnaldo wrote:
> > > >
Hi Kan,
On Thu, Mar 18, 2021 at 3:05 AM wrote:
>
> From: Kan Liang
>
> A self-describing mechanism for the uncore PerfMon hardware has been
> introduced with the latest Intel platforms. By reading through an MMIO
> page worth of information, perf can 'discover' all the standard uncore
> PerfMon
> idle
>464,172,105 instructions #0.24 insn per cycle
> #6.07 stalled cycles
> per insn
> 91,567,662 branches # 11.438 M/sec
> 7,756,054 branch-misses
t;>>
> >>>
> >>>> 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,
> >>&g
On Thu, Mar 18, 2021 at 4:22 PM Song Liu wrote:
>
>
>
> > On Mar 17, 2021, at 10:54 PM, Namhyung Kim wrote:
> >
>
> [...]
>
> >> +
> >> +static int bperf_reload_leader_program(struct evsel *evsel, int
> >> attr_map_fd,
> >> +
Hello,
On Wed, Mar 17, 2021 at 6:44 PM Yang Jihong wrote:
>
> In hist__find_annotations function, since different hist_entry may point to
> same
> symbol, we free notes->src to signal already processed this symbol in stdio
> mode;
> when annotate, entry will skipped if notes->src is NULL to avo
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
> as failed.
>
> For stable results between two runs (w/ and w/o --bpf-counters), the test
> progra
On Wed, Mar 17, 2021 at 6:18 AM Song Liu wrote:
> +static int bperf_check_target(struct evsel *evsel,
> + struct target *target,
> + enum bperf_filter_type *filter_type,
> + __u32 *filter_entry_cnt)
> +{
> +
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:28PM +0900, Namhyung Kim escreveu:
> >> Hi Song,
> >>
> >> On Wed, Ma
When it failed to get section names, it should call
bpf_object__elf_finish() like others.
Signed-off-by: Namhyung Kim
---
tools/lib/bpf/libbpf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 2f351d3ad3e7..8d610259f4be
The following commit has been merged into the perf/core branch of tip:
Commit-ID: 9483409ab5067941860754e78a4a44a60311d276
Gitweb:
https://git.kernel.org/tip/9483409ab5067941860754e78a4a44a60311d276
Author:Namhyung Kim
AuthorDate:Mon, 15 Mar 2021 12:34:36 +09:00
Committer
The following commit has been merged into the perf/core branch of tip:
Commit-ID: ff65338e78418e5970a7aabbabb94c46f2bb821d
Gitweb:
https://git.kernel.org/tip/ff65338e78418e5970a7aabbabb94c46f2bb821d
Author:Namhyung Kim
AuthorDate:Thu, 11 Mar 2021 20:54:13 +09:00
Committer
The following commit has been merged into the perf/core branch of tip:
Commit-ID: bdacfaf26da166dd56c62f23f27a4b3e71f2d89e
Gitweb:
https://git.kernel.org/tip/bdacfaf26da166dd56c62f23f27a4b3e71f2d89e
Author:Namhyung Kim
AuthorDate:Thu, 11 Mar 2021 20:54:12 +09:00
Committer
Hi Song,
On Wed, Mar 17, 2021 at 6:18 AM Song Liu wrote:
>
> perf uses performance monitoring counters (PMCs) to monitor system
> performance. The PMCs are limited hardware resources. For example,
> Intel CPUs have 3x fixed PMCs and 4x programmable PMCs per cpu.
>
> Modern data center systems use
; record as well.
>
> Fixes: 01330d7288e0 ("perf/x86: Allow zero PEBS status with only single
> active event")
> Reported-by: Vince Weaver
> Suggested-by: Peter Zijlstra (Intel)
> Signed-off-by: Kan Liang
> Cc: sta...@vger.kernel.org
Tested-by: Namhyung Kim
Thanks,
On Tue, Mar 16, 2021 at 9:28 PM Liang, Kan wrote:
>
>
>
> On 3/16/2021 3:22 AM, Namhyung Kim wrote:
> > Hi Peter and Kan,
> >
> > On Thu, Mar 4, 2021 at 5:22 AM Peter Zijlstra wrote:
> >>
> >> On Wed, Mar 03, 2021 at 02:53:00PM -0500, Liang, Kan
Hi Peter and Kan,
On Thu, Mar 4, 2021 at 5:22 AM Peter Zijlstra wrote:
>
> On Wed, Mar 03, 2021 at 02:53:00PM -0500, Liang, Kan wrote:
> > On 3/3/2021 1:59 PM, Peter Zijlstra wrote:
> > > On Wed, Mar 03, 2021 at 05:42:18AM -0800, kan.li...@linux.intel.com wrote:
>
> > > > +++ b/arch/x86/events/in
On Mon, Mar 15, 2021 at 10:28 PM Jiri Olsa wrote:
>
> On Mon, Mar 15, 2021 at 01:56:41PM +0900, Namhyung Kim wrote:
> > I got several memory leak reports from Asan with a simple command. It
> > was because VDSO is not released due to the refcount. Like in
> > __dsos_ad
) leaked in 2 allocation(s).
Signed-off-by: Namhyung Kim
---
tools/perf/util/vdso.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/perf/util/vdso.c b/tools/perf/util/vdso.c
index 3cc91ad048ea..43beb169631d 100644
--- a/tools/perf/util/vdso.c
+++ b/tools/perf/util/vdso.c
@@ -133,6 +133,8
I found the ring buffer pages are allocated in the node but the ring
buffer itself is not. Let's convert it to use kzalloc_node() too.
Signed-off-by: Namhyung Kim
---
kernel/events/ring_buffer.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/kernel/e
On Sat, Mar 13, 2021 at 11:16 AM Yang Jihong wrote:
>
> In hist__find_annotations function, since different hist_entry may point to
> same
> symbol, we free notes->src to signal already processed this symbol in stdio
> mode;
> when annotate, entry will skipped if notes->src is NULL to avoid repe
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 at 11:03 AM Song Liu wrote:
> >>
> >> perf uses performance monitoring counters (PMCs)
On Fri, Mar 12, 2021 at 4:19 PM Yang Jihong wrote:
>
>
> Hello,
> On 2021/3/12 13:49, Namhyung Kim wrote:
> > Hi,
> >
> > On Fri, Mar 12, 2021 at 12:24 PM Yang Jihong wrote:
> >>
> >> Hello, Namhyung
> >>
> >> On 2021/3/11 22:42,
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,
> Intel CPUs have 3x fixed PMCs and 4x programmable PMCs per cpu.
>
> Modern data center systems use the
Hi,
On Fri, Mar 12, 2021 at 12:24 PM Yang Jihong wrote:
>
> Hello, Namhyung
>
> On 2021/3/11 22:42, Namhyung Kim wrote:
> > Hi,
> >
> > On Thu, Mar 11, 2021 at 5:48 PM Yang Jihong wrote:
> >>
> >> Hello,
> >>
> >> On 2021/3/6
Hi,
On Thu, Mar 11, 2021 at 5:48 PM Yang Jihong wrote:
>
> Hello,
>
> On 2021/3/6 16:28, Yang Jihong wrote:
> > In hist__find_annotations function, since have a hist_entry per IP for the
> > same
> > symbol, we free notes->src to signal already processed this symbol in stdio
> > mode;
> > when
From: Namhyung Kim
The kernel can allocate a lot of struct perf_event when profiling. For
example, 256 cpu x 8 events x 20 cgroups = 40K instances of the struct
would be allocated on a large system.
The size of struct perf_event in my setup is 1152 byte. As it's
allocated by kmalloc, the a
rnal users too.
Signed-off-by: Namhyung Kim
---
kernel/events/core.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 10f2548211d0..519faf0b7b54 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -11246,13
t; Cc: Alexander Shishkin
> Cc: Arnaldo Carvalho de Melo
> Cc: Ingo Molnar
> Cc: Jiri Olsa
> Cc: Mark Rutland
> Cc: Namhyung Kim
> Cc: Peter Zijlstra
> Signed-off-by: Dmitry Safonov
Acked-by: Namhyung Kim
Thanks,
Namhyung
> ---
> tools/perf/builtin-
On Tue, Mar 2, 2021 at 4:19 AM Jiri Olsa wrote:
>
> On Tue, Mar 02, 2021 at 01:24:02AM +0800, Changbin Du wrote:
> > This does follow two changes:
> > 1) Select appropriate unit between K/M/G.
> > 2) Use 'cpu-sec' instead of 'sec' to state this is not the wall-time.
> >
> > $ sudo ./perf stat
Hi Jiri,
On Tue, Mar 2, 2021 at 2:24 AM Jiri Olsa wrote:
>
> On Mon, Mar 01, 2021 at 11:04:02PM +0900, Namhyung Kim wrote:
> > The evlist has the maps with its own refcounts so we don't need to set
> > the pointers to NULL. Otherwise following error was reported by Asan.
On Mon, Mar 1, 2021 at 10:33 PM Bayduraev, Alexey V
wrote:
>
> On 01.03.2021 14:44, Namhyung Kim wrote:
> > Hello,
> >
> > On Mon, Mar 1, 2021 at 8:16 PM Bayduraev, Alexey V
> > wrote:
> >>
> >> Hi,
> >>
> >> On 20.11.2020 13:49,
:308
SUMMARY: AddressSanitizer: 72 byte(s) leaked in 2 allocation(s).
test child finished with 1
end
Convert perf time to TSC: FAILED!
Signed-off-by: Namhyung Kim
---
tools/perf/tests/perf-time-to-tsc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/perf/tests/perf
byte(s) leaked in 7 allocation(s).
test child finished with 1
end
Print cpu map: FAILED!
Signed-off-by: Namhyung Kim
---
tools/perf/tests/cpumap.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/perf/tests/cpumap.c b/tools/perf/tests/cpumap.c
index 29c793ac7d10
end
Use a dummy software event to keep tracking: FAILED!
Signed-off-by: Namhyung Kim
---
tools/perf/tests/keep-tracking.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/tools/perf/tests/keep-tracking.c b/tools/perf/tests/keep-tracking.c
index e6f1b2a38e03
1
end
Synthesize thread map: FAILED!
Signed-off-by: Namhyung Kim
---
tools/perf/tests/thread-map.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/perf/tests/thread-map.c b/tools/perf/tests/thread-map.c
index 28f51c4bd373..9e1cf11149ef 100644
--- a/tools/perf/tests/thread
/libsanitizer/asan/asan_malloc_linux.cpp:145
#1 0x7f091035f6a7 in __vasprintf_internal libio/vasprintf.c:71
SUMMARY: AddressSanitizer: 33 byte(s) leaked in 1 allocation(s).
Signed-off-by: Namhyung Kim
---
tools/perf/tests/attr.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff
...
SUMMARY: AddressSanitizer: 471 byte(s) leaked in 2 allocation(s).
test child finished with 1
end
Object code reading: FAILED!
Signed-off-by: Namhyung Kim
---
tools/perf/tests/code-reading.c | 10 +++---
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/tools/perf/tests
39
#12 0x7fc44e042d09 in __libc_start_main ../csu/libc-start.c:308
...
test child finished with 1
end
Number of exit events of a simple workload: FAILED!
Signed-off-by: Namhyung Kim
---
tools/perf/tests/task-exit.c | 10 +++---
1 file changed, 3 insertions(+), 7 deletion
tools/perf/perf.c:539
#12 0x7fef5c83cd09 in __libc_start_main ../csu/libc-start.c:308
...
test child finished with 1
end
Software clock events period values : FAILED!
Signed-off-by: Namhyung Kim
---
tools/perf/tests/sw-clock.c | 12
1 file changed, 4
t applied cleanly. But
I can add them if you want, so please let me know.
It's also available at perf/asan-fix-v1 branch in
git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git
Thanks,
Namhyung
Namhyung Kim (11):
perf test: Fix cpu and thread map leaks in basic mmap
using the mmap interface: FAILED!
failed to open shell test directory:
/home/namhyung/libexec/perf-core/tests/shell
Signed-off-by: Namhyung Kim
---
tools/perf/tests/mmap-basic.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/tools/perf/tests/mmap-basic.c b/tools/perf/tests/mmap-basic.c
/asan_malloc_linux.cpp:145
#1 0x7f5444f8c6a7 in __vasprintf_internal libio/vasprintf.c:71
SUMMARY: AddressSanitizer: 14 byte(s) leaked in 1 allocation(s).
test child finished with 1
end
Remove thread map: FAILED!
Signed-off-by: Namhyung Kim
---
tools/perf/tests/thread-map.c | 7 ++-
1
1 - 100 of 4425 matches
Mail list logo