All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v1 4/6] perf parse-events: Add default_breakpoint_len helper
@ 2024-09-01  9:10 kernel test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2024-09-01  9:10 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "low confidence bisect report"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20240831070415.506194-5-irogers@google.com>
References: <20240831070415.506194-5-irogers@google.com>
TO: Ian Rogers <irogers@google.com>
TO: Peter Zijlstra <peterz@infradead.org>
TO: Ingo Molnar <mingo@redhat.com>
TO: Arnaldo Carvalho de Melo <acme@kernel.org>
TO: Namhyung Kim <namhyung@kernel.org>
TO: Mark Rutland <mark.rutland@arm.com>
TO: Alexander Shishkin <alexander.shishkin@linux.intel.com>
TO: Jiri Olsa <jolsa@kernel.org>
TO: Ian Rogers <irogers@google.com>
TO: Adrian Hunter <adrian.hunter@intel.com>
TO: Kan Liang <kan.liang@linux.intel.com>
TO: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
TO: Dominique Martinet <asmadeus@codewreck.org>
TO: Yang Jihong <yangjihong@bytedance.com>
TO: Colin Ian King <colin.i.king@gmail.com>
TO: Chaitanya S Prakash <chaitanyas.prakash@arm.com>
TO: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
TO: James Clark <james.clark@linaro.org>
TO: John Garry <john.g.garry@oracle.com>
TO: Junhao He <hejunhao3@huawei.com>
TO: David Ahern <dsa@cumulusnetworks.com>
TO: linux-perf-users@vger.kernel.org
TO: linux-kernel@vger.kernel.org

Hi Ian,

kernel test robot noticed the following build warnings:

[auto build test WARNING on perf-tools-next/perf-tools-next]
[also build test WARNING on tip/perf/core perf-tools/perf-tools linus/master v6.11-rc5 next-20240830]
[cannot apply to acme/perf/core]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Ian-Rogers/perf-pmus-Fix-name-comparisons-on-32-bit-systems/20240831-150738
base:   https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git perf-tools-next
patch link:    https://lore.kernel.org/r/20240831070415.506194-5-irogers%40google.com
patch subject: [PATCH v1 4/6] perf parse-events: Add default_breakpoint_len helper
:::::: branch date: 26 hours ago
:::::: commit date: 26 hours ago
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202409011605.G583kE4G-lkp@intel.com/

includecheck warnings: (new ones prefixed by >>)
>> tools/perf/tests/parse-events.c: parse-events.h is included more than once.

vim +2 tools/perf/tests/parse-events.c

   > 2	#include "parse-events.h"
     3	#include "evsel.h"
     4	#include "evlist.h"
     5	#include <api/fs/fs.h>
     6	#include "tests.h"
     7	#include "debug.h"
   > 8	#include "parse-events.h"
     9	#include "pmu.h"
    10	#include "pmus.h"
    11	#include <dirent.h>
    12	#include <errno.h>
    13	#include "fncache.h"
    14	#include <sys/types.h>
    15	#include <sys/stat.h>
    16	#include <unistd.h>
    17	#include <linux/kernel.h>
    18	#include <linux/hw_breakpoint.h>
    19	#include <api/fs/tracing_path.h>
    20	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: [PATCH v1 4/6] perf parse-events: Add default_breakpoint_len helper
@ 2024-09-02 10:04 kernel test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2024-09-02 10:04 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "low confidence bisect report"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20240831070415.506194-5-irogers@google.com>
References: <20240831070415.506194-5-irogers@google.com>
TO: Ian Rogers <irogers@google.com>
TO: Peter Zijlstra <peterz@infradead.org>
TO: Ingo Molnar <mingo@redhat.com>
TO: Arnaldo Carvalho de Melo <acme@kernel.org>
TO: Namhyung Kim <namhyung@kernel.org>
TO: Mark Rutland <mark.rutland@arm.com>
TO: Alexander Shishkin <alexander.shishkin@linux.intel.com>
TO: Jiri Olsa <jolsa@kernel.org>
TO: Ian Rogers <irogers@google.com>
TO: Adrian Hunter <adrian.hunter@intel.com>
TO: Kan Liang <kan.liang@linux.intel.com>
TO: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
TO: Dominique Martinet <asmadeus@codewreck.org>
TO: Yang Jihong <yangjihong@bytedance.com>
TO: Colin Ian King <colin.i.king@gmail.com>
TO: Chaitanya S Prakash <chaitanyas.prakash@arm.com>
TO: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
TO: James Clark <james.clark@linaro.org>
TO: John Garry <john.g.garry@oracle.com>
TO: Junhao He <hejunhao3@huawei.com>
TO: David Ahern <dsa@cumulusnetworks.com>
TO: linux-perf-users@vger.kernel.org
TO: linux-kernel@vger.kernel.org

