Re: [PATCH] mmc: tegra: Force correct divider calculation on DDR50/52

2018-07-17 Thread Adrian Hunter
uot;) > Signed-off-by: Aapo Vienamo Acked-by: Adrian Hunter > --- > drivers/mmc/host/sdhci-tegra.c | 17 - > 1 file changed, 16 insertions(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c > index ddf0

Re: [PATCH V3 4/7] mmc: sdhci: add 32-bit block count support for v4 mode

2018-07-17 Thread Adrian Hunter
On 17/07/18 12:14, Chunyan Zhang wrote: > Hi, > > On 17 July 2018 at 16:29, Adrian Hunter wrote: >> On 09/07/18 06:19, Chunyan Zhang wrote: >>> When Host Version 4 is enabled, SDMA System Address register is >>> re-defined as 32-bit Block Count, and SDMA uses

Re: [PATCH V3 5/7] mmc: sdhci: add Auto CMD Auto Select support

2018-07-17 Thread Adrian Hunter
On 09/07/18 06:19, Chunyan Zhang wrote: > As SD Host Controller Specification v4.10 documents: > Host Controller Version 4.10 defines this "Auto CMD Auto Select" mode. > Selection of Auto CMD depends on setting of CMD23 Enable in the Host > Control 2 register which indicates whether card supports C

Re: [PATCH V3 6/7] mmc: sdhci-sprd: added Spreadtrum's initial host controller

2018-07-17 Thread Adrian Hunter
On 09/07/18 06:19, Chunyan Zhang wrote: > From: Chunyan Zhang > > This patch adds the initial support of Secure Digital Host Controller > Interface compliant controller found in some latest Spreadtrum chipsets. > This patch has been tested on the version of SPRD-R11 controller. > > R11 is a vari

Re: [PATCH V3 6/7] mmc: sdhci-sprd: added Spreadtrum's initial host controller

2018-07-18 Thread Adrian Hunter
On 18/07/18 10:24, Chunyan Zhang wrote: > On 17 July 2018 at 19:52, Adrian Hunter wrote: >> On 09/07/18 06:19, Chunyan Zhang wrote: >>> From: Chunyan Zhang >>> >>> This patch adds the initial support of Secure Digital Host Controller >>> Interf

Re: [PATCH v4 0/9] uprobes: misc cleanups/simplifications

2024-08-02 Thread Adrian Hunter
On 2/08/24 12:25, Peter Zijlstra wrote: > On Thu, Aug 01, 2024 at 02:13:41PM -0700, Andrii Nakryiko wrote: > >> Ok, this bisected to: >> >> 675ad74989c2 ("perf/core: Add aux_pause, aux_resume, aux_start_paused") > > Adrian, there are at least two obvious bugs there: > > - aux_action was key's o

Re: [PATCH v4 0/9] uprobes: misc cleanups/simplifications

2024-08-02 Thread Adrian Hunter
On 2/08/24 14:02, Adrian Hunter wrote: > On 2/08/24 12:25, Peter Zijlstra wrote: >> On Thu, Aug 01, 2024 at 02:13:41PM -0700, Andrii Nakryiko wrote: >> >>> Ok, this bisected to: >>> >>> 675ad74989c2 ("perf/core: Add aux_pause, aux_resume, aux_star

[PATCH 0/3] KVM: x86: Fix Intel PT Host/Guest mode when host tracing also

2024-09-06 Thread Adrian Hunter
ix does not conflict with "Mediated Passthrough vPMU", it is just that "Mediated Passthrough vPMU" will make the code to stop and restart Intel PT unnecessary. Adrian Hunter (3): KVM: x86: Fix Intel PT IA32_RTIT_CTL MSR validation KVM: x86: Fix Intel PT Host/Gue

[PATCH 1/3] KVM: x86: Fix Intel PT IA32_RTIT_CTL MSR validation

2024-09-06 Thread Adrian Hunter
;) Cc: sta...@vger.kernel.org Signed-off-by: Adrian Hunter --- arch/x86/kvm/vmx/vmx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index f18c2d8c7476..3f1e3be552c0 100644 --- a/arch/x86/kvm/vmx/vmx.c +++ b/arch/x86/kvm/vmx/vmx.c

[PATCH 2/3] KVM: x86: Fix Intel PT Host/Guest mode when host tracing also

2024-09-06 Thread Adrian Hunter
uest mode. That also fixes the issue whereby the Intel PT NMI handler would set IA32_RTIT_CTL.TraceEn back to 1 after KVM has just set it to 0. Fixes: 2ef444f1600b ("KVM: x86: Add Intel PT context switch for each vcpu") Cc: sta...@vger.kernel.org Signed-off-by: Adrian Hunter --- arch/x8

[PATCH 3/3] KVM: selftests: Add guest Intel PT test

2024-09-06 Thread Adrian Hunter
Add a test that starts Intel PT traces on host and guest. The test requires support for Intel PT and having Host/Guest mode enabled i.e. kvm_intel module parameter pt_mode=1. Signed-off-by: Adrian Hunter --- tools/testing/selftests/kvm/Makefile | 1 + .../selftests/kvm/include/x86_64

Re: [PATCH v4 1/2] mmc: block: Issue flush only if allowed

2021-04-20 Thread Adrian Hunter
way, verify that The cache function is > turned ON before doing so. > > fixes: 1e8e55b67030 (mmc: block: Add CQE support) > > Reported-by: Brendan Peter > Tested-by: Brendan Peter > Signed-off-by: Avri Altman Acked-by: Adrian Hunter > --- > drivers/mmc/core/bloc

Re: [PATCH] perf auxtrace: Fix potential null pointer dereference

2021-04-20 Thread Adrian Hunter
gt; callback pointer "itr->parse_snapshot_options" is dereferenced without > performing NULL check. > > Add a NULL check for the pointer "itr->parse_snapshot_options" before > invoke the callback. > > Fixes: d20031bb63dd ("perf tools: Add AUX area tracing Snapshot Mode&

Re: [PATCH] perf test: Fix unaligned access in sample parsing test

2021-02-14 Thread Adrian Hunter
:3 > #11 0x7f137ab6fbbc in __libc_start_main (/lib64/libc.so.6+0x38bbc) > #12 0x561532596828 in _start ... > > SUMMARY: UndefinedBehaviorSanitizer: misaligned-pointer-use > util/synthetic-events.c:1539:4 in > > Fixes: 045f8cd8542d ("perf tests: Add a sample parsing

Re: [PATCH 1/2] mmc: core: Drop superfluous validations in mmc_hw|sw_reset()

2021-02-16 Thread Adrian Hunter
g as the struct mmc_host has a valid pointer to a > struct mmc_card, the corresponding host->bus_ops pointer stays valid and > assigned. > > For these reasons, let's drop the superfluous reference counting and the > redundant validations in mmc_hw|sw_reset(). > > Sign

Re: [PATCH 2/2] mmc: core: Drop reference counting of the bus_ops

2021-02-16 Thread Adrian Hunter
me point have become superfluous. As this is an old mechanism > of the mmc core, it a bit difficult to digest the history of when that > could have happened. However, let's drop the reference counting to avoid > unnecessary code-paths and lockings. > > Cc:

Re: [PATCH 2/2] mmc: core: Add no single read retries

2021-02-16 Thread Adrian Hunter
On 17/02/21 7:22 am, DooHyun Hwang wrote: > This makes to handle read errors faster by not retrying > multiple block read(CMD18) errors with single block reads(CMD17). > > On some bad SD Cards that have problem with read operations, > it is not helpful to retry multiple block read errors with > se

Re: [PATCH 2/2] mmc: core: Add no single read retries

2021-02-16 Thread Adrian Hunter
On 17/02/21 7:46 am, Adrian Hunter wrote: > On 17/02/21 7:22 am, DooHyun Hwang wrote: >> This makes to handle read errors faster by not retrying >> multiple block read(CMD18) errors with single block reads(CMD17). >> >> On some bad SD Cards that have problem with re

Re: [PATCH v16 1/2] scsi: ufs: Enable power management for wlun

2021-04-08 Thread Adrian Hunter
On 7/04/21 9:08 pm, Asutosh Das wrote: > During runtime-suspend of ufs host, the scsi devices are > already suspended and so are the queues associated with them. > But the ufs host sends SSU (START_STOP_UNIT) to wlun > during its runtime-suspend. > During the process blk_queue_enter checks if the q

Re: [PATCH V2 02/22] perf evlist: Add initial support for mmapping an Instruction Trace buffer

2014-12-10 Thread Adrian Hunter
On 09/12/14 15:24, Arnaldo Carvalho de Melo wrote: > Em Wed, Nov 26, 2014 at 03:11:16PM +0200, Adrian Hunter escreveu: >> On 25/11/14 18:57, Jiri Olsa wrote: >>> On Thu, Nov 20, 2014 at 03:23:08PM +0200, Adrian Hunter wrote: >>> >>> SNIP >>> >&g

Re: [PATCH] tools: perf: util: session: Remove unused function

2015-01-02 Thread Adrian Hunter
On 01/01/15 19:50, Rickard Strandqvist wrote: > Remove the function perf_session__peek_event() that is not used anywhere. > > This was partially found by using a static code analysis program called > cppcheck. > > Signed-off-by: Rickard Strandqvist > --- It was added in preparation for Intel P

Re: [PATCH] tools: perf: util: dso: Remove some unused functions

2015-01-04 Thread Adrian Hunter
On 02/01/15 23:03, Rickard Strandqvist wrote: > Removes some functions that are not used anywhere: > dso__data_size() dso__data_status_seen() > > This was partially found by using a static code analysis program called > cppcheck. > > Signed-off-by: Rickard Strandqvist > --- Please do not remov

Re: [PATCH 02/37] perf record: Use a software dummy event to track task/mmap events

2014-12-29 Thread Adrian Hunter
On 27/12/14 07:28, Namhyung Kim wrote: > Hi David, > > On Sat, Dec 27, 2014 at 1:27 AM, David Ahern wrote: >> On 12/24/14 12:14 AM, Namhyung Kim wrote: >>> >>> Prepend a software dummy event into evlist to track task/comm/mmap >>> events separately. This is a preparation of multi-file/thread sup

Re: [PATCH 05/37] perf tools: Create separate mmap for dummy tracking event

2014-12-29 Thread Adrian Hunter
ing event. The size is fixed > to 128KiB (+ 1 page) as the event rate will be lower than samples. I > originally wanted to use a single mmap for this but cross-cpu sharing > is prohibited so it's per-cpu (or per-task) like normal mmaps. > > Cc: Adrian Hunter > Signed-off

Re: [PATCH 02/37] perf record: Use a software dummy event to track task/mmap events

2014-12-30 Thread Adrian Hunter
On 30/12/14 07:51, Namhyung Kim wrote: > Hi Adrian, > > On Mon, Dec 29, 2014 at 02:58:12PM +0200, Adrian Hunter wrote: >> On 27/12/14 07:28, Namhyung Kim wrote: >>> Hi David, >>> >>> On Sat, Dec 27, 2014 at 1:27 AM, David Ahern wrote: >

Re: [PATCH] tools: perf: util: dso: Remove some unused functions

2015-01-07 Thread Adrian Hunter
On 06/01/15 20:05, Rickard Strandqvist wrote: > 2015-01-05 8:24 GMT+01:00 Adrian Hunter : >> On 02/01/15 23:03, Rickard Strandqvist wrote: >>> Removes some functions that are not used anywhere: >>> dso__data_size() dso__data_status_seen() >>> >>> Th

[PATCH V4 02/23] perf evlist: Add initial support for mmapping an Instruction Trace buffer

2015-01-08 Thread Adrian Hunter
ace". The first implementation will support Intel BTS and Intel PT. One itrace buffer is mmapped per perf-events buffer. If the requested itrace buffer size is zero, which it will be until further support is added, then no itrace mmapping is attempted. Signed-off-by: Adrian Hunter --- tools/perf

[PATCH V4 01/23] perf header: Add Instruction Tracing feature

2015-01-08 Thread Adrian Hunter
Add a feature to indicate that a perf.data file contains Instruction Tracing data. Signed-off-by: Adrian Hunter --- tools/perf/util/header.c | 14 ++ tools/perf/util/header.h | 1 + 2 files changed, 15 insertions(+) diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c

[PATCH V4 00/23] perf tools: Introduce an abstraction for Instruction Tracing

2015-01-08 Thread Adrian Hunter
erf session: Add hooks to allow transparent decoding of Instruction Tracing data Adrian Hunter (23): perf header: Add Instruction Tracing feature perf evlist: Add initial support for mmapping an Instruction Trace buffer perf tools: Add user events for Instruction Tracing pe

[PATCH V4 16/23] perf script: Add Instruction Tracing support

2015-01-08 Thread Adrian Hunter
Add support for decoding an Instruction Trace. Signed-off-by: Adrian Hunter --- tools/perf/Documentation/perf-script.txt | 28 tools/perf/builtin-script.c | 11 +++ 2 files changed, 39 insertions(+) diff --git a/tools/perf/Documentation/perf

[PATCH V4 23/23] perf tools: Add build option NO_ITRACE to exclude Instruction Tracing

2015-01-08 Thread Adrian Hunter
Add build option NO_ITRACE to exclude compiling support for Instruction Tracing. Support for both recording and processing is excluded and by implication any future additions such as Intel PT and Intel BTS will also not be compiled in with this option. Signed-off-by: Adrian Hunter --- tools

[PATCH V4 07/23] perf tools: Add a user event for Instruction Tracing errors

2015-01-08 Thread Adrian Hunter
Errors encountered when decoding an Instruction Trace need to be reported to the user. However the "user" might be a script or another tool, so provide a new user event to capture those errors. Signed-off-by: Adrian Hunter --- tools/perf/util/event.c | 1 + tools/perf/util/even

[PATCH V4 08/23] perf session: Add hooks to allow transparent decoding of Instruction Tracing data

2015-01-08 Thread Adrian Hunter
eliver synthesized events into the event stream using perf_session__deliver_synth_event(). Note the expectation is that decoding will work on data that is time-ordered with respect to the per-cpu or per-thread contexts that were recorded. Signed-off-by: Adrian Hunter --- tools/perf/util/itrace.h

[PATCH V4 04/23] perf tools: Add support for Instruction Trace recording

2015-01-08 Thread Adrian Hunter
. Signed-off-by: Adrian Hunter --- tools/perf/perf.h| 2 + tools/perf/util/itrace.c | 196 +++ tools/perf/util/itrace.h | 59 +- tools/perf/util/record.c | 11 ++- 4 files changed, 266 insertions(+), 2 deletions(-) diff --git a

[PATCH V4 18/23] perf report: Add Instruction Tracing support

2015-01-08 Thread Adrian Hunter
Add support for decoding an Instruction Trace. Signed-off-by: Adrian Hunter --- tools/perf/Documentation/perf-report.txt | 28 tools/perf/builtin-report.c | 12 2 files changed, 40 insertions(+) diff --git a/tools/perf/Documentation/perf

[PATCH V4 22/23] perf tools: Hit all build ids when Instruction Tracing

2015-01-08 Thread Adrian Hunter
We need to include all buildids when a perf.data file contains Instruction Tracing data because we do not decode the trace for that purpose because it would take too long. Signed-off-by: Adrian Hunter --- tools/perf/builtin-buildid-list.c | 9 + tools/perf/builtin-inject.c | 8

[PATCH V4 19/23] perf inject: Re-pipe Instruction Tracing events

2015-01-08 Thread Adrian Hunter
New Instruction Tracing events must be re-piped by default. Signed-off-by: Adrian Hunter --- tools/perf/builtin-inject.c | 63 + 1 file changed, 58 insertions(+), 5 deletions(-) diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c

[PATCH V4 21/23] perf tools: Add Instruction Tracing index

2015-01-08 Thread Adrian Hunter
session reads the index but does not process it. An Instruction Trace decoder can queue all the Instruction Trace data in advance using itrace_queues__process_index() or otherwise process the index in some custom manner. Signed-off-by: Adrian Hunter --- tools/perf/builtin-inject.c | 15

[PATCH V4 20/23] perf inject: Add Instruction Tracing support

2015-01-08 Thread Adrian Hunter
Add support for decoding an Instruction Trace. The Instruction Tracing events are stripped and replaced by synthesized events. Signed-off-by: Adrian Hunter --- tools/perf/Documentation/perf-inject.txt | 27 tools/perf/builtin-inject.c | 71

[PATCH V4 17/23] perf script: Always allow fields 'addr' and 'cpu' for itrace

2015-01-08 Thread Adrian Hunter
If a file contains Instruction Tracing data then always allow fields 'addr' and 'cpu' to be selected as options for perf script. This is necessary because Instruction Trace decoding may synthesize events with that information. Signed-off-by: Adrian Hunter --- tools/perf/b

[PATCH V4 14/23] perf itrace: Add a hashtable for caching decoded instructions

2015-01-08 Thread Adrian Hunter
Decoding Instruction Trace data may involve walking object code. Rather than repetitively decoding the same instructions, a cache can be used to cache the results. Signed-off-by: Adrian Hunter --- tools/perf/util/itrace.c | 123 +++ tools/perf/util

[PATCH V4 15/23] perf tools: Add member to struct dso for an instruction cache

2015-01-08 Thread Adrian Hunter
Add a member to struct dso that can be used by Instruction Trace implementations to hold a cache for decoded instructions. Signed-off-by: Adrian Hunter --- tools/perf/util/dso.c | 2 ++ tools/perf/util/dso.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/tools/perf/util/dso.c b/tools

[PATCH V4 13/23] perf itrace: Add processing for Instruction Tracing events

2015-01-08 Thread Adrian Hunter
Provide hooks so that an Instruction Trace decoder can process Instruction Tracing events. Signed-off-by: Adrian Hunter --- tools/perf/util/itrace.c | 49 tools/perf/util/itrace.h | 13 + 2 files changed, 62 insertions(+) diff --git

[PATCH V4 12/23] perf itrace: Add a heap for sorting Instruction Tracing queues

2015-01-08 Thread Adrian Hunter
-by: Adrian Hunter --- tools/perf/util/itrace.c | 85 tools/perf/util/itrace.h | 29 + 2 files changed, 114 insertions(+) diff --git a/tools/perf/util/itrace.c b/tools/perf/util/itrace.c index 4b0439b..e9c46fc 100644 --- a/tools

[PATCH V4 11/23] perf itrace: Add helpers for queuing Instruction Tracing data

2015-01-08 Thread Adrian Hunter
per-cpu or per-thread contexts, the data is time-ordered with respect to those contexts. Signed-off-by: Adrian Hunter --- tools/perf/util/itrace.c | 304 +++ tools/perf/util/itrace.h | 87 ++ 2 files changed, 391 insertions(+) diff --git a

[PATCH V4 10/23] perf itrace: Add helpers for Instruction Tracing errors

2015-01-08 Thread Adrian Hunter
Add functions to synthesize, count and print Instruction Tracing error events. Signed-off-by: Adrian Hunter --- tools/perf/util/itrace.c | 55 tools/perf/util/itrace.h | 16 ++ 2 files changed, 71 insertions(+) diff --git a/tools

[PATCH V4 09/23] perf session: Add Instruction Tracing options

2015-01-08 Thread Adrian Hunter
It is assumed that Instruction Trace decoding will synthesize events for consumption by other tools. The nature of Instruction Tracing suggests the initial inclusion of options for "instructions" and "branches" events, but more could be added as needed. Signed-off-by: Adria

[PATCH V4 05/23] perf record: Add basic Instruction Tracing support

2015-01-08 Thread Adrian Hunter
Amend the perf record tool to read the Instruction Tracing mmap and synthesize Instruction Tracing events. Signed-off-by: Adrian Hunter --- tools/perf/builtin-record.c | 99 +++-- 1 file changed, 86 insertions(+), 13 deletions(-) diff --git a/tools/perf

[PATCH V4 06/23] perf record: Extend -m option for Instruction Tracing mmap pages

2015-01-08 Thread Adrian Hunter
Extend the -m option so that the number of mmap pages for Instruction Tracing can be specified. Signed-off-by: Adrian Hunter --- tools/perf/Documentation/perf-record.txt | 2 ++ tools/perf/builtin-record.c | 49 ++-- tools/perf/util/evlist.c

[PATCH V4 03/23] perf tools: Add user events for Instruction Tracing

2015-01-08 Thread Adrian Hunter
Instruction Tracing data copied from the mmapped Instruction Tracing region. The actual data is not part of the event but immediately follows it. Signed-off-by: Adrian Hunter --- tools/perf/util/event.c | 2 ++ tools/perf/util/event.h | 22 +++ tools/perf/util/session.c | 69

Re: [PATCH v8 14/14] perf: add ITRACE_START record to indicate that tracing has started

2015-01-12 Thread Adrian Hunter
On 09/01/15 16:13, Peter Zijlstra wrote: > On Fri, Jan 09, 2015 at 03:12:48PM +0100, Peter Zijlstra wrote: >> On Fri, Nov 14, 2014 at 03:43:47PM +0200, Alexander Shishkin wrote: >>> +++ b/include/uapi/linux/perf_event.h >>> @@ -750,6 +750,17 @@ enum perf_event_type { >>> */ >>> PERF_RECORD

Re: [PATCH v4 1/3] perf: Use monotonic clock as a source for timestamps

2015-01-16 Thread Adrian Hunter
On 06/11/14 18:51, Pawel Moll wrote: > Until now, perf framework never defined the meaning of the timestamps > captured as PERF_SAMPLE_TIME sample type. The values were obtaining > from local (sched) clock, which is unavailable in userspace. This made > it impossible to correlate perf data with any

Re: [RFC][PATCH] perf tools: unify perf_event_attr printing

2015-04-02 Thread Adrian Hunter
On 01/04/15 19:52, Jiri Olsa wrote: > On Wed, Apr 01, 2015 at 06:26:38PM +0200, Peter Zijlstra wrote: >> >> With some feedback from Jolsa, who showed me how to trigger the actual >> outputs. > > adding Adrian to CC as he's the original author AFAIK I wanted a compact format, and the omission of n

Re: [RFC 0/2] perf scripting cleanups

2015-04-02 Thread Adrian Hunter
On 01/04/15 19:36, Arnaldo Carvalho de Melo wrote: > Hi David, Jiri, > > Please take a look if it is ok for you guys > > Adrian, there is another thing: > > db_export__sample(&tables->dbe, event, sample, evsel, al->thread, al); > > In tools/perf/util/scripting-engines/trace-event-python

Re: [RFC][PATCH] perf tools: unify perf_event_attr printing

2015-04-02 Thread Adrian Hunter
On 02/04/15 14:59, Peter Zijlstra wrote: > On Thu, Apr 02, 2015 at 12:01:53PM +0300, Adrian Hunter wrote: >> But personally I think the "include" approach is too ugly. I would just >> add a function instead. Something like: > > You've not stared at the kerne

Re: [RFC PATCH 0/4] mmc: sdhci: Support maximum DMA latency request via PM QoS

2015-04-02 Thread Adrian Hunter
On 1/04/2015 10:59 p.m., Len Brown wrote: Ad hoc testing with Lenovo Thinkpad 10 showed a stress test could run for at least 24 hours with the patches, compared to less than an hour without. There is a patch in linux-next to delete C1E from BYT, since it is problematic on multiple platforms. I

Re: [RFC 0/2] perf scripting cleanups

2015-04-02 Thread Adrian Hunter
On 2/04/2015 5:15 p.m., Arnaldo Carvalho de Melo wrote: Em Thu, Apr 02, 2015 at 12:16:40PM +0300, Adrian Hunter escreveu: On 01/04/15 19:36, Arnaldo Carvalho de Melo wrote: Hi David, Jiri, Please take a look if it is ok for you guys Adrian, there is another thing

Re: [PATCH] perf: kmaps: enforce usage of kmaps to protect futher bugs.

2015-04-07 Thread Adrian Hunter
the case of !map->dso->kernel, kmap(map) >> is not exists at all). Also, introduces map__kmaps() to warn >> uninitialized kmaps. > > looks ok, CC-ing Adrian Look Ok to me too Acked-by: Adrian Hunter -- To unsubscribe from this list: send the line "unsubscrib

Re: [PATCH 09/44] perf session: Add instruction tracing options

2015-04-21 Thread Adrian Hunter
On 21/04/15 17:50, Arnaldo Carvalho de Melo wrote: > Em Thu, Apr 09, 2015 at 06:53:49PM +0300, Adrian Hunter escreveu: > >> It is assumed that AUX area decoding will synthesize events for >> consumption by other tools. At this time, the main use of AUX area >> tr

Re: [PATCH V7 00/25] perf tools: Introduce an abstraction for AUX Area and Instruction Tracing

2015-04-24 Thread Adrian Hunter
On 23/04/15 17:30, Arnaldo Carvalho de Melo wrote: > Em Tue, Mar 31, 2015 at 02:38:29PM +0300, Adrian Hunter escreveu: >> Hi >> >> Here is V7 of some more preparatory patches for Intel PT >> that introduce an abstraction for using the AUX area and >> Instruction tr

Re: [PATCH V6 02/25] perf evlist: Add initial support for mmapping an AUX area buffer

2015-03-31 Thread Adrian Hunter
On 24/03/15 13:07, Jiri Olsa wrote: > On Mon, Mar 16, 2015 at 02:41:24PM +0200, Adrian Hunter wrote: > > SNIP > >> index 8d0b623..3cc7815 100644 >> --- a/tools/perf/util/evlist.c >> +++ b/tools/perf/util/evlist.c >> @@ -725,6 +725,34 @@ void perf_evl

[PATCH V7 01/25] perf header: Add AUX area tracing feature

2015-03-31 Thread Adrian Hunter
Add a feature to indicate that a perf.data file contains AUX area data. Signed-off-by: Adrian Hunter --- tools/perf/util/header.c | 14 ++ tools/perf/util/header.h | 1 + 2 files changed, 15 insertions(+) diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index

[PATCH V7 00/25] perf tools: Introduce an abstraction for AUX Area and Instruction Tracing

2015-03-31 Thread Adrian Hunter
ording perf record: Add basic AUX area tracing support Processing consists of providing hooks in session processing to enable a decoder to see all the events and deliver synthesized events transparently into the event stream. The main processing patch is: perf session: Add hooks to

[PATCH V7 14/25] perf auxtrace: Add a hashtable for caching

2015-03-31 Thread Adrian Hunter
Decoding AUX area data may involve walking object code. Rather than repetitively decoding the same instructions, a cache can be used to cache the results. This patch implements a fairly generic hashtable with a 32-bit key that could be used for other purposes as well. Signed-off-by: Adrian

[PATCH V7 25/25] perf script: Add field option 'flags' to print sample flags

2015-03-31 Thread Adrian Hunter
: branches:u: bA 401071 f => 40116a main 1288.722285883: branches:u: bE 40116a main =>0 [unknown] 1288.722297174: branches:u: bB 0 [unknown] => 40116a main ... Signed-off-by: Adrian Hunter --- tools/perf

[PATCH V7 22/25] perf tools: Hit all build ids when AUX area tracing

2015-03-31 Thread Adrian Hunter
We need to include all buildids when a perf.data file contains AUX area tracing data because we do not decode the trace for that purpose because it would take too long. Signed-off-by: Adrian Hunter --- tools/perf/builtin-buildid-list.c | 9 + tools/perf/builtin-inject.c | 8

[PATCH V7 18/25] perf report: Add Instruction Tracing support

2015-03-31 Thread Adrian Hunter
Add support for decoding an AUX area assuming it contains instruction tracing data. Signed-off-by: Adrian Hunter --- tools/perf/Documentation/perf-report.txt | 28 tools/perf/builtin-report.c | 11 +++ 2 files changed, 39 insertions(+) diff

[PATCH V7 21/25] perf tools: Add AUX area tracing index

2015-03-31 Thread Adrian Hunter
reads the index but does not process it. An AUX area decoder can queue all the AUX area data in advance using auxtrace_queues__process_index() or otherwise process the index in some custom manner. Signed-off-by: Adrian Hunter --- tools/perf/builtin-inject.c | 15 +++ tools/perf/builtin-record.c

[PATCH V7 23/25] perf tools: Add build option NO_AUXTRACE to exclude AUX area tracing

2015-03-31 Thread Adrian Hunter
Add build option NO_AUXTRACE to exclude compiling support for AUX area tracing. Support for both recording and processing is excluded and by implication any future additions such as Intel PT and Intel BTS will also not be compiled in with this option. Signed-off-by: Adrian Hunter --- tools/perf

[PATCH V7 24/25] perf auxtrace: Add option to synthesize events for transactions

2015-03-31 Thread Adrian Hunter
Add AUX area tracing option 'x' to synthesize events for transactions. This will be used by Intel PT to synthesize an event record for each TSX start, commit or abort. Signed-off-by: Adrian Hunter --- tools/perf/Documentation/perf-report.txt | 9 + tools/perf/Document

[PATCH V7 10/25] perf auxtrace: Add helpers for AUX area tracing errors

2015-03-31 Thread Adrian Hunter
Add functions to synthesize, count and print AUX area tracing error events. Signed-off-by: Adrian Hunter --- tools/perf/util/auxtrace.c | 81 ++ tools/perf/util/auxtrace.h | 14 tools/perf/util/event.h| 6 tools/perf/util/session.c

[PATCH V7 17/25] perf script: Always allow fields 'addr' and 'cpu' for auxtrace

2015-03-31 Thread Adrian Hunter
If a file contains AUX area tracing data then always allow fields 'addr' and 'cpu' to be selected as options for perf script. This is necessary because AUX area decoding may synthesize events with that information. Signed-off-by: Adrian Hunter --- tools/perf/b

[PATCH V7 09/25] perf session: Add instruction tracing options

2015-03-31 Thread Adrian Hunter
tions" and "branches" events, but more could be added as needed. Signed-off-by: Adrian Hunter --- tools/perf/util/auxtrace.c | 131 + tools/perf/util/auxtrace.h | 43 +++ tools/perf/util/session.h | 2 + 3 files cha

[PATCH V7 20/25] perf inject: Add Instruction Tracing support

2015-03-31 Thread Adrian Hunter
Add support for decoding an AUX area assuming it contains instruction tracing data. The AUX area tracing events are stripped and replaced by synthesized events. Signed-off-by: Adrian Hunter --- tools/perf/Documentation/perf-inject.txt | 27 tools/perf/builtin-inject.c

[PATCH V7 19/25] perf inject: Re-pipe AUX area tracing events

2015-03-31 Thread Adrian Hunter
New AUX area tracing events must be re-piped by default. Signed-off-by: Adrian Hunter --- tools/perf/builtin-inject.c | 63 + 1 file changed, 58 insertions(+), 5 deletions(-) diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c

[PATCH V7 05/25] perf record: Add basic AUX area tracing support

2015-03-31 Thread Adrian Hunter
Amend the perf record tool to read the AUX area tracing mmap and synthesize AUX area tracing events. Signed-off-by: Adrian Hunter --- tools/perf/builtin-record.c | 81 ++--- 1 file changed, 77 insertions(+), 4 deletions(-) diff --git a/tools/perf/builtin

[PATCH V7 04/25] perf tools: Add support for AUX area recording

2015-03-31 Thread Adrian Hunter
-off-by: Adrian Hunter --- tools/perf/perf.h | 2 + tools/perf/util/auxtrace.c | 176 + tools/perf/util/auxtrace.h | 56 ++- tools/perf/util/record.c | 11 ++- 4 files changed, 243 insertions(+), 2 deletions(-) diff --git a

[PATCH V7 15/25] perf tools: Add member to struct dso for an instruction cache

2015-03-31 Thread Adrian Hunter
Add a member to struct dso that can be used by Instruction Trace implementations to hold a cache for decoded instructions. Signed-off-by: Adrian Hunter --- tools/perf/util/dso.c | 2 ++ tools/perf/util/dso.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/tools/perf/util/dso.c b/tools

[PATCH V7 16/25] perf script: Add Instruction Tracing support

2015-03-31 Thread Adrian Hunter
Add support for decoding an AUX area assuming it contains instruction tracing data. Signed-off-by: Adrian Hunter --- tools/perf/Documentation/perf-script.txt | 28 tools/perf/builtin-script.c | 11 +++ 2 files changed, 39 insertions(+) diff

[PATCH V7 07/25] perf tools: Add a user event for AUX area tracing errors

2015-03-31 Thread Adrian Hunter
Errors encountered when decoding an AUX area trace need to be reported to the user. However the "user" might be a script or another tool, so provide a new user event to capture those errors. Signed-off-by: Adrian Hunter --- tools/perf/util/event.c | 1 + tools/perf/util/even

[PATCH V7 06/25] perf record: Extend -m option for AUX area tracing mmap pages

2015-03-31 Thread Adrian Hunter
Extend the -m option so that the number of mmap pages for AUX area tracing can be specified by adding a comma followed by the number of pages. Signed-off-by: Adrian Hunter --- tools/perf/Documentation/perf-record.txt | 2 ++ tools/perf/builtin-record.c | 49

[PATCH V7 13/25] perf auxtrace: Add processing for AUX area tracing events

2015-03-31 Thread Adrian Hunter
Provide hooks so that an AUX area decoder can process AUX area tracing events. Signed-off-by: Adrian Hunter --- tools/perf/util/auxtrace.c | 52 +- tools/perf/util/auxtrace.h | 13 2 files changed, 64 insertions(+), 1 deletion(-) diff

[PATCH V7 11/25] perf auxtrace: Add helpers for queuing AUX area tracing data

2015-03-31 Thread Adrian Hunter
per-thread contexts, the data is time-ordered with respect to those contexts. Signed-off-by: Adrian Hunter --- tools/perf/util/auxtrace.c | 305 + tools/perf/util/auxtrace.h | 87 + 2 files changed, 392 insertions(+) diff --git a/tools/perf

[PATCH V7 08/25] perf session: Add hooks to allow transparent decoding of AUX area tracing data

2015-03-31 Thread Adrian Hunter
esized events into the event stream using perf_session__deliver_synth_event(). Note the expectation is that decoding will work on data that is time-ordered with respect to the per-cpu or per-thread contexts that were recorded. Signed-off-by: Adrian Hunter --- tools/perf/util/auxtrace.

[PATCH V7 03/25] perf tools: Add user events for AUX area tracing

2015-03-31 Thread Adrian Hunter
area tracing data copied from the mmapped AUX area tracing region. The actual data is not part of the event but immediately follows it. Signed-off-by: Adrian Hunter --- tools/perf/util/event.c | 2 ++ tools/perf/util/event.h | 22 +++ tools/perf/util/session.c | 69

[PATCH V7 12/25] perf auxtrace: Add a heap for sorting AUX area tracing queues

2015-03-31 Thread Adrian Hunter
: Adrian Hunter --- tools/perf/util/auxtrace.c | 85 ++ tools/perf/util/auxtrace.h | 29 2 files changed, 114 insertions(+) diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c index afcb09d..215f38e 100644 --- a/tools

[PATCH V7 02/25] perf evlist: Add initial support for mmapping an AUX area buffer

2015-03-31 Thread Adrian Hunter
l PT. One auxtrace buffer is mmapped per perf-events buffer. If the requested auxtrace buffer size is zero, which it will be until further support is added, then no auxtrace mmapping is attempted. Signed-off-by: Adrian Hunter --- tools/perf/util/Build | 1 + tools/perf/util/auxtra

Re: [PATCH v6 3/4] perf inject: add jitdump mmap injection support

2015-04-01 Thread Adrian Hunter
On 31/03/15 01:19, Stephane Eranian wrote: > This patch adds a --jit option to perf inject. > > This options injects MMAP records into the perf.data > file to cover the jitted code mmaps. It also emits > ELF images for each function in the jidump file. > Those images are created where the jitdump

Re: [PATCH V7 00/25] perf tools: Introduce an abstraction for AUX Area and Instruction Tracing

2015-04-01 Thread Adrian Hunter
On 01/04/15 14:57, Jiri Olsa wrote: > On Tue, Mar 31, 2015 at 02:38:29PM +0300, Adrian Hunter wrote: > > SNIP > >> >> Changes in V7: >> >> Changes requested by Jiri: >> >> perf evlist: Add initial support for mmapping an AUX area buffer &

[PATCH V3 02/25] perf script: Always allow fields 'addr' and 'cpu' for auxtrace

2015-04-24 Thread Adrian Hunter
If a file contains AUX area tracing data then always allow fields 'addr' and 'cpu' to be selected as options for perf script. This is necessary because AUX area decoding may synthesize events with that information. Signed-off-by: Adrian Hunter --- tools/perf/b

[PATCH V3 10/25] perf tools: Add AUX area tracing Snapshot Mode

2015-04-24 Thread Adrian Hunter
Add support for making snapshots of AUX area tracing data. Signed-off-by: Adrian Hunter --- tools/perf/perf.h | 3 ++ tools/perf/util/auxtrace.c | 85 -- tools/perf/util/auxtrace.h | 41 ++ 3 files changed, 119 insertions

[PATCH V3 23/25] perf tools: Intel PT to always update thread stack trace number

2015-04-24 Thread Adrian Hunter
The enhanced thread stack is used by higher layers but still requires the trace number. The trace number is used to distinguish discontinuous sections of trace (for example from Snapshot mode or Sample mode), which cause the thread stack to be flushed. Signed-off-by: Adrian Hunter --- tools

[PATCH V3 18/25] perf tools: Take Intel PT into use

2015-04-24 Thread Adrian Hunter
. Also some brief documentation is provided for using the tools with intel_pt. Signed-off-by: Adrian Hunter --- tools/perf/Documentation/intel-pt.txt | 467 ++ tools/perf/arch/x86/util/Build| 2 + tools/perf/arch/x86/util/auxtrace.c | 38 +++ tools/perf

[PATCH V3 15/25] perf tools: Add Intel PT log

2015-04-24 Thread Adrian Hunter
Add a facility to log Intel Processor Trace decoding. The log is intended for debugging purposes only. The log file name is "intel_pt.log" and is opened in the current directory. Signed-off-by: Adrian Hunter --- tools/perf/util/intel-pt-decoder/Build | 2 +- tools/perf/

[PATCH V3 11/25] perf record: Add AUX area tracing Snapshot Mode support

2015-04-24 Thread Adrian Hunter
Add a new option and support for Instruction Tracing Snapshot Mode. When the new option is selected, no AUX area tracing data is captured until a signal (SIGUSR2) is received. Signed-off-by: Adrian Hunter --- tools/perf/Documentation/perf-record.txt | 7 ++ tools/perf/builtin-record.c

[PATCH V3 22/25] perf tools: Output sample flags and insn_len from intel_bts

2015-04-24 Thread Adrian Hunter
intel_bts synthesizes samples. Fill in the new flags and insn_len members with instruction information. Signed-off-by: Adrian Hunter --- tools/perf/util/intel-bts.c | 127 ++-- 1 file changed, 123 insertions(+), 4 deletions(-) diff --git a/tools/perf

[PATCH V3 24/25] perf tools: Intel BTS to always update thread stack trace number

2015-04-24 Thread Adrian Hunter
The enhanced thread stack is used by higher layers but still requires the trace number. The trace number is used to distinguish discontinuous sections of trace (for example from Snapshot mode or Sample mode), which cause the thread stack to be flushed. Signed-off-by: Adrian Hunter --- tools

[PATCH V3 21/25] perf tools: Output sample flags and insn_len from intel_pt

2015-04-24 Thread Adrian Hunter
intel_pt synthesizes samples. Fill in the new flags and insn_len members with instruction information. Signed-off-by: Adrian Hunter --- tools/perf/util/intel-pt.c | 4 1 file changed, 4 insertions(+) diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c index 8ba4ce7

[PATCH V3 25/25] perf tools: Add example call-graph script

2015-04-24 Thread Adrian Hunter
Signed-off-by: Adrian Hunter --- .../scripts/python/call-graph-from-postgresql.py | 285 + 1 file changed, 285 insertions(+) create mode 100644 tools/perf/scripts/python/call-graph-from-postgresql.py diff --git a/tools/perf/scripts/python/call-graph-from-postgresql.py b

[PATCH V3 20/25] perf tools: Add Intel BTS support

2015-04-24 Thread Adrian Hunter
Signed-off-by: Adrian Hunter --- tools/perf/Documentation/intel-bts.txt | 69 +++ tools/perf/arch/x86/util/Build | 1 + tools/perf/arch/x86/util/auxtrace.c| 49 +- tools/perf/arch/x86/util/intel-bts.c | 458 +++ tools/perf/util/Build | 1

<    5   6   7   8   9   10   11   12   13   14   >