Re: [PATCH RESEND 0/4] Add support for HiSilicon PCIe Tune and Trace device

2021-04-17 Thread Alexander Shishkin
Yicong Yang writes: > The reason for not using perf is because there is no current support > for uncore tracing in the perf facilities. Not unless you count $ perf list|grep -ic uncore 77 > We have our own format > of data and don't need perf doing the parsing. Perf has AUX buffers, which

[tip: perf/core] perf: Cap allocation order at aux_watermark

2021-04-16 Thread tip-bot2 for Alexander Shishkin
The following commit has been merged into the perf/core branch of tip: Commit-ID: d68e6799a5c87f415d3bfa0dea49caee28ab00d1 Gitweb: https://git.kernel.org/tip/d68e6799a5c87f415d3bfa0dea49caee28ab00d1 Author:Alexander Shishkin AuthorDate:Wed, 14 Apr 2021 18:49:54 +03:00

[tip: perf/core] perf intel-pt: Use aux_watermark

2021-04-16 Thread tip-bot2 for Alexander Shishkin
The following commit has been merged into the perf/core branch of tip: Commit-ID: 874fc35cdd55e2d46161901de43ec58ca2efc5fe Gitweb: https://git.kernel.org/tip/874fc35cdd55e2d46161901de43ec58ca2efc5fe Author:Alexander Shishkin AuthorDate:Wed, 14 Apr 2021 18:49:55 +03:00

Re: [PATCH v1 2/2] dt-bindings: arm: add property for coresight component name

2021-04-16 Thread Alexander Shishkin
Tao Zhang writes: > Add property "coresight-name" for coresight component name. This > allows coresight driver to read device name from device entries. > > Signed-off-by: Tao Zhang > --- > Documentation/devicetree/bindings/arm/coresight.txt | 2 ++ > 1 file changed, 2 insertions(+) > > diff

Re: [PATCH v1 1/2] coresight: Add support for device names

2021-04-16 Thread Alexander Shishkin
Tao Zhang writes: > diff --git a/drivers/hwtracing/coresight/coresight-core.c > b/drivers/hwtracing/coresight/coresight-core.c > index 4ba801d..b79c726 100644 > --- a/drivers/hwtracing/coresight/coresight-core.c > +++ b/drivers/hwtracing/coresight/coresight-core.c > @@ -1640,6 +1640,12 @@ char

Re: [PATCH 2/7] stm class: Replace uuid_t with plain u8 uuid[16]

2021-04-15 Thread Alexander Shishkin
Greg Kroah-Hartman writes: > On Wed, Apr 14, 2021 at 10:14:34PM +0300, Alexander Shishkin wrote: >> Greg Kroah-Hartman writes: >> >> >> Using raw buffer APIs against uuid_t / guid_t. >> > >> > So you want to do that, or you do not want

[PATCH] stm class: Use correct UUID APIs

2021-04-15 Thread Alexander Shishkin
STM code is poking directly at the byte array inside the uuid_t when it uses the UUID for its internal purposes. Fix these two transgressions by using intended APIs instead. Signed-off-by: Andy Shevchenko [ash: changed back to uuid_t and updated the commit message] Signed-off-by: Alexander

Re: [PATCH 2/7] stm class: Replace uuid_t with plain u8 uuid[16]

2021-04-14 Thread Alexander Shishkin
essage] Signed-off-by: Alexander Shishkin --- drivers/hwtracing/stm/p_sys-t.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/hwtracing/stm/p_sys-t.c b/drivers/hwtracing/stm/p_sys-t.c index 360b5c03df95..8254971c02e7 100644 --- a/drivers/hwtracing/stm/p_sys

[PATCH 7/7] intel_th: pci: Add Alder Lake-M support

2021-04-14 Thread Alexander Shishkin
This adds support for the Trace Hub in Alder Lake-M PCH. Signed-off-by: Alexander Shishkin Reviewed-by: Andy Shevchenko Cc: sta...@vger.kernel.org # v4.14+ --- drivers/hwtracing/intel_th/pci.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/hwtracing/intel_th/pci.c b/drivers

[PATCH 3/7] intel_th: Constify all drvdata references

2021-04-14 Thread Alexander Shishkin
Anything that deals with drvdata structures should leave them intact. Reflect this in function signatures. Signed-off-by: Alexander Shishkin Reviewed-by: Andy Shevchenko --- drivers/hwtracing/intel_th/core.c | 2 +- drivers/hwtracing/intel_th/intel_th.h | 6 +++--- drivers/hwtracing

[PATCH 6/7] intel_th: pci: Add Rocket Lake CPU support

2021-04-14 Thread Alexander Shishkin
This adds support for the Trace Hub in Rocket Lake CPUs. Signed-off-by: Alexander Shishkin Reviewed-by: Andy Shevchenko Cc: stable # v4.14+ --- drivers/hwtracing/intel_th/pci.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/hwtracing/intel_th/pci.c b/drivers/hwtracing

[PATCH 5/7] intel_th: Consistency and off-by-one fix

2021-04-14 Thread Alexander Shishkin
From: Pavel Machek Consistently use "< ... +1" in for loops. Fix of-by-one in for_each_set_bit(). Signed-off-by: Pavel Machek Signed-off-by: Alexander Shishkin Link: https://lore.kernel.org/lkml/20190724095841.GA6952@amd/ Reviewed-by: Andy Shevchenko --- drivers/hwtracing/i