Hi Ian,

kernel test robot noticed the following build errors:

[auto build test ERROR on perf-tools-next/perf-tools-next]
[also build test ERROR on tip/perf/core perf-tools/perf-tools linus/master v6.11-rc6 next-20240830]
[cannot apply to acme/perf/core]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Ian-Rogers/perf-pmus-Fix-name-comparisons-on-32-bit-systems/20240831-150738
base:   https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git perf-tools-next
patch link:    https://lore.kernel.org/r/20240831070415.506194-5-irogers%40google.com
patch subject: [PATCH v1 4/6] perf parse-events: Add default_breakpoint_len helper
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240902/202409021757.lo8IJN6Z-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202409021757.lo8IJN6Z-lkp@intel.com/

All errors (new ones prefixed by >>):

   Makefile.config:671: No libunwind found. Please install libunwind-dev[el] >= 1.1 and/or set LIBUNWIND_DIR
     PERF_VERSION = 6.11.rc3.gb501bb09c1c6
   tests/bp_signal.c: In function '__event':
>> tests/bp_signal.c:115:28: error: operand of '?:' changes signedness from 'int' to 'long unsigned int' due to unsignedness of other operand [-Werror=sign-compare]
     115 |         pe.bp_len = is_x ? default_breakpoint_len() : sizeof(long);
         |                            ^~~~~~~~~~~~~~~~~~~~~~~~
   tests/bp_account.c: In function '__event':
>> tests/bp_account.c:54:31: error: operand of '?:' changes signedness from 'int' to 'long unsigned int' due to unsignedness of other operand [-Werror=sign-compare]
      54 |         attr->bp_len = is_x ? default_breakpoint_len() : sizeof(long);
         |                               ^~~~~~~~~~~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors
   make[7]: *** [tools/build/Makefile.build:106: tools/perf/tests/bp_signal.o] Error 1
   make[7]: *** Waiting for unfinished jobs....
   cc1: all warnings being treated as errors
   make[7]: *** [tools/build/Makefile.build:105: tools/perf/tests/bp_account.o] Error 1
   make[6]: *** [tools/build/Makefile.build:158: tests] Error 2
   make[5]: *** [Makefile.perf:777: tools/perf/perf-test-in.o] Error 2
   make[5]: *** Waiting for unfinished jobs....
   make[4]: *** [Makefile.perf:292: sub-make] Error 2
   make[3]: *** [Makefile:76: all] Error 2


vim +115 tools/perf/tests/bp_signal.c

