to print string for instruction types.
This patch is to set branch instruction flags for instruction range
packet.
Signed-off-by: Leo Yan
Reviewed-by: Mathieu Poirier
---
.../perf/util/cs-etm-decoder/cs-etm-decoder.c | 2 +
.../perf/util/cs-etm-decoder/cs-etm-decoder.h | 1 +
tools/perf/util
with error -22
> [5.513192] coresight-cpu-debug 3b1.debug: Coresight debug-CPU3
> initialized
>
> Also add a helper macro to make adding CPU PIDs easier
> similar to ETM4X driver.
>
> Signed-off-by: Sai Prakash Ranjan
Looks good to me and tested on my Hikey board
On Tue, Jan 29, 2019 at 09:25:28PM +0800, Leo Yan wrote:
> On Tue, Jan 29, 2019 at 12:44:03AM +0530, Sai Prakash Ranjan wrote:
> > Add UCI table and a helper macro for coresight CPU debug
> > module. This patch adds the UCI entries for Krypo CPUs
> > found on MSM8996 which sh
Hi Vincent,
On Mon, Jan 14, 2019 at 09:24:34AM +0100, Vincent Guittot wrote:
> The SDcard detection of hikey960 is active low so cd-inverted is wrong.
> Instead of adding cd-inverted, we should better set correctly cd-gpios
> to use GPIO_ACTIVE_LOW.
Just remind, usually ARM maintainer has require
to print string for instruction types.
This patch is to set branch instruction flags for instruction range
packet.
Signed-off-by: Leo Yan
---
.../perf/util/cs-etm-decoder/cs-etm-decoder.c | 2 +
.../perf/util/cs-etm-decoder/cs-etm-decoder.h | 1 +
tools/perf/util/cs-etm.c
exception number for exception packet that will then be used to
properly identify exception types to the perf synthesize mechanic.
Signed-off-by: Leo Yan
---
.../perf/util/cs-etm-decoder/cs-etm-decoder.c | 20 +++
.../perf/util/cs-etm-decoder/cs-etm-decoder.h | 1 +
2 files
covers SVC, SMC and HVC cases in the
single exception number, thus need to use cs_etm__is_svc_instr() to
decide an exception taken for system call.
Reviewed-by: Robert Walker
Signed-off-by: Leo Yan
---
tools/perf/util/cs-etm.c | 215 +++
tools/perf/util/cs
Add traceID in packet, thus we can use traceID to retrieve metadata
pointer from traceID-metadata tuple.
Signed-off-by: Leo Yan
---
tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 2 ++
tools/perf/util/cs-etm-decoder/cs-etm-decoder.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/tools
xactly the exception
type. We will defer to decide if it's an exception return for system
call when the next instruction range packet comes, it checks if there
has one SVC instruction prior to the start address and if so we will
change sample flags to PERF_IP_FLAG_SYSCALLRET for system call
r
PERF_IP_FLAG_TRACE_START to discontinuity packet, this flag
will be used to generate sample when connect with the sequential
instruction packet.
Signed-off-by: Leo Yan
---
tools/perf/util/cs-etm.c | 19 +++
1 file changed, 19 insertions(+)
diff --git a/tools/perf/util/cs-etm.c b
lated information and cannot generate sample
flags for branch instructions.
This patch add corresponding three new fields in cs_etm_packet struct
and save related value into the packet structure, it is preparation for
supporting sample flags.
Signed-off-by: Leo Yan
---
tools/perf/util/cs-etm-de
ssing metadata fields, this patch provides helper function
cs_etm__get_cpu() which is used to return CPU number according to
traceID; cs_etm_decoder__buffer_packet() is the first consumer for this
helper function.
Signed-off-by: Leo Yan
---
.../perf/util/cs-etm-decoder/cs-etm-decoder.c | 8 ++--
ries 'perf
cs-etm: Correct packets handling'.
* Added sample flags fixing up for TRACE_OFF packet.
* Created a new function which is used to maintain flags fixing up.
Leo Yan (8):
perf cs-etm: Add last instruction information in packet
perf cs-etm: Set sample flags for instruction
Hi Mathieu,
On Wed, Jan 23, 2019 at 02:51:14PM -0700, Mathieu Poirier wrote:
> On Sat, Jan 19, 2019 at 09:43:47AM +0800, Leo Yan wrote:
> > When return from exception, we need to distinguish if it's system call
> > return or for other type exceptions for setting sample fl
On Wed, Jan 23, 2019 at 02:13:00PM -0700, Mathieu Poirier wrote:
> On Sat, Jan 19, 2019 at 09:43:44AM +0800, Leo Yan wrote:
> > If packet processing wants to know the packet is bound with which ETM
> > version, it needs to access metadata to decide that based on metadata
> >
On Wed, Jan 23, 2019 at 05:22:03PM -0700, Mathieu Poirier wrote:
> On Fri, 18 Jan 2019 at 18:44, Leo Yan wrote:
[...]
> > After applying this patch series, we can verify sample flags with below
> > command:
> >
> > # perf script -F,-time,+flags,+ip,+sym,+d
On Wed, May 08, 2019 at 03:29:12PM +0100, Suzuki K Poulose wrote:
>
> On 08/05/2019 03:18, Leo Yan wrote:
> > Since the DT bindings consolidatoins for CoreSight replicator and funnel
> > is ready for kernel v5.2 merge window [1], this patch set is to update
> > the relat
sting related works.
Thanks,
Leo Yan
[1] https://lkml.org/lkml/2019/4/15/658
gement enabling steps in the testing script, we can add the
related operations if later we have clear idea for this.
Thanks,
Leo Yan
This patch adds a device id for the new static replicator compatible
string; it changes the driver name from "coresight-replicator" to
"coresight-static-replicator" as well.
Signed-off-by: Leo Yan
---
drivers/hwtracing/coresight/coresight-replicator.c | 3 ++-
1 file changed
atic-replicator";
Dynamic replicator:
"arm,coresight-dynamic-replicator", "arm,primecell";
Signed-off-by: Leo Yan
---
Documentation/devicetree/bindings/arm/coresight.txt | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/Documentation/d
skips
registers accessing when detect the register base is NULL.
Cc: Mathieu Poirier
Cc: Suzuki K Poulose
Cc: Wanglai Shi
Suggested-by: Suzuki K Poulose
Signed-off-by: Leo Yan
Reviewed-by: Suzuki K Poulose
---
.../hwtracing/coresight/coresight-funnel.c| 112 +-
1 file chang
ot;, "arm,primecell";
At the end of this patch, it gives an example for static funnel DT
binding, and updates the dynamic funnel example.
Cc: Mathieu Poirier
Cc: Suzuki K Poulose
Cc: Wanglai Shi
Signed-off-by: Leo Yan
---
.../devicetree/bindings/arm/coresight.txt | 52 +
rg/kernel/coresight.git/log/?h=next
== Changes for v4 ==
* Consolidate the DT binding compatible strings for replicator and
funnel (Mathieu).
* Changed replicator driver to support new compatible string.
Leo Yan (4):
dt-bindings: arm: coresight: Add new compatible for static replicator
coresight
Hi Rob, Suzuki,
On Sat, Apr 06, 2019 at 07:21:44PM +0800, Leo Yan wrote:
> Following the same fashion with replicator DT binding, this patch is to
> unify the DT binding for funnel to support static and dynamic modes;
> finally we get the funnel DT binding as below:
>
&g
On Thu, Mar 28, 2019 at 07:24:35PM +, Suzuki K Poulose wrote:
> On 03/28/2019 02:35 AM, Leo Yan wrote:
> > Document DT binding for static (non-configurable) funnel and give an
> > example for it.
> >
> > Cc: Mathieu Poirier
> > Cc: Suzuki K Poulose
>
On Thu, Apr 18, 2019 at 02:52:44PM -0700, Stephen Boyd wrote:
> Quoting Leo Yan (2019-04-17 22:33:39)
> > Hi Michael, Stephen,
> >
> > On Wed, Mar 20, 2019 at 06:05:08PM +0800, Leo Yan wrote:
> > > clk_gate_ufs_subsys is a system bus clock, turning off it will
>
On Fri, Apr 19, 2019 at 03:20:42PM -0700, Stephen Boyd wrote:
> Quoting Leo Yan (2019-03-20 03:05:08)
> > clk_gate_ufs_subsys is a system bus clock, turning off it will
> > introduce lockup issue during system suspend flow. Let's mark
> > clk_gate_ufs_subsys as critic
On Sat, Apr 20, 2019 at 10:00:35PM +0800, Wanglai Shi wrote:
> This patch adds DT bindings for the CoreSight trace components
> on hi3660, which is used by 96boards Hikey960.
>
> Signed-off-by: Wanglai Shi
Reviewed this patch and tested on my Hikey960 board, FWIW:
Reviewed-and-te
reminding.
Thanks,
Leo Yan
u Poirier
Cc: Suzuki K Poulose
Cc: Liviu Dudau
Cc: Sudeep Holla
Cc: Lorenzo Pieralisi
Cc: Wei Xu
Cc: Guodong Xu
Cc: Zhangfei Gao
Cc: Haojian Zhuang
Cc: Shawn Guo
Cc: Chris Healy
Cc: Andrew Lunn
Cc: Fabio Estevam
Cc: Sascha Hauer
Cc: Andy Gross
Cc: David Brown
Cc: Linus Walleij
Cc: Le
.
Cc: Shawn Guo
Cc: Chris Healy
Cc: Andrew Lunn
Cc: Fabio Estevam
Cc: Mathieu Poirier
Cc: Suzuki K Poulose
Signed-off-by: Leo Yan
---
arch/arm/boot/dts/imx7s.dtsi | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/boot/dts/imx7s.dtsi b/arch/arm/boot/dts
.
Cc: Linus Walleij
Cc: Lee Jones
Cc: Mathieu Poirier
Cc: Suzuki K Poulose
Signed-off-by: Leo Yan
---
arch/arm/boot/dts/ste-dbx5x0.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/ste-dbx5x0.dtsi
b/arch/arm/boot/dts/ste-dbx5x0.dtsi
index
.
Cc: Liviu Dudau
Cc: Sudeep Holla
Cc: Lorenzo Pieralisi
Cc: Mathieu Poirier
Cc: Suzuki K Poulose
Signed-off-by: Leo Yan
---
arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts
b/arch/arm
.
Cc: Andy Gross
Cc: David Brown
Cc: Mathieu Poirier
Cc: Suzuki K Poulose
Signed-off-by: Leo Yan
---
arch/arm/boot/dts/qcom-apq8064.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/qcom-apq8064.dtsi
b/arch/arm/boot/dts/qcom-apq8064.dtsi
index
.
Cc: Wei Xu
Cc: Guodong Xu
Cc: Zhangfei Gao
Cc: Haojian Zhuang
Cc: Mathieu Poirier
Cc: Suzuki K Poulose
Signed-off-by: Leo Yan
---
arch/arm/boot/dts/hip04.dtsi | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/arch/arm/boot/dts/hip04.dtsi b/arch/arm/boot
: Sudeep Holla
Cc: Lorenzo Pieralisi
Cc: Mathieu Poirier
Cc: Suzuki K Poulose
Signed-off-by: Leo Yan
---
arch/arm64/boot/dts/arm/juno-base.dtsi| 6 +++---
arch/arm64/boot/dts/arm/juno-cs-r1r2.dtsi | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/arm64/boot/dts/arm
: David Brown
Cc: Mathieu Poirier
Cc: Suzuki K Poulose
Signed-off-by: Leo Yan
---
arch/arm/boot/dts/qcom-msm8974.dtsi | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi
b/arch/arm/boot/dts/qcom-msm8974.dtsi
index 45b5c8ef0374..272ebea20a5f
.
Cc: Wei Xu
Cc: Guodong Xu
Cc: Zhangfei Gao
Cc: Haojian Zhuang
Cc: Mathieu Poirier
Cc: Suzuki K Poulose
Signed-off-by: Leo Yan
---
arch/arm64/boot/dts/hisilicon/hi6220-coresight.dtsi | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/boot/dts/hisilicon/hi6220
: David Brown
Cc: Mathieu Poirier
Cc: Suzuki K Poulose
Signed-off-by: Leo Yan
---
arch/arm64/boot/dts/qcom/msm8916.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi
b/arch/arm64/boot/dts/qcom/msm8916.dtsi
index 423dda996b5d
: Orson Zhai
Cc: Mathieu Poirier
Cc: Suzuki K Poulose
Signed-off-by: Leo Yan
Acked-by: Chunyan Zhang
---
arch/arm64/boot/dts/sprd/sc9836.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/sprd/sc9836.dtsi
b/arch/arm64/boot/dts/sprd/sc9836.dtsi
index
: Orson Zhai
Cc: Mathieu Poirier
Cc: Suzuki K Poulose
Signed-off-by: Leo Yan
Acked-by: Chunyan Zhang
---
arch/arm64/boot/dts/sprd/sc9860.dtsi | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/sprd/sc9860.dtsi
b/arch/arm64/boot/dts/sprd/sc9860.dtsi
On Fri, Apr 26, 2019 at 10:26:24AM -0600, Mathieu Poirier wrote:
[...]
> > Leo Yan (4):
> > dt-bindings: arm: coresight: Add new compatible for static replicator
> > coresight: replicator: Add new device id for static replicator
> > dt-bindings: arm: coresight:
Since cs_etm_queue::prev_packet is allocated for all cases, it will
never be NULL pointer; now validity checking prev_packet is pointless,
remove all of them.
Signed-off-by: Leo Yan
---
tools/perf/util/cs-etm.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/tools/perf
atch
always allocates memory for cs_etm_queue::prev_packet.
Reported-by: Robert Walker
Suggested-by: Robert Walker
Fixes: 7100b12cf474 ("perf cs-etm: Generate branch sample for exception packet")
Fixes: 24fff5eb2b93 ("perf cs-etm: Avoid stale branch samples when flush
packet")
Signed-of
element count is
'trace->sctbl->syscalls.max_id + 1', this allows any id to access the
table without out of the bound.
Fixes: 30a910d7d3e0 ("perf trace: Preallocate the syscall table")
Signed-off-by: Leo Yan
---
tools/perf/builtin-trace.c | 2 +-
1 file changed, 1 ins
On Fri, Aug 09, 2019 at 10:25:22AM -0300, Arnaldo Carvalho de Melo wrote:
> Em Fri, Aug 09, 2019 at 06:47:52PM +0800, Leo Yan escreveu:
> > 'perf trace' reports the segmentation fault as below on Arm64:
> >
> > # perf trace -e string -e augmented_raw_syscalls.c
h specific
code to be placed into 'arch' folder.
Signed-off-by: Leo Yan
---
tools/perf/arch/x86/util/machine.c | 10 ++
tools/perf/util/machine.c | 13 +++--
tools/perf/util/machine.h | 2 ++
3 files changed, 19 insertions(+), 6 deletions(-)
diff --g
have better method to resolve this issue, any suggestions and
comments are very welcome!
[1] https://lkml.org/lkml/2019/6/19/1057
Leo Yan (2):
perf machine: Support arch's specific kernel start address
perf machine: arm/arm64: Improve completeness for kernel address space
t
11b846088d5_sys_enter
[...]
Cc: Mathieu Poirier
Cc: Alexander Shishkin
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Peter Zijlstra
Cc: Suzuki Poulouse
Cc: coresi...@lists.linaro.org
Cc: linux-arm-ker...@lists.infradead.org
Signed-off-by: Leo Yan
---
tools/perf/Makefile.config | 22 ++
On Mon, Aug 12, 2019 at 09:37:33AM +0300, Adrian Hunter wrote:
> On 10/08/19 10:21 AM, Leo Yan wrote:
> > machine__get_kernel_start() gives out the kernel start address; some
> > architectures need to tweak the start address so that can reflect the
> > kernel start address co
On Mon, Aug 12, 2019 at 10:23:21AM +0300, Adrian Hunter wrote:
> On 12/08/19 10:02 AM, Leo Yan wrote:
> > On Mon, Aug 12, 2019 at 09:37:33AM +0300, Adrian Hunter wrote:
> >> On 10/08/19 10:21 AM, Leo Yan wrote:
> >>> machine__get_kernel_start() gives out
Hi Will,
Thanks for reviewing.
On Wed, Jul 31, 2019 at 05:08:37PM +0100, Will Deacon wrote:
> On Tue, Jul 16, 2019 at 07:13:00PM +0800, Leo Yan wrote:
> > This patch implement regs_set_return_value() and
> > override_function_with_return() to support function error injectio
On Tue, Jul 16, 2019 at 07:13:00PM +0800, Leo Yan wrote:
> This patch implement regs_set_return_value() and
> override_function_with_return() to support function error injection
> for arm64.
>
> In the exception flow, arm64's general register x30 contains the value
> for t
Hi Russell,
On Tue, Jul 16, 2019 at 07:13:01PM +0800, Leo Yan wrote:
> This patch implement regs_set_return_value() and
> override_function_with_return() to support function error injection
> for arm.
>
> In the exception flow, we can update pt_regs::ARM_pc with
> pt_regs::
emory.
Changes from v1:
* Consolidated the function definition into asm-generic header (Will);
* Used APIs to access pt_regs elements (Will);
* Fixed typos in the comments (Will).
Leo Yan (3):
error-injection: Consolidate override function definition
arm64: Add support for function error inje
includes linux/compiler.h for successful
compilation.
Signed-off-by: Leo Yan
---
arch/powerpc/include/asm/error-injection.h | 13 -
arch/x86/include/asm/error-injection.h | 13 -
include/asm-generic/error-injection.h | 6 ++
include/linux/error-injection.h
unction is
override_function_with_return() which is to override the probed
function returning and jump to its caller.
Signed-off-by: Leo Yan
---
arch/arm64/Kconfig | 1 +
arch/arm64/include/asm/ptrace.h | 5 +
arch/arm64/lib/Makefile | 2 ++
arch/arm64/lib/error-injec
This patch implements arm specific functions regs_set_return_value() and
override_function_with_return() to support function error injection.
In the exception flow, it updates pt_regs::ARM_pc with pt_regs::ARM_lr
so can override the probed function return.
Signed-off-by: Leo Yan
---
arch/arm
On Wed, Aug 07, 2019 at 09:08:11AM +0900, Masami Hiramatsu wrote:
> On Tue, 6 Aug 2019 18:00:12 +0800
> Leo Yan wrote:
>
> > This small patch set is to add support for function error injection;
> > this can be used to eanble more advanced debugging feature, e.g.
> >
On Wed, Aug 07, 2019 at 05:07:03PM +0100, Will Deacon wrote:
> On Tue, Aug 06, 2019 at 06:00:12PM +0800, Leo Yan wrote:
> > This small patch set is to add support for function error injection;
> > this can be used to eanble more advanced debugging feature, e.g.
> > CONFI
> > > > + fixup_kernel_start = etmq->etm->kernel_start -
> > > > +ARM64_PRE_START_SIZE;
> > > > + else if (!strcmp(arch, "arm"))
> > > > + fixup_kernel_start = e
// #1
[...]
Cc: Mathieu Poirier
Cc: Alexander Shishkin
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Peter Zijlstra
Cc: Suzuki Poulouse
Cc: coresi...@lists.linaro.org
Cc: linux-arm-ker...@lists.infradead.org
Signed-off-by: Leo Yan
---
tools/perf/Makefile.config | 24
On Mon, Jun 17, 2019 at 02:32:03PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Mon, Jun 17, 2019 at 05:11:40PM +0800, Leo Yan escreveu:
> > trace__init_bpf_map_syscall_args() invokes trace__syscall_info() to
> > retrieve system calls information, it always passes NULL for '
On Mon, Jun 17, 2019 at 12:24:12PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Mon, Jun 17, 2019 at 05:11:39PM +0800, Leo Yan escreveu:
> > In the function trace__syscall_info(), it explicitly checks verbose
> > level and print out log with fprintf(). Actually, we can use
> >
On Thu, Jun 06, 2019 at 10:34:24AM -0300, Arnaldo Carvalho de Melo wrote:
> Em Thu, Jun 06, 2019 at 10:30:19AM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Thu, Jun 06, 2019 at 05:48:42PM +0800, Leo Yan escreveu:
> > > +++ b/tools/perf/builtin-trace.c
> > > @@ -36
> in architectures where some of those syscalls are not available, like
> the 'access' syscall on arm64, which makes using 'perf trace -e string'
> in such archs to fail.
>
> Since this the routine doing the validation is used only when
At the head of function, it directly access 'attr' without checking if
it's NULL pointer. This patch moves the values assignment after
validating 'attr' and 'attr->file'.
Signed-off-by: Leo Yan
---
tools/lib/bpf/libbpf.c | 8
1 file changed, 4 ins
). This patch fixes this
use-after-freed issue.
Signed-off-by: Leo Yan
---
tools/perf/builtin-stat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 8a35fc5a7281..de0f6d0e96a2 100644
--- a/tools/perf/builtin-sta
lidates 'state' pointer before access its elements.
Signed-off-by: Leo Yan
---
tools/perf/util/map.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
index 6fce983c6115..5f87975d2562 100644
--- a/t
don't know what's the best way to fix
it. There also have many inconsistent indenting warnings. So I firstly
send out this patch set and let's see what's the feedback from public
reviewing.
Leo Yan (11):
perf report: Smatch: Fix potential NULL pointer dereference
perf sta
evsel->idx,
^^^
305name,
306event->read.value);
This patch checks if 'evsel' is NULL pointer then pass UINT64_MAX as idx
parameter.
Signed-off-by: Leo Yan
ntial NULL pointer dereference, this patch validates
the pointer 'session->itrace_synth_opts' before access its elements.
Signed-off-by: Leo Yan
---
tools/perf/util/intel-pt.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/tools/perf/util/intel-pt.c b/tools/pe
;s pointless to assign NULL to *namep again.
Signed-off-by: Leo Yan
---
tools/perf/util/annotate.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index c8ce13419d9b..b8dfcfe08bb1 100644
--- a/tools/perf/util/an
s them, so can
fix potential NULL pointer dereference.
Signed-off-by: Leo Yan
---
tools/perf/ui/browsers/hists.c | 13 +
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 3421ecbdd3f0..2ba33040ddd8 100644
---
ent->read.tid,
1249evsel ? perf_evsel__name(evsel) : "FAIL",
1250event->read.value);
1251
1252 read_format = evsel->attr.read_format;
^^^
'evsel' could be NULL pointer, for this case this patch directly bail
ce;
1047 }
This patch directly returns NULL when fail to allocate memory for
ttrace; this can avoid potential NULL pointer dereference.
Signed-off-by: Leo Yan
---
tools/perf/builtin-trace.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/perf/builtin-trace.c b/to
104 struct symbol *sym;
105 struct annotation *notes;
106 struct map *map;
107 int err = -1;
108
109 if (!he || !he->ms.sym)
110 return -1;
This patch moves the values assignment after validating pointer 'he'.
Signed-off-
dereference, this patch validates
the pointer 'session->itrace_synth_opts' before access its elements.
Signed-off-by: Leo Yan
---
tools/perf/util/intel-bts.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/tools/perf/util/intel-bts.c b/tools/perf/util/intel-bts.
trace_synth_opts' before access its elements.
Signed-off-by: Leo Yan
---
tools/perf/util/cs-etm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
index 0c7776b51045..b79df56eb9df 100644
--- a/tools/perf/util/
Hi Adrian,
On Tue, Jul 02, 2019 at 02:07:40PM +0300, Adrian Hunter wrote:
> On 2/07/19 1:34 PM, Leo Yan wrote:
> > Based on the following report from Smatch, fix the potential
> > NULL pointer dereference check.
>
> It never is NULL. Remove the NULL test if you want:
&
On Tue, Jul 02, 2019 at 01:07:43PM +0200, Jiri Olsa wrote:
> On Tue, Jul 02, 2019 at 06:34:09PM +0800, Leo Yan wrote:
> > When I used static checker Smatch for perf building, the main target is
> > to check if there have any potential issues in Arm cs-etm code. So
> > finally
On Wed, Jul 03, 2019 at 08:19:19AM +0300, Adrian Hunter wrote:
> On 3/07/19 4:35 AM, Leo Yan wrote:
> > Hi Adrian,
> >
> > On Tue, Jul 02, 2019 at 02:07:40PM +0300, Adrian Hunter wrote:
> >> On 2/07/19 1:34 PM, Leo Yan wrote:
> >>> Based on the follo
Hi Mathieu,
On Tue, Jul 02, 2019 at 11:03:06AM -0600, Mathieu Poirier wrote:
> Hi Leo,
>
> On Tue, Jul 02, 2019 at 06:34:20PM +0800, Leo Yan wrote:
> > Based on the following report from Smatch, fix the potential
> > NULL pointer dereference check.
> >
> >
On Wed, Jul 03, 2019 at 11:00:32AM +0100, Daniel Thompson wrote:
> On Wed, Jul 03, 2019 at 09:35:54AM +0800, Leo Yan wrote:
> > Hi Adrian,
> >
> > On Tue, Jul 02, 2019 at 02:07:40PM +0300, Adrian Hunter wrote:
> > > On 2/07/19 1:34 PM, Leo Yan wrote:
> > &g
On Wed, Jul 03, 2019 at 12:23:05PM +0200, Daniel Borkmann wrote:
> On 07/02/2019 12:25 PM, Leo Yan wrote:
> > Based on the following report from Smatch, fix the potential
> > NULL pointer dereference check.
> >
> > tools/lib/bpf/libbpf.c:3493
> > bpf
Hi Arnaldo,
On Wed, Jul 03, 2019 at 03:18:15PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Wed, Jul 03, 2019 at 09:48:08AM +0800, Leo Yan escreveu:
> > On Tue, Jul 02, 2019 at 01:07:43PM +0200, Jiri Olsa wrote:
> > > On Tue, Jul 02, 2019 at 06:34:09PM +0800, Leo Yan wrote:
&
and aligned the numbers indention for arm64.
Leo Yan (4):
perf trace: Exit when build eBPF program failure
perf augmented_raw_syscalls: Remove duplicate macros
perf augmented_raw_syscalls: Support arm64 raw syscalls
perf augmented_raw_syscalls: Document clang configuration
tools/perf
ccessfully.
This patch changes error handling in trace__config(), when it detects
failure it will return -1 rather than directly pass error value (1);
finally, perf_config() will directly bail out and perf will exit for
this case.
Signed-off-by: Leo Yan
---
tools/perf/builtin-trace.c | 8
architectures
will report failure when compilation.
Signed-off-by: Leo Yan
---
.../examples/bpf/augmented_raw_syscalls.c | 81 +++
1 file changed, 81 insertions(+)
diff --git a/tools/perf/examples/bpf/augmented_raw_syscalls.c
b/tools/perf/examples/bpf/augmented_raw_syscalls.c
index
The macro SYS_EXECVE has been defined twice, remove the duplicate one.
Signed-off-by: Leo Yan
---
tools/perf/examples/bpf/augmented_raw_syscalls.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/tools/perf/examples/bpf/augmented_raw_syscalls.c
b/tools/perf/examples/bpf
for llvm.clang-opt variable, one is for x86_64
architecture and another is for aarch64 architecture.
Signed-off-by: Leo Yan
---
.../examples/bpf/augmented_raw_syscalls.c | 19 +++
1 file changed, 19 insertions(+)
diff --git a/tools/perf/examples/bpf/augmented_raw_syscalls.c
b
Hi all,
On Thu, Jun 06, 2019 at 03:56:13PM +0800, Leo Yan wrote:
> When I tried to run the trace on arm64 platform with eBPF program
> augmented_raw_syscalls, it reports several failures for eBPF program
> compilation. So tried to resolve these issues and this patch set is
> the wo
Hi Arnaldo,
On Thu, Jun 06, 2019 at 10:30:19AM -0300, Arnaldo Carvalho de Melo wrote:
> Em Thu, Jun 06, 2019 at 05:48:42PM +0800, Leo Yan escreveu:
> > On my Juno board with ARM64 CPUs, perf trace command reports the eBPF
> > program building failure but the command will not exit
Hi Arnaldo,
On Thu, Jun 06, 2019 at 10:38:38AM -0300, Arnaldo Carvalho de Melo wrote:
> Em Thu, Jun 06, 2019 at 05:48:44PM +0800, Leo Yan escreveu:
> > This patch adds support for arm64 raw syscall numbers so that we can use
> > it on arm64 platform.
> >
> > After app
On Thu, Jun 06, 2019 at 11:08:00AM -0300, Arnaldo Carvalho de Melo wrote:
> Em Thu, Jun 06, 2019 at 05:48:45PM +0800, Leo Yan escreveu:
> > To build this program successfully with clang, there have three
> > compiler options need to be specified:
> >
> > - Header fi
ion to reflect the new naming scheme with
> > > latest changes.
> > >
> > > Reported-by: Leo Yan
> > > Cc: Mathieu Poirier
> > > Cc: Jonathan Corbet
> > > Signed-off-by: Suzuki K Poulose
> > > ---
> > > Documentation/tra
-USR2 19097
[ perf record: Woken up 4 times to write data ]
[ perf record: Captured and wrote 0.753 MB perf.data ]
FWIW:
Tested-by: Leo Yan
> I also changed the subject to:
>
> [PATCH] perf cs-etm: Properly set the value of 'old' and 'head' in snapshot
> mode
>
Hi Arnaldo,
On Thu, Jun 06, 2019 at 11:44:12AM -0300, Arnaldo Carvalho de Melo wrote:
> Em Thu, Jun 06, 2019 at 10:12:31PM +0800, Leo Yan escreveu:
> > Hi Arnaldo,
> >
> > On Thu, Jun 06, 2019 at 10:38:38AM -0300, Arnaldo Carvalho de Melo wrote:
> > > Em Thu, Ju
later who is the first time to
access kernel CoreSight modules and don't know the history for naming
scheme, the related documentation will be friendly and reduce the
barrier for using it.
I have no strong opinion for this, seems to me another choice is to
describe the older kernel with old naming scheme, something like below:
On older kernels, this may need to be found from the list of coresight devices,
available under ($SYSFS)/bus/coresight/devices/ with old naming scheme:
root@linaro-nano:~# ls /sys/bus/coresight/devices/
2001.etf 2004.funnel 2010.stm 2204.etm> Cheers
2214.etm 230c.funnel 2324.etm 2003.tpiu > Suzuki
2007.etr 2012.replicator 220c.funnel
2304.etm 2314.etm 2334.etm
root@linaro-nano:~# perf record -e cs_etm/@2007.etr/u --per-thread
program
Thanks,
Leo Yan
701 - 800 of 1764 matches
Mail list logo