[PATCH 4/7] intel_th: Constify attribute_group structs

2021-04-14 Thread Alexander Shishkin
Signed-off-by: Alexander Shishkin Reviewed-by: Andy Shevchenko --- drivers/hwtracing/intel_th/intel_th.h | 2 +- drivers/hwtracing/intel_th/msu.c | 2 +- drivers/hwtracing/intel_th/pti.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/hwtracing/intel_th

[PATCH 2/7] stm class: Replace uuid_t with plain u8 uuid[16]

2021-04-14 Thread Alexander Shishkin
From: Andy Shevchenko It appears that uuid_t use in STM code abuses UUID API. Moreover, this type is only useful when we parse user input. Due to above replace uuid_t with u8 uuid[16] and use uuid_t only when parse user input. Signed-off-by: Andy Shevchenko Signed-off-by: Alexander Shishkin

[PATCH 1/7] stm class: Remove an unused function

2021-04-14 Thread Alexander Shishkin
From: Jiapeng Chong Fix the following clang warning: drivers/hwtracing/stm/policy.c:60:21: warning: unused function 'stp_policy_node_name' [-Wunused-function]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alexander Shishkin Reviewed-by: Andy Shevchenko --- drivers

[PATCH 0/7] stm class/intel_th: Updates for v5.13

2021-04-14 Thread Alexander Shishkin
Hi Greg, Here are the stm class and intel_th updates that I have for v5.13. These are all trivial, including 2 new PCI IDs. Andy provided his reviewed-bys. Please consider applying. Thank you! Alexander Shishkin (3): intel_th: Constify all drvdata references intel_th: pci: Add Rocket Lake

[PATCH 0/2] perf, pt: Improve data loss

2021-04-14 Thread Alexander Shishkin
interfere with PMU drivers that don't ignore said watermark / handle->wakeup (afaict, that's only arm_spe). Alexander Shishkin (2): perf: Cap allocation order at aux_watermark perf intel-pt: Use aux_watermark kernel/events/ring_buffer.c | 34 +++-- tools/perf/a

[PATCH v1 2/2] perf intel-pt: Use aux_watermark

2021-04-14 Thread Alexander Shishkin
th large workloads and large buffers, although less pronounced. Signed-off-by: Alexander Shishkin --- tools/perf/arch/x86/util/intel-pt.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/perf/arch/x86/util/intel-pt.c b/tools/perf/arch/x86/util/intel-pt.c index a6420c647959..6df0dc00d73

[PATCH v1 1/2] perf: Cap allocation order at aux_watermark

2021-04-14 Thread Alexander Shishkin
PMU driver, but seeing as it's the only one currently making use of high order allocations, there is no reason not to fix the allocator instead. This way, any other driver wishing to add this support would not have to worry about this. Signed-off-by: Alexander Shishkin --- kernel/events

Re: [PATCH 2/2] perf intel-pt: Use aux_watermark

2021-04-14 Thread Alexander Shishkin
Adrian Hunter writes: > On 8/04/21 6:31 pm, Alexander Shishkin wrote: >> diff --git a/tools/perf/arch/x86/util/intel-pt.c >> b/tools/perf/arch/x86/util/intel-pt.c >> index a6420c647959..d00707faf547 100644 >> --- a/tools/perf/arch/x86/util/intel-pt.c >> +++ b/to

[PATCH 2/2] perf intel-pt: Use aux_watermark

2021-04-08 Thread Alexander Shishkin
th large workloads and large buffers, although less pronounced. Signed-off-by: Alexander Shishkin --- tools/perf/arch/x86/util/intel-pt.c | 4 1 file changed, 4 insertions(+) diff --git a/tools/perf/arch/x86/util/intel-pt.c b/tools/perf/arch/x86/util/intel-pt.c index a6420c647959..d00707faf54

[PATCH 1/2] perf: Cap allocation order at aux_watermark

2021-04-08 Thread Alexander Shishkin
PMU driver, but seeing as it's the only one currently making use of high order allocations, there is no reason not to fix the allocator instead. This way, any other driver wishing to add this support would not have to worry about this. Signed-off-by: Alexander Shishkin --- kernel/events

[PATCH 0/2] perf, pt: Improve data loss