5a6bef47b41867 Jiri Olsa                2013-03-10  102  
1ad826bad5bd0b Arnaldo Carvalho de Melo 2016-02-12  103  static int __event(bool is_x, void *addr, int sig)
5a6bef47b41867 Jiri Olsa                2013-03-10  104  {
5a6bef47b41867 Jiri Olsa                2013-03-10  105  	struct perf_event_attr pe;
5a6bef47b41867 Jiri Olsa                2013-03-10  106  	int fd;
5a6bef47b41867 Jiri Olsa                2013-03-10  107  
5a6bef47b41867 Jiri Olsa                2013-03-10  108  	memset(&pe, 0, sizeof(struct perf_event_attr));
5a6bef47b41867 Jiri Olsa                2013-03-10  109  	pe.type = PERF_TYPE_BREAKPOINT;
5a6bef47b41867 Jiri Olsa                2013-03-10  110  	pe.size = sizeof(struct perf_event_attr);
5a6bef47b41867 Jiri Olsa                2013-03-10  111  
5a6bef47b41867 Jiri Olsa                2013-03-10  112  	pe.config = 0;
8fd34e1cce180e Wang Nan                 2016-01-25  113  	pe.bp_type = is_x ? HW_BREAKPOINT_X : HW_BREAKPOINT_W;
8fd34e1cce180e Wang Nan                 2016-01-25  114  	pe.bp_addr = (unsigned long) addr;
b501bb09c1c66d Ian Rogers               2024-08-31 @115  	pe.bp_len = is_x ? default_breakpoint_len() : sizeof(long);
5a6bef47b41867 Jiri Olsa                2013-03-10  116  
5a6bef47b41867 Jiri Olsa                2013-03-10  117  	pe.sample_period = 1;
5a6bef47b41867 Jiri Olsa                2013-03-10  118  	pe.sample_type = PERF_SAMPLE_IP;
5a6bef47b41867 Jiri Olsa                2013-03-10  119  	pe.wakeup_events = 1;
5a6bef47b41867 Jiri Olsa                2013-03-10  120  
5a6bef47b41867 Jiri Olsa                2013-03-10  121  	pe.disabled = 1;
5a6bef47b41867 Jiri Olsa                2013-03-10  122  	pe.exclude_kernel = 1;
5a6bef47b41867 Jiri Olsa                2013-03-10  123  	pe.exclude_hv = 1;
5a6bef47b41867 Jiri Olsa                2013-03-10  124  
57480d2cd93579 Yann Droneaud            2014-06-30  125  	fd = sys_perf_event_open(&pe, 0, -1, -1,
57480d2cd93579 Yann Droneaud            2014-06-30  126  				 perf_event_open_cloexec_flag());
5a6bef47b41867 Jiri Olsa                2013-03-10  127  	if (fd < 0) {
5a6bef47b41867 Jiri Olsa                2013-03-10  128  		pr_debug("failed opening event %llx\n", pe.config);
5a6bef47b41867 Jiri Olsa                2013-03-10  129  		return TEST_FAIL;
5a6bef47b41867 Jiri Olsa                2013-03-10  130  	}
5a6bef47b41867 Jiri Olsa                2013-03-10  131  
5a6bef47b41867 Jiri Olsa                2013-03-10  132  	fcntl(fd, F_SETFL, O_RDWR|O_NONBLOCK|O_ASYNC);
1ad826bad5bd0b Arnaldo Carvalho de Melo 2016-02-12  133  	fcntl(fd, F_SETSIG, sig);
5a6bef47b41867 Jiri Olsa                2013-03-10  134  	fcntl(fd, F_SETOWN, getpid());
5a6bef47b41867 Jiri Olsa                2013-03-10  135  
5a6bef47b41867 Jiri Olsa                2013-03-10  136  	ioctl(fd, PERF_EVENT_IOC_RESET, 0);
5a6bef47b41867 Jiri Olsa                2013-03-10  137  
5a6bef47b41867 Jiri Olsa                2013-03-10  138  	return fd;
5a6bef47b41867 Jiri Olsa                2013-03-10  139  }
5a6bef47b41867 Jiri Olsa                2013-03-10  140  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [PATCH v1 0/6] Various 32-bit and test fixes
@ 2024-08-31  7:04 Ian Rogers
  2024-08-31  7:04 ` [PATCH v1 4/6] perf parse-events: Add default_breakpoint_len helper Ian Rogers
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Rogers @ 2024-08-31  7:04 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Ian Rogers, Adrian Hunter, Kan Liang, Athira Rajeev,
	Dominique Martinet, Yang Jihong, Colin Ian King,
	Chaitanya S Prakash, Masami Hiramatsu (Google), James Clark,
	John Garry, Junhao He, David Ahern, linux-perf-users,
	linux-kernel

Running `perf test` as an i386 executable yielded a number of
failures, some of which are addressed here.

The first 2 are straightforward use strtoull issues when parsing a
64-bit quantity in 32-bit land.

The 3rd patch just avoids a fail when `perf probe` isn't compiled in
(in my case as LIBELF wasn't present).

The 4th and 5th cases fix the breakpoint length, on i386 so the
sizeof(long) used matches the kernel's sizeof(long). On aarch64 the
value is change to 4 instead of sizeof(long), ie 8, as future kernels
may make 8 an invalid argument.

The final change addresses i386 watchpoint support not supporting
8-byte values.

Ian Rogers (6):
  perf pmus: Fix name comparisons on 32-bit systems
  perf time-utils: Fix 32-bit nsec parsing
  perf test: Skip uprobe test if probe command isn't present
  perf parse-events: Add default_breakpoint_len helper
  perf parse-events: Vary default_breakpoint_len on i386 and arm64
  perf test: Make watchpoint data 32-bits on i386

 tools/perf/tests/bp_account.c                 |  4 +++-
 tools/perf/tests/bp_signal.c                  |  3 ++-
 tools/perf/tests/bp_signal_overflow.c         |  3 ++-
 tools/perf/tests/parse-events.c               |  3 ++-
 .../shell/test_uprobe_from_different_cu.sh    |  7 ++++++
 tools/perf/tests/wp.c                         |  5 ++++
 tools/perf/util/parse-events.c                | 23 ++++++++++++++++++-
 tools/perf/util/parse-events.h                |  2 ++
 tools/perf/util/pmus.c                        |  6 ++---
 tools/perf/util/time-utils.c                  |  4 ++--
 10 files changed, 50 insertions(+), 10 deletions(-)

-- 
2.46.0.469.g59c65b2a67-goog


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-09-02 10:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-01  9:10 [PATCH v1 4/6] perf parse-events: Add default_breakpoint_len helper kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2024-09-02 10:04 kernel test robot
2024-08-31  7:04 [PATCH v1 0/6] Various 32-bit and test fixes Ian Rogers
2024-08-31  7:04 ` [PATCH v1 4/6] perf parse-events: Add default_breakpoint_len helper Ian Rogers
2024-09-01 12:47   ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.