[PATCH v2] Fix annotate.c use of uninitialized value error

2019-07-30 Thread Numfor Mbiziwo-Tiapo
-o - ls / | tools/perf/perf --no-pager annotate\ -i - --stdio Please see the cover letter for why false positive warnings may be generated. Signed-off-by: Numfor Mbiziwo-Tiapo --- tools/perf/util/annotate.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tool

[tip:perf/urgent] perf header: Fix use of unitialized value warning

2019-07-29 Thread tip-bot for Numfor Mbiziwo-Tiapo
Commit-ID: 20f9781f491360e7459c589705a2e4b1f136bee9 Gitweb: https://git.kernel.org/tip/20f9781f491360e7459c589705a2e4b1f136bee9 Author: Numfor Mbiziwo-Tiapo AuthorDate: Wed, 24 Jul 2019 16:44:58 -0700 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 29 Jul 2019 09:03:43 -0300 perf

[PATCH v2] Fix annotate.c use of uninitialized value error

2019-07-29 Thread Numfor Mbiziwo-Tiapo
-o - ls / | tools/perf/perf --no-pager annotate\ -i - --stdio Please see the cover letter for why false positive warnings may be generated. Signed-off-by: Numfor Mbiziwo-Tiapo --- tools/perf/util/annotate.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tool

[PATCH 3/3] Fix sched-messaging.c use of uninitialized value errors

2019-07-24 Thread Numfor Mbiziwo-Tiapo
ave to be specified as the compiler - export CC=/usr/bin/clang) then running: tools/perf/perf bench sched all Please see the cover letter for why false positive warnings may be generated. Signed-off-by: Numfor Mbiziwo-Tiapo --- tools/perf/bench/sched-messaging.c | 3 ++- 1 file changed, 2 ins

[PATCH 1/3] Fix util.c use of unitialized value warning

2019-07-24 Thread Numfor Mbiziwo-Tiapo
ols/perf/perf record -o - ls / | tools/perf/perf --no-pager annotate\ -i - --stdio Please see the cover letter for why false positive warnings may be generated. Signed-off-by: Numfor Mbiziwo-Tiapo --- tools/perf/util/header.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/to

[PATCH 0/3] Perf uninitialized value fixes

2019-07-24 Thread Numfor Mbiziwo-Tiapo
d. Finding a way to build libc with MSAN will get rid of these false positives and allow the real warnings mentioned in the patches to be shown. Numfor Mbiziwo-Tiapo (3): Fix util.c use of uninitialized value warning Fix annotate.c use of uninitialized value error Fix sched-messaging.c use of

[PATCH 2/3] Fix annotate.c use of uninitialized value error

2019-07-24 Thread Numfor Mbiziwo-Tiapo
-o - ls / | tools/perf/perf --no-pager annotate\ -i - --stdio Please see the cover letter for why false positive warnings may be generated. Signed-off-by: Numfor Mbiziwo-Tiapo --- tools/perf/util/annotate.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tool

[RFC][PATCH 2/2] Fix evsel.c misaligned address errors

2019-07-24 Thread Numfor Mbiziwo-Tiapo
causes issues when 'data->branch_stack' is later assigned to an element in the array. In the case that the array is misaligned we can add 4 bytes to the array to realign it. This still causes an incorrect perf data file (so the test still fails with the ubsan build) but it at least g

[RFC][PATCH 1/2] Fix event.c misaligned address error

2019-07-24 Thread Numfor Mbiziwo-Tiapo
ue to event data alignment changing. Comments? Not-Quite-Signed-off-by: Numfor Mbiziwo-Tiapo --- tools/perf/util/event.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index eb95f3384958..82eaf06c2604 100644 --- a/tools/perf/util/ev

[RFC][PATCH 0/2] Perf misaligned address fixes

2019-07-24 Thread Numfor Mbiziwo-Tiapo
USE_CLANG=1 EXTRA_CFLAGS="-fsanitize=undefined" Perf will throw errors that have been fixed in these patches that have not yet been merged: https://lore.kernel.org/patchwork/patch/1104065/ https://lore.kernel.org/patchwork/patch/1104066/ Please feel free to leave comments. Numfor Mbiziw

[PATCH 0/3] Perf UBsan Patches

2019-07-24 Thread Numfor Mbiziwo-Tiapo
or and Fix ordered-events.c array-bounds error patches since these are necessary to get the ubsan version of perf to build. To build the ubsan version, run: make -C tools/perf USE_CLANG=1 EXTRA_CFLAGS="-fsanitize=undefined" Numfor Mbiziwo-Tiapo (3): Fix backward-ring-buffer.c format-tr

[PATCH 1/3] Fix backward-ring-buffer.c format-truncation error