2021-04-08 Thread Alexander Shishkin
keup (afaict, that's only arm_spe). Alexander Shishkin (2): perf: Cap allocation order at aux_watermark perf intel-pt: Use aux_watermark kernel/events/ring_buffer.c | 34 +++-- tools/perf/arch/x86/util/intel-pt.c | 4 2 files changed, 22 insertions(+),

Re: [PATCH v1] misc: pti: Remove driver for deprecated platform

2021-01-22 Thread Alexander Shishkin
of supporting outdated drivers > we remove the support of outdated platforms completely. > > Cc: Alexander Shishkin > Signed-off-by: Andy Shevchenko > Acked-by: Linus Walleij FWIW, Acked-by: Alexander Shishkin Regards, -- Alex

[PATCH 2/2] intel_th: pci: Add Alder Lake-P support

2021-01-15 Thread Alexander Shishkin
This adds support for the Trace Hub in Alder Lake-P. Signed-off-by: Alexander Shishkin --- drivers/hwtracing/intel_th/pci.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/hwtracing/intel_th/pci.c b/drivers/hwtracing/intel_th/pci.c index 52acd77438ed..251e75c9ba9d 100644

[PATCH 1/2] stm class: Fix module init return on allocation failure

2021-01-15 Thread Alexander Shishkin
ource device") Signed-off-by: Wang Hui Signed-off-by: Alexander Shishkin --- drivers/hwtracing/stm/heartbeat.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/hwtracing/stm/heartbeat.c b/drivers/hwtracing/stm/heartbeat.c index 3e7df1c0477f..81d7b21d3

[PATCH 0/2] stm class/intel_th: Fixes for v5.11

2021-01-15 Thread Alexander Shishkin
Hi Greg, Here are updates that I have for v5.11. These are: one minor bugfix and a new PCI ID. Alexander Shishkin (1): intel_th: pci: Add Alder Lake-P support Wang Hui (1): stm class: Fix module init return on allocation failure drivers/hwtracing/intel_th/pci.c | 5 + drivers

Re: [RFC] perf evlist: Warn if event group has mixed sw/hw events

2020-10-26 Thread Alexander Shishkin
Andi Kleen writes: > On Mon, Oct 26, 2020 at 11:19:37PM +0900, Namhyung Kim wrote: >> This patch just added a warning before running it. I'd really want to >> fix the kernel if possible but don't have a good idea. Thoughts? > > The easiest fix would be some multi threading in perf stat

[PATCH 3/8] tracing: Add trace_export support for event trace

2020-10-05 Thread Alexander Shishkin
-by: Steven Rostedt (VMware) Reviewed-by: Alexander Shishkin Signed-off-by: Alexander Shishkin --- include/linux/trace.h | 1 + kernel/trace/trace.c | 259 ++ 2 files changed, 135 insertions(+), 125 deletions(-) diff --git a/include/linux/trace.h b/include

[PATCH 8/8] intel_th: pci: Add Alder Lake CPU support

2020-10-05 Thread Alexander Shishkin
This adds support for the Trace Hub in Alder Lake CPU. Signed-off-by: Alexander Shishkin Cc: sta...@vger.kernel.org # v4.14+ --- drivers/hwtracing/intel_th/pci.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/hwtracing/intel_th/pci.c b/drivers/hwtracing/intel_th/pci.c index

[PATCH 4/8] tracing: Add trace_export support for trace_marker

2020-10-05 Thread Alexander Shishkin
From: Tingwei Zhang Add the support to route trace_marker buffer to other destination via trace_export. Signed-off-by: Tingwei Zhang Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Alexander Shishkin Signed-off-by: Alexander Shishkin --- include/linux/trace.h | 1 + kernel/trace/trace.c

[PATCH 1/8] stm class: ftrace: Change dependency to TRACING

2020-10-05 Thread Alexander Shishkin
From: Tingwei Zhang We will support copying event trace to STM. Change STM_SOURCE_FTRACE to depend on TRACING since we will support multiple tracers. Signed-off-by: Tingwei Zhang Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Alexander Shishkin Signed-off-by: Alexander Shishkin

[PATCH 0/8] stm class/intel_th: Updates for v5.10

2020-10-05 Thread Alexander Shishkin
patches add new PCI IDs to the Intel TH driver, which would normally go in a "fixes" patchset, but this late in the cycle that doesn't make much sense, so they are included in the same series. Alexander Shishkin (2): intel_th: pci: Add Alder Lake-S support intel_th: pci: Add Alde

[PATCH 6/8] stm class: ftrace: Use different channel accroding to CPU

2020-10-05 Thread Alexander Shishkin
From: Tingwei Zhang To avoid mixup of packets from differnt ftrace packets simultaneously, use different channel for packets from different CPU. Signed-off-by: Tingwei Zhang Reviewed-by: Steven Rostedt (VMware) Signed-off-by: Alexander Shishkin --- drivers/hwtracing/stm/ftrace.c | 5

[PATCH 5/8] stm class: ftrace: Enable supported trace export flag

2020-10-05 Thread Alexander Shishkin
From: Tingwei Zhang Set flags for trace_export. Export function trace, event trace and trace marker to stm. Signed-off-by: Tingwei Zhang Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Alexander Shishkin Signed-off-by: Alexander Shishkin --- drivers/hwtracing/stm/ftrace.c | 2 ++ 1 file

[PATCH 7/8] intel_th: pci: Add Alder Lake-S support

2020-10-05 Thread Alexander Shishkin
This adds support for the Trace Hub in Alder Lake-S. Signed-off-by: Alexander Shishkin Cc: sta...@vger.kernel.org # v4.14+ --- drivers/hwtracing/intel_th/pci.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/hwtracing/intel_th/pci.c b/drivers/hwtracing/intel_th/pci.c index

[PATCH 2/8] tracing: Add flag to control different traces

2020-10-05 Thread Alexander Shishkin
Rostedt (VMware) Reviewed-by: Alexander Shishkin Signed-off-by: Alexander Shishkin --- include/linux/trace.h | 5 + kernel/trace/trace.c | 36 +++- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/include/linux/trace.h b/include/linux/trace.h

Re: [PATCH v3 0/6] tracing: export event trace and trace_marker

2020-09-18 Thread Alexander Shishkin
Tingwei Zhang writes: > Hi Alexander, Maxime, Aleandre, > > May I know your comments for this patch set? Everything except the last patch is Reviewed-by: Alexander Shishkin After that one is resolved either I can pick it up or Stephen. Either way is fine with me. Regards, -- Alex

Re: [PATCH v3 6/6] stm class: ftrace: use different channel accroding to CPU

2020-09-18 Thread Alexander Shishkin
Tingwei Zhang writes: > @@ -63,6 +65,7 @@ static int __init stm_ftrace_init(void) > { > int ret; > > + stm_ftrace.data.nr_chans = num_possible_cpus(); Not a problem with this patch necesarily, but this made me realize that .nr_chans may be larger than: (1) what the policy

[PATCH] perf: Turn kernel address filters into linear address filters

2020-09-09 Thread Alexander Shishkin
needed there. No tooling changes required, either. Signed-off-by: Alexander Shishkin --- arch/x86/events/intel/pt.c | 13 - kernel/events/core.c | 22 ++ 2 files changed, 10 insertions(+), 25 deletions(-) diff --git a/arch/x86/events/intel/pt.c b/arch/x86

Re: [PATCH] kernel: events: Use scnprintf() in show_pmu_*() instead of snprintf()

2020-09-09 Thread Alexander Shishkin
Shuah Khan writes: > Since snprintf() returns would-be-output size instead of the actual > output size, replace it with scnprintf(), so the nr_addr_filters_show(), > type_show(), and perf_event_mux_interval_ms_show() routines return the > actual size. Well, firstly they should just be

Re: [PATCH 1/2] perf: Add closing sibling events' file descriptors

2020-08-11 Thread Alexander Shishkin
Andi Kleen writes: > On Tue, Aug 11, 2020 at 12:47:24PM +0300, Alexander Shishkin wrote: >> >> Right, but which bytes? One byte per event? That's >> arbitrary. sizeof(struct perf_event)? Then, probably also sizeof(struct >> perf_event_context). > > Yes

Re: [PATCH 1/2] perf: Add closing sibling events' file descriptors

2020-08-11 Thread Alexander Shishkin
Andi Kleen writes: >> It didn't. I can't figure out what to charge on the locked memory, as >> all that memory is in kernel-side objects. It also needs to make sense > > I don't see how that makes a difference for the count. It just account > bytes. Can you elaborate? Right, but which bytes?

Re: [PATCH 1/2] perf: Add closing sibling events' file descriptors

2020-08-10 Thread Alexander Shishkin
Andi Kleen writes: >> > This adds an opt-in flag to the perf_event_open() syscall to retain >> > sibling events after their file descriptors are closed. In this case, the >> > actual events will be closed with the group leader. >> >> So having the 1:1 relation with filedesc imposes a resource

[PATCH 1/2] perf: Add closing sibling events' file descriptors

2020-07-08 Thread Alexander Shishkin
an opt-in flag to the perf_event_open() syscall to retain sibling events after their file descriptors are closed. In this case, the actual events will be closed with the group leader. Signed-off-by: Alexander Shishkin Suggested-by: Andi Kleen --- include/linux/perf_event.h | 7 ++ include

[PATCH 2/2] perf record: Support closing siblings' file descriptors

2020-07-08 Thread Alexander Shishkin
it with 'ulimit -n ' After: > $ perf record -e '{dummy,syscalls:*}' -o after.data uname > Couldn't synthesize cgroup events. > Linux > [ perf record: Woken up 5 times to write data ] > [ perf record: Captured and wrote 0.118 MB after.data (62 samples) ] Signed-off-by: Alexander Shishk

[PATCH 0/2] perf: Allow closing siblings' file descriptors

2020-07-08 Thread Alexander Shishkin
, but I'll hack stat as well if this general approach is agreeable). Alexander Shishkin (2): perf: Add closing sibling events' file descriptors perf record: Support closing siblings' file descriptors include/linux/perf_event.h | 7 ++ include/uapi/linux/perf_event.h | 1

[PATCH 0/4] intel_th: Fixes for v5.8

2020-07-06 Thread Alexander Shishkin
Hi Greg, Here are the fixes I have for v5.8 cycle so far. There is, in fact, just one bugfix and 3 new PCI IDs. Nothing dramatic. Andy's r-bs are included. Please consider applying. Thanks! Alexander Shishkin (4): intel_th: pci: Add Jasper Lake CPU support intel_th: pci: Add Tiger Lake PCH-H

[PATCH 2/4] intel_th: pci: Add Tiger Lake PCH-H support

2020-07-06 Thread Alexander Shishkin
This adds support for the Trace Hub in Tiger Lake PCH-H. Signed-off-by: Alexander Shishkin Reviewed-by: Andy Shevchenko Cc: sta...@vger.kernel.org # v4.14+ --- drivers/hwtracing/intel_th/pci.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/hwtracing/intel_th/pci.c b/drivers

[PATCH 4/4] intel_th: Fix a NULL dereference when hub driver is not loaded

2020-07-06 Thread Alexander Shishkin
question is loaded and return an error if not. Signed-off-by: Alexander Shishkin Fixes: 39f4034693b7c ("intel_th: Add driver infrastructure for Intel(R) Trace Hub devices") Reviewed-by: Andy Shevchenko Reported-by: Ammy Yi Tested-by: Ammy Yi Cc: sta...@vger.kernel.org #

[PATCH 3/4] intel_th: pci: Add Emmitsburg PCH support

2020-07-06 Thread Alexander Shishkin
This adds support for the Trace Hub in Emmitsburg PCH. Signed-off-by: Alexander Shishkin Reviewed-by: Andy Shevchenko Cc: sta...@vger.kernel.org # v4.14+ --- drivers/hwtracing/intel_th/pci.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/hwtracing/intel_th/pci.c b/drivers

[PATCH 1/4] intel_th: pci: Add Jasper Lake CPU support

2020-07-06 Thread Alexander Shishkin
This adds support for the Trace Hub in Jasper Lake CPU. Signed-off-by: Alexander Shishkin Reviewed-by: Andy Shevchenko Cc: sta...@vger.kernel.org # v4.14+ --- drivers/hwtracing/intel_th/pci.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/hwtracing/intel_th/pci.c b/drivers

Re: [PATCH v2 4/4] perf/x86/intel/pt: Opportunistically use single range output mode

2019-10-23 Thread Alexander Shishkin
Alexander Shishkin writes: > diff --git a/arch/x86/events/intel/pt.c b/arch/x86/events/intel/pt.c > index 2f20d5a333c1..6edd7b785861 100644 > --- a/arch/x86/events/intel/pt.c > +++ b/arch/x86/events/intel/pt.c > @@ -491,7 +491,9 @@ static void pt_config(struct pe

Re: [PATCH 1/3] perf: Optimize perf_install_in_event()

2019-10-23 Thread Alexander Shishkin
Peter Zijlstra writes: > + /* > + * perf_event_attr::disabled events will not run and can be initialized > + * without IPI. Except when this is the first event for the context, in > + * that case we need the magic of the IPI to set ctx->is_active. > + * > + * The

[tip: perf/urgent] perf/aux: Fix AUX output stopping

2019-10-22 Thread tip-bot2 for Alexander Shishkin
The following commit has been merged into the perf/urgent branch of tip: Commit-ID: f3a519e4add93b7b31a6616f0b09635ff2e6a159 Gitweb: https://git.kernel.org/tip/f3a519e4add93b7b31a6616f0b09635ff2e6a159 Author:Alexander Shishkin AuthorDate:Tue, 22 Oct 2019 10:39:40 +03:00

[PATCH v2 3/4] perf/x86/intel/pt: Add sampling support

2019-10-22 Thread Alexander Shishkin
Add AUX sampling support to the PT PMU: implement an NMI-safe callback that takes a snapshot of the buffer without touching the event states. This is done for PT events that don't use PMIs, that is, snapshot mode (RO mapping of the AUX area). Signed-off-by: Alexander Shishkin --- arch/x86

[PATCH v2 4/4] perf/x86/intel/pt: Opportunistically use single range output mode

2019-10-22 Thread Alexander Shishkin
the first condition will also be satisfied. The two most obvious benefits of the Single Range Output mode over the ToPA are: * not having to allocate the ToPA table(s), * not using the ToPA walk hardware. Make use of this functionality where available and appropriate. Signed-off-by: Alexander

[PATCH v2 1/4] perf: Allow using AUX data in perf samples

2019-10-22 Thread Alexander Shishkin
need to explicitly add support for sampling, because it relies on a new callback to take a snapshot of the buffer without touching the event states. Signed-off-by: Alexander Shishkin --- include/linux/perf_event.h | 20 include/uapi/linux/perf_event.h | 7 +- kernel/events/core.c

[PATCH v2 2/4] perf/x86/intel/pt: Factor out starting the trace

2019-10-22 Thread Alexander Shishkin
we can use a lighter version that keeps the configuration intact, since it hasn't changed, and only flips the enable bit. Signed-off-by: Alexander Shishkin --- arch/x86/events/intel/pt.c | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/arch/x86/events

[PATCH v2 0/4] perf: Add AUX data sampling

2019-10-22 Thread Alexander Shishkin
rc.info/?l=linux-kernel=147467007714928=2 [2] https://git.kernel.org/cgit/linux/kernel/git/ash/linux.git/log/?h=perf-aux-sampling [3] https://marc.info/?l=linux-kernel=15287828771 [4] https://marc.info/?l=linux-kernel=157172999231707 Alexander Shishkin (4): perf: Allow using AUX data in pe

[PATCH] perf: Fix AUX output stopping

2019-10-22 Thread Alexander Shishkin
: 0010:perf_mmap_close+0x839/0x850 Fix this by using the context's PMU context when looking for events to stop, instead of the event's PMU context. Signed-off-by: Alexander Shishkin Cc: sta...@vger.kernel.org --- kernel/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

Re: [PATCH] perf/x86/intel/pt: Fix base for single entry topa

2019-10-21 Thread Alexander Shishkin
Jiri Olsa writes: > Jan reported failing ltp test for pt. It looks like the reason > is commit 38bb8d77d0b9, that did not keep the TOPA_SHIFT for > entry base, adding it back. Thanks for taking care of that so quickly! Regards, -- Alex

Re: [PATCH] perf: Fix inheritance of aux_output groups

2019-10-07 Thread Alexander Shishkin
Ingo Molnar writes: > * Alexander Shishkin wrote: > >> Commit >> >> b43762ef010 ("perf: Allow normal events to output AUX data") > > Missing 'a', the proper SHA1 is: > > ab43762ef010 ("perf: Allow normal events to output AUX data"

[tip: perf/urgent] perf/core: Fix inheritance of aux_output groups

2019-10-07 Thread tip-bot2 for Alexander Shishkin
The following commit has been merged into the perf/urgent branch of tip: Commit-ID: f733c6b508bcaa3441ba1eacf16efb9abd47489f Gitweb: https://git.kernel.org/tip/f733c6b508bcaa3441ba1eacf16efb9abd47489f Author:Alexander Shishkin AuthorDate:Fri, 04 Oct 2019 15:57:29 +03:00

[PATCH] perf: Fix inheritance of aux_output groups

2019-10-04 Thread Alexander Shishkin
Commit b43762ef010 ("perf: Allow normal events to output AUX data") forgets to configure aux_output relation in the inherited groups, which results in child PEBS events forever failing to schedule. Fix this by setting up the AUX output link in the inheritance path. Signed-off-by:

Re: [PATCH v1 4/6] perf: Allow using AUX data in perf samples

2019-09-30 Thread Alexander Shishkin
Peter Zijlstra writes: > On Fri, Aug 09, 2019 at 03:32:39PM +0300, Alexander Shishkin wrote: >> The other problem is sampling SW events, that would require a ctx->lock >> to prevent racing with event_function_call()s from other cpus, resulting >> in somewhat cringy "

Re: [PATCH v1 4/6] perf: Allow using AUX data in perf samples

2019-09-26 Thread Alexander Shishkin
Alexander Shishkin writes: > Peter Zijlstra writes: > >> On Tue, Jun 19, 2018 at 01:47:25PM +0300, Alexander Shishkin wrote: >>> Right, the SW stuff may then race with event_function_call() stuff. Hmm. >>> For the HW stuff, I'm hoping that some kind of a sleight o

Re: [GIT PULL v1 0/4] stm class/intel_th: Fixes for v5.3

2019-08-28 Thread Alexander Shishkin
Alexander Shishkin writes: > Hi Greg, > > These are the fixes that I have for v5.3. One is an actual bugfix that's > copied to stable, one SPDX header fix and two new PCI IDs, copied to > stable as well. Signed tag below, individual patches follow. Please > consider applying

[tip: perf/core] perf: Allow normal events to output AUX data

2019-08-28 Thread tip-bot2 for Alexander Shishkin
The following commit has been merged into the perf/core branch of tip: Commit-ID: ab43762ef010967e4ccd53627f70a2eecbeafefb Gitweb: https://git.kernel.org/tip/ab43762ef010967e4ccd53627f70a2eecbeafefb Author:Alexander Shishkin AuthorDate:Tue, 06 Aug 2019 11:46:00 +03:00

[tip: perf/core] perf/x86/intel: Support PEBS output to PT

2019-08-28 Thread tip-bot2 for Alexander Shishkin
The following commit has been merged into the perf/core branch of tip: Commit-ID: 42880f726c66f13ae1d9ac9ce4c43abe64ecac84 Gitweb: https://git.kernel.org/tip/42880f726c66f13ae1d9ac9ce4c43abe64ecac84 Author:Alexander Shishkin AuthorDate:Tue, 06 Aug 2019 11:46:01 +03:00

[tip: perf/core] perf/x86/intel/pt: Clean up ToPA allocation path

2019-08-26 Thread tip-bot2 for Alexander Shishkin
The following commit has been merged into the perf/core branch of tip: Commit-ID: 90583af61d0c0d2826f42a297a03645b35c49085 Gitweb: https://git.kernel.org/tip/90583af61d0c0d2826f42a297a03645b35c49085 Author:Alexander Shishkin AuthorDate:Wed, 21 Aug 2019 15:47:22 +03:00

[tip: perf/core] perf/x86/intel/pt: Use pointer arithmetics instead in ToPA entry calculation

2019-08-26 Thread tip-bot2 for Alexander Shishkin
The following commit has been merged into the perf/core branch of tip: Commit-ID: 539f7c26b41d4ed7d88dd9756de3966ae7ca07b4 Gitweb: https://git.kernel.org/tip/539f7c26b41d4ed7d88dd9756de3966ae7ca07b4 Author:Alexander Shishkin AuthorDate:Wed, 21 Aug 2019 15:47:24 +03:00

[tip: perf/core] perf/x86/intel/pt: Get rid of reverse lookup table for ToPA

2019-08-26 Thread tip-bot2 for Alexander Shishkin
The following commit has been merged into the perf/core branch of tip: Commit-ID: 39152ee51b77851689f9b23fde6f610d13566c39 Gitweb: https://git.kernel.org/tip/39152ee51b77851689f9b23fde6f610d13566c39 Author:Alexander Shishkin AuthorDate:Wed, 21 Aug 2019 15:47:27 +03:00

[tip: perf/core] perf/x86/intel/pt: Split ToPA metadata and page layout

2019-08-26 Thread tip-bot2 for Alexander Shishkin
The following commit has been merged into the perf/core branch of tip: Commit-ID: 38bb8d77d0b932a0773b5de2ef42479409314f96 Gitweb: https://git.kernel.org/tip/38bb8d77d0b932a0773b5de2ef42479409314f96 Author:Alexander Shishkin AuthorDate:Wed, 21 Aug 2019 15:47:25 +03:00

[tip: perf/core] perf/x86/intel/pt: Use helpers to obtain ToPA entry size

2019-08-26 Thread tip-bot2 for Alexander Shishkin
The following commit has been merged into the perf/core branch of tip: Commit-ID: fffec50f541ace292383c0cbe9a2a97d16d201c6 Gitweb: https://git.kernel.org/tip/fffec50f541ace292383c0cbe9a2a97d16d201c6 Author:Alexander Shishkin AuthorDate:Wed, 21 Aug 2019 15:47:23 +03:00

[tip: perf/core] perf/x86/intel/pt: Free up space in a ToPA descriptor

2019-08-26 Thread tip-bot2 for Alexander Shishkin
The following commit has been merged into the perf/core branch of tip: Commit-ID: 91feca5e2ecc9752894d57c9a72c2645471929c3 Gitweb: https://git.kernel.org/tip/91feca5e2ecc9752894d57c9a72c2645471929c3 Author:Alexander Shishkin AuthorDate:Wed, 21 Aug 2019 15:47:26 +03:00

[PATCH v0 3/6] perf/x86/intel/pt: Use pointer arithmetics instead in ToPA entry calculation

2019-08-21 Thread Alexander Shishkin
Currently, pt_buffer_reset_offsets() calculates the current ToPA entry by casting pointers to addresses and performing ungainly subtractions and divisions instead of a simpler pointer arithmetic, which would be perfectly applicable in that case. Fix that. Signed-off-by: Alexander Shishkin

[PATCH v0 1/6] perf/x86/intel/pt: Clean up ToPA allocation path

2019-08-21 Thread Alexander Shishkin
Some of the allocation parameters are passed as function arguments, while the CPU number for per-cpu allocation is passed via the buffer object. There's no reason for this. Pass the CPU as a function argument instead. Signed-off-by: Alexander Shishkin --- arch/x86/events/intel/pt.c | 15

[PATCH v0 2/6] perf/x86/intel/pt: Use helpers to obtain ToPA entry size

2019-08-21 Thread Alexander Shishkin
There are a few places in the PT driver that need to obtain the size of a ToPA entry, some of them for the current ToPA entry in the buffer. Use helpers for those, to make the lines shorter and more readable. Signed-off-by: Alexander Shishkin --- arch/x86/events/intel/pt.c | 12 ++-- 1

[PATCH v0 0/6] perf/x86/intel/pt: Misc updates

2019-08-21 Thread Alexander Shishkin
, and we get to free up some memory that the table occupies. Plus, we get to allocate 2G (and up) PT buffers should we be so inclined. Others are small reworks and cleanups striving to make the code easier on the eyes. Alexander Shishkin (6): perf/x86/intel/pt: Clean up ToPA allocation path perf

[PATCH v0 6/6] perf/x86/intel/pt: Get rid of reverse lookup table for ToPA

2019-08-21 Thread Alexander Shishkin
, the runtime penalty of such a lookup is much smaller and in cases where all entries in a ToPA table are of the same size, the complexity is O(1). Signed-off-by: Alexander Shishkin --- arch/x86/events/intel/pt.c | 194 - arch/x86/events/intel/pt.h | 10 +- 2 files

[PATCH v0 5/6] perf/x86/intel/pt: Free up space in a ToPA descriptor

2019-08-21 Thread Alexander Shishkin
Currently, we're storing physical address of a ToPA table in its descriptor, which is completely unnecessary. Since the descriptor and the table itself share the same page, reducing the descriptor size leaves more space for the table. Signed-off-by: Alexander Shishkin --- arch/x86/events/intel

[PATCH v0 4/6] perf/x86/intel/pt: Split ToPA metadata and page layout

2019-08-21 Thread Alexander Shishkin
, the 32-bit version can be made smaller. By splitting the table and metadata into separate structures, we are making the compiler figure out the division of the page. Signed-off-by: Alexander Shishkin --- arch/x86/events/intel/pt.c | 93 -- 1 file changed, 60

[GIT PULL v1 0/4] stm class/intel_th: Fixes for v5.3

2019-08-21 Thread Alexander Shishkin
Hi Greg, These are the fixes that I have for v5.3. One is an actual bugfix that's copied to stable, one SPDX header fix and two new PCI IDs, copied to stable as well. Signed tag below, individual patches follow. Please consider applying or pulling. Thanks! Alexander Shishkin (2): intel_th: pci

[GIT PULL v1 3/4] intel_th: pci: Add support for another Lewisburg PCH

2019-08-21 Thread Alexander Shishkin
Add support for the Trace Hub in another Lewisburg PCH. Signed-off-by: Alexander Shishkin Cc: sta...@vger.kernel.org # v4.14+ --- drivers/hwtracing/intel_th/pci.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/hwtracing/intel_th/pci.c b/drivers/hwtracing/intel_th/pci.c index

[GIT PULL v1 4/4] intel_th: pci: Add Tiger Lake support

2019-08-21 Thread Alexander Shishkin
This adds support for the Trace Hub in Tiger Lake PCH. Signed-off-by: Alexander Shishkin Cc: sta...@vger.kernel.org # v4.14+ --- drivers/hwtracing/intel_th/pci.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/hwtracing/intel_th/pci.c b/drivers/hwtracing/intel_th/pci.c index

[GIT PULL v1 1/4] stm class: Fix a double free of stm_source_device

2019-08-21 Thread Alexander Shishkin
-by: Alexander Shishkin Fixes: 7bd1d4093c2fa ("stm class: Introduce an abstraction for System Trace Module devices") Link: https://lore.kernel.org/linux-arm-kernel/1563354988-23826-1-git-send-email-dingxi...@cmss.chinamobile.com/ Cc: sta...@vger.kernel.org # v4.4+ --- drivers/hwt

[GIT PULL v1 2/4] intel_th: Use the correct style for SPDX License Identifier

2019-08-21 Thread Alexander Shishkin
made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46 Suggested-by: Joe Perches Signed-off-by: Nishad Kamdar Signed-off-by: Alexander Shishkin Fixes: 50352fa730328 ("intel_th: Add SPDX GPL-2.0 header to replace GPLv2 boilerplate") Link: https://lore.

Re: [GIT PULL 3/4] intel_th: pci: Add support for another Lewisburg PCH

2019-08-20 Thread Alexander Shishkin
Greg Kroah-Hartman writes: > On Tue, Aug 20, 2019 at 01:16:52PM +0300, Alexander Shishkin wrote: >> Add support for the Trace Hub in another Lewisburg PCH. >> >> Signed-off-by: Alexander Shishkin >> --- >> drivers/hwtracing/intel_th/pci.c | 5 + >> 1

[GIT PULL 2/4] intel_th: Use the correct style for SPDX License Identifier

2019-08-20 Thread Alexander Shishkin
made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46 Suggested-by: Joe Perches Signed-off-by: Nishad Kamdar Signed-off-by: Alexander Shishkin Fixes: 50352fa730328 ("intel_th: Add SPDX GPL-2.0 header to replace GPLv2 boilerplate") Link: https://lore.

[GIT PULL 0/4] stm class/intel_th: Fixes for v5.3

2019-08-20 Thread Alexander Shishkin
. Alexander Shishkin (2): intel_th: pci: Add support for another Lewisburg PCH intel_th: pci: Add Tiger Lake support Ding Xiang (1): stm class: Fix a double free of stm_source_device Nishad Kamdar (1): intel_th: Use the correct style for SPDX License Identifier

[GIT PULL 4/4] intel_th: pci: Add Tiger Lake support

2019-08-20 Thread Alexander Shishkin
This adds support for the Trace Hub in Tiger Lake PCH. Signed-off-by: Alexander Shishkin --- drivers/hwtracing/intel_th/pci.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/hwtracing/intel_th/pci.c b/drivers/hwtracing/intel_th/pci.c index 5c4e4fbec936..91dfeba62485 100644

[GIT PULL 3/4] intel_th: pci: Add support for another Lewisburg PCH

2019-08-20 Thread Alexander Shishkin
Add support for the Trace Hub in another Lewisburg PCH. Signed-off-by: Alexander Shishkin --- drivers/hwtracing/intel_th/pci.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/hwtracing/intel_th/pci.c b/drivers/hwtracing/intel_th/pci.c index c0378c3de9a4..5c4e4fbec936 100644

[GIT PULL 1/4] stm class: Fix a double free of stm_source_device

2019-08-20 Thread Alexander Shishkin
-by: Alexander Shishkin Fixes: 7bd1d4093c2fa ("stm class: Introduce an abstraction for System Trace Module devices") Link: https://lore.kernel.org/linux-arm-kernel/1563354988-23826-1-git-send-email-dingxi...@cmss.chinamobile.com/ Cc: sta...@vger.kernel.org # v4.4+ --- drivers/hwt

[tip:perf/core] perf record: Add an option to take an AUX snapshot on exit

2019-08-15 Thread tip-bot for Alexander Shishkin
Commit-ID: ce7b0e426ef359ee1d4a6126314ee3547a8eed87 Gitweb: https://git.kernel.org/tip/ce7b0e426ef359ee1d4a6126314ee3547a8eed87 Author: Alexander Shishkin AuthorDate: Tue, 6 Aug 2019 17:41:01 +0300 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 14 Aug 2019 10:59:59 -0300 perf

Re: [PATCH v6 7/7] perf intel-pt: Add brief documentation for PEBS via Intel PT

2019-08-13 Thread Alexander Shishkin
Arnaldo Carvalho de Melo writes: > I've just blindly followed the provided documentation :) Yes, I should have checked it also before I sent it out. :) > So you say I should have tried this instead: > > # perf record -c 1 -e '{intel_pt/branch=0/,cycles/aux-output/ppp}' uname Right. For

Re: [PATCH v6 7/7] perf intel-pt: Add brief documentation for PEBS via Intel PT

2019-08-13 Thread Alexander Shishkin
Arnaldo Carvalho de Melo writes: > Em Tue, Aug 06, 2019 at 11:46:06AM +0300, Alexander Shishkin escreveu: >> From: Adrian Hunter >> >> Document how to select PEBS via Intel PT and how to display synthesized >> PEBS samples. >> >> Signed-off-by: Adr

Re: [PATCH v1 4/6] perf: Allow using AUX data in perf samples

2019-08-09 Thread Alexander Shishkin
Peter Zijlstra writes: > On Tue, Jun 19, 2018 at 01:47:25PM +0300, Alexander Shishkin wrote: >> Right, the SW stuff may then race with event_function_call() stuff. Hmm. >> For the HW stuff, I'm hoping that some kind of a sleight of hand may >> suffice. Let me think some

[PATCH v1] perf record: Add an option to take an AUX snapshot on exit

2019-08-06 Thread Alexander Shishkin
option 'e' can be specified in -S to enable this behavior: root@elsewhere:~# perf record -e intel_pt// -Se sleep 1 [ perf record: Woken up 2 times to write data ] [ perf record: Captured and wrote 0.085 MB perf.data ] Signed-off-by: Alexander Shishkin Co-developed-by: Adrian Hunter --- tools/perf

Re: [PATCH] perf record: Add an option to take an AUX snapshot on exit

2019-08-06 Thread Alexander Shishkin
Alexander Shishkin writes: > It is sometimes useful to generate a snapshot when perf record exits; > I've been using a wrapper script around the workload that would do a > killall -USR2 perf when the workload exits. > > This patch makes it easier and also works when perf rec

  1   2   3   4   5   6   7   8   9   10   >