2019-07-24 Thread Numfor Mbiziwo-Tiapo
ded string. If somehow 'i' was greater than 8 bytes (10 - 2), then the snprintf function would truncate the string. Increasing the size of the buffer fixes the error. Signed-off-by: Numfor Mbiziwo-Tiapo --- tools/perf/tests/backward-ring-buffer.c | 2 +- 1 file changed, 1 insertion(+)

[PATCH 3/3] Fix insn.c misaligned address error

2019-07-24 Thread Numfor Mbiziwo-Tiapo
The error occurs in the __get_next macro (line 34) where an int is read from a potentially unaligned address. Using memcpy instead of assignment from an unaligned pointer. Signed-off-by: Numfor Mbiziwo-Tiapo --- tools/perf/util/intel-pt-decoder/insn.c | 3 ++- 1 file changed, 2 insertions(+),

[PATCH 2/3] Fix ordered-events.c array-bounds error

2019-07-24 Thread Numfor Mbiziwo-Tiapo
;how' (OE_FLUSH__TOP and OE_FLUSH__TIME) are used as indices, this will go out of the bounds of the 'str' array. Adding the matching strings from the enum values into the 'str' array fixes this. Signed-off-by: Numfor Mbiziwo-Tiapo --- tools/perf/util/ordered-events.c |

[tip:perf/urgent] perf test mmap-thread-lookup: Initialize variable to suppress memory sanitizer warning

2019-07-13 Thread tip-bot for Numfor Mbiziwo-Tiapo
Commit-ID: 4e4cf62b37da5ff45c904a3acf242ab29ed5881d Gitweb: https://git.kernel.org/tip/4e4cf62b37da5ff45c904a3acf242ab29ed5881d Author: Numfor Mbiziwo-Tiapo AuthorDate: Tue, 2 Jul 2019 10:37:15 -0700 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 9 Jul 2019 09:33:54 -0300 perf

[PATCH] Fix perf stat repeat segfault

2019-07-11 Thread Numfor Mbiziwo-Tiapo
): make -C tools/perf then running: tools/perf/perf stat -e '{cycles,instructions}' -r 10 ls Since run_idx keeps track of the current iteration of the repeat, only storing the cpu ids on the first iteration (when run_idx < 1) fixes this issue. Signed-off-by: Numfor Mbiziwo-Tiapo --

[PATCH] Fix perf test data race for tsan build

2019-07-10 Thread Numfor Mbiziwo-Tiapo
warning because tsan doesn't recognize the atomic functions as thread safe, but in actuality it should prevent a data race. Signed-off-by: Numfor Mbiziwo-Tiapo --- tools/perf/tests/mmap-thread-lookup.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/perf/tests/mmap

[PATCH] Fix perf stat repeat segfault

2019-07-10 Thread Numfor Mbiziwo-Tiapo
): make -C tools/perf then running: tools/perf/perf stat -e '{cycles,instructions}' -r 10 ls Since run_idx keeps track of the current iteration of the repeat, only storing the cpu ids on the first iteration (when run_idx < 1) fixes this issue. Signed-off-by: Numfor Mbiziwo-Tiapo --

[PATCH] Fix perf-hooks test for sanitizers

2019-07-08 Thread Numfor Mbiziwo-Tiapo
tools/perf USE_CLANG=1 EXTRA_CFLAGS="-fsanitize=address \ -DADDRESS_SANITIZER=1" then running tools/perf/perf test 55 Fix past to pass: The raised signal was changed from SIGSEGV to SIGILL to get the test to pass on our local machines which use clang 4. Signed-off-by: Numfor Mbi

[tip:perf/core] perf tools: Fix cache.h include directive

2019-07-03 Thread tip-bot for Numfor Mbiziwo-Tiapo
Commit-ID: 2d7102a0453769fd37e9f4ce68652e104fbf5c84 Gitweb: https://git.kernel.org/tip/2d7102a0453769fd37e9f4ce68652e104fbf5c84 Author: Numfor Mbiziwo-Tiapo AuthorDate: Thu, 20 Jun 2019 14:54:46 -0700 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 25 Jun 2019 08:47:09 -0300 perf

[PATCH 2/2] Fix perf-hooks test

2019-07-02 Thread Numfor Mbiziwo-Tiapo
The perf-hooks test fails with Address Sanitizer and Memory Sanitizer builds because it purposefully generates a segfault. Checking if these sanitizers are active when running this test will allow the perf-hooks test to pass. Signed-off-by: Numfor Mbiziwo-Tiapo --- tools/perf/tests/perf-hooks.c

[PATCH 1/2] Fix mmap-thread-lookup.c unitialized memory usage

2019-07-02 Thread Numfor Mbiziwo-Tiapo
Running the perf test command after building perf with a memory sanitizer causes a warning that says: WARNING: MemorySanitizer: use-of-uninitialized-value... in mmap-thread-lookup.c Initializing the go variable to 0 fixes this change. Signed-off-by: Numfor Mbiziwo-Tiapo --- tools/perf/tests