All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] perf trace: Augment enum arguments with BTF
@ 2024-06-19  8:20 Howard Chu
  2024-06-19  8:20 ` [PATCH v2 1/5] perf trace: Fix iteration of syscall ids in syscalltbl->entries Howard Chu
                   ` (5 more replies)
  0 siblings, 6 replies; 31+ messages in thread
From: Howard Chu @ 2024-06-19  8:20 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Jiri Olsa, Namhyung Kim, Ian Rogers, Adrian Hunter, Kan Liang,
	linux-kernel, linux-perf-users

changes in v2:
- Move inline landlock_add_rule c code to tests/workloads
- Rename 'enum_aug_prereq' to 'check_vmlinux'

Augment enum arguments in perf trace, including syscall arguments and
non-syscall tracepoint arguments. The augmentation is implemented using
BTF.

This patch series also includes a bug fix by Arnaldo Carvalho de Melo 
<acme@redhat.com>, which makes more syscalls to be traceable by perf trace.

Test is included.

Howard Chu (5):
  perf trace: Fix iteration of syscall ids in syscalltbl->entries
  perf trace: Augment enum syscall arguments with BTF
  perf trace: Augment enum tracepoint arguments with BTF
  perf trace: Filter enum arguments with enum names
  perf trace: Add test for enum augmentation

 tools/perf/builtin-trace.c                    | 214 ++++++++++++++++--
 tools/perf/tests/builtin-test.c               |   1 +
 tools/perf/tests/shell/trace_btf_enum.sh      |  57 +++++
 tools/perf/tests/tests.h                      |   1 +
 tools/perf/tests/workloads/Build              |   1 +
 .../perf/tests/workloads/landlock_add_rule.c  |  32 +++
 tools/perf/util/syscalltbl.c                  |   7 +
 tools/perf/util/syscalltbl.h                  |   1 +
 8 files changed, 289 insertions(+), 25 deletions(-)
 create mode 100755 tools/perf/tests/shell/trace_btf_enum.sh
 create mode 100644 tools/perf/tests/workloads/landlock_add_rule.c

-- 
2.45.2


^ permalink raw reply	[flat|nested] 31+ messages in thread
* Re: [PATCH v2 5/5] perf trace: Add test for enum augmentation
@ 2024-06-24 19:20 kernel test robot
  0 siblings, 0 replies; 31+ messages in thread
From: kernel test robot @ 2024-06-24 19:20 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: <20240619082042.4173621-6-howardchu95@gmail.com>
References: <20240619082042.4173621-6-howardchu95@gmail.com>
TO: Howard Chu <howardchu95@gmail.com>
TO: Arnaldo Carvalho de Melo <acme@kernel.org>
CC: Jiri Olsa <jolsa@kernel.org>
CC: Namhyung Kim <namhyung@kernel.org>
CC: Ian Rogers <irogers@google.com>
CC: Adrian Hunter <adrian.hunter@intel.com>
CC: Kan Liang <kan.liang@linux.intel.com>
CC: linux-kernel@vger.kernel.org
CC: linux-perf-users@vger.kernel.org

Hi Howard,

kernel test robot noticed the following build errors:

[auto build test ERROR on perf-tools-next/perf-tools-next]
[also build test ERROR on next-20240621]
[cannot apply to tip/perf/core perf-tools/perf-tools acme/perf/core linus/master v6.10-rc5]
[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/Howard-Chu/perf-trace-Fix-iteration-of-syscall-ids-in-syscalltbl-entries/20240619-162417
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/20240619082042.4173621-6-howardchu95%40gmail.com
patch subject: [PATCH v2 5/5] perf trace: Add test for enum augmentation
:::::: branch date: 5 days ago
:::::: commit date: 5 days ago
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240625/202406250302.E4WaX9Ud-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/202406250302.E4WaX9Ud-lkp@intel.com/

All errors (new ones prefixed by >>):

   Makefile.config:663: No libunwind found. Please install libunwind-dev[el] >= 1.1 and/or set LIBUNWIND_DIR
     PERF_VERSION = 6.10.rc1.gf6ac54426465
>> tests/workloads/landlock_add_rule.c:20:24: error: use of undeclared identifier 'LANDLOCK_ACCESS_NET_CONNECT_TCP'
      20 |             .allowed_access = LANDLOCK_ACCESS_NET_CONNECT_TCP,
         |                               ^
>> tests/workloads/landlock_add_rule.c:18:32: error: variable has incomplete type 'struct landlock_net_port_attr'
      18 |         struct landlock_net_port_attr net_port_attr = {
         |                                       ^
   tests/workloads/landlock_add_rule.c:18:9: note: forward declaration of 'struct landlock_net_port_attr'
      18 |         struct landlock_net_port_attr net_port_attr = {
         |                ^
>> tests/workloads/landlock_add_rule.c:26:38: error: use of undeclared identifier 'LANDLOCK_RULE_NET_PORT'
      26 |         syscall(__NR_landlock_add_rule, fd, LANDLOCK_RULE_NET_PORT,
         |                                             ^
   3 errors generated.
   make[8]: *** [tools/build/Makefile.build:105: tools/perf/tests/workloads/landlock_add_rule.o] Error 1
   make[8]: *** Waiting for unfinished jobs....
   make[7]: *** [tools/build/Makefile.build:158: workloads] Error 2
   make[7]: *** Waiting for unfinished jobs....
   make[6]: *** [tools/build/Makefile.build:158: tests] Error 2
   make[6]: *** Waiting for unfinished jobs....
   make[5]: *** [Makefile.perf:727: tools/perf/perf-in.o] Error 2
   make[5]: *** Waiting for unfinished jobs....
   make[4]: *** [Makefile.perf:264: sub-make] Error 2
   make[3]: *** [Makefile:70: all] Error 2


vim +/LANDLOCK_ACCESS_NET_CONNECT_TCP +20 tools/perf/tests/workloads/landlock_add_rule.c

f6ac54426465a5 Howard Chu 2024-06-19   7  
f6ac54426465a5 Howard Chu 2024-06-19   8  static int landlock_add_rule(int argc __maybe_unused, const char **argv __maybe_unused)
f6ac54426465a5 Howard Chu 2024-06-19   9  {
f6ac54426465a5 Howard Chu 2024-06-19  10  	int fd = 11;
f6ac54426465a5 Howard Chu 2024-06-19  11  	int flags = 45;
f6ac54426465a5 Howard Chu 2024-06-19  12  
f6ac54426465a5 Howard Chu 2024-06-19  13  	struct landlock_path_beneath_attr path_beneath_attr = {
f6ac54426465a5 Howard Chu 2024-06-19  14  	    .allowed_access = LANDLOCK_ACCESS_FS_READ_FILE,
f6ac54426465a5 Howard Chu 2024-06-19  15  	    .parent_fd = 14,
f6ac54426465a5 Howard Chu 2024-06-19  16  	};
f6ac54426465a5 Howard Chu 2024-06-19  17  
f6ac54426465a5 Howard Chu 2024-06-19  18  	struct landlock_net_port_attr net_port_attr = {
f6ac54426465a5 Howard Chu 2024-06-19  19  	    .port = 19,
f6ac54426465a5 Howard Chu 2024-06-19 @20  	    .allowed_access = LANDLOCK_ACCESS_NET_CONNECT_TCP,
f6ac54426465a5 Howard Chu 2024-06-19  21  	};
f6ac54426465a5 Howard Chu 2024-06-19  22  
f6ac54426465a5 Howard Chu 2024-06-19  23  	syscall(__NR_landlock_add_rule, fd, LANDLOCK_RULE_PATH_BENEATH,
f6ac54426465a5 Howard Chu 2024-06-19  24  		&path_beneath_attr, flags);
f6ac54426465a5 Howard Chu 2024-06-19  25  
f6ac54426465a5 Howard Chu 2024-06-19  26  	syscall(__NR_landlock_add_rule, fd, LANDLOCK_RULE_NET_PORT,
f6ac54426465a5 Howard Chu 2024-06-19  27  		&net_port_attr, flags);
f6ac54426465a5 Howard Chu 2024-06-19  28  
f6ac54426465a5 Howard Chu 2024-06-19  29  	return 0;
f6ac54426465a5 Howard Chu 2024-06-19  30  }
f6ac54426465a5 Howard Chu 2024-06-19  31  

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

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

end of thread, other threads:[~2024-06-28  6:37 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-19  8:20 [PATCH v2 0/5] perf trace: Augment enum arguments with BTF Howard Chu
2024-06-19  8:20 ` [PATCH v2 1/5] perf trace: Fix iteration of syscall ids in syscalltbl->entries Howard Chu
2024-06-19  8:20 ` [PATCH v2 2/5] perf trace: Augment enum syscall arguments with BTF Howard Chu
2024-06-19 13:44   ` Arnaldo Carvalho de Melo
2024-06-19 17:59     ` Howard Chu
2024-06-20 16:34       ` Howard Chu
2024-06-20 19:16         ` Howard Chu
2024-06-21 13:40           ` Arnaldo Carvalho de Melo
2024-06-21 16:18             ` Howard Chu
2024-06-22 18:28               ` Arnaldo Carvalho de Melo
2024-06-23 11:34                 ` Howard Chu
2024-06-21 18:03       ` Arnaldo Carvalho de Melo
2024-06-19  8:20 ` [PATCH v2 3/5] perf trace: Augment enum tracepoint " Howard Chu
2024-06-19 13:46   ` Arnaldo Carvalho de Melo
2024-06-19 18:00     ` Howard Chu
2024-06-19  8:20 ` [PATCH v2 4/5] perf trace: Filter enum arguments with enum names Howard Chu
2024-06-19 13:48   ` Arnaldo Carvalho de Melo
2024-06-19 18:18     ` Howard Chu
2024-06-19  8:20 ` [PATCH v2 5/5] perf trace: Add test for enum augmentation Howard Chu
2024-06-19 13:51   ` Arnaldo Carvalho de Melo
2024-06-19 14:36     ` Namhyung Kim
2024-06-19 18:26       ` Howard Chu
2024-06-21 16:07   ` Namhyung Kim
2024-06-21 16:43     ` Howard Chu
2024-06-21 17:15       ` Namhyung Kim
2024-06-28  6:37   ` kernel test robot
2024-06-19 13:55 ` [PATCH v2 0/5] perf trace: Augment enum arguments with BTF Arnaldo Carvalho de Melo
2024-06-19 18:19   ` Namhyung Kim
2024-06-19 18:25     ` Howard Chu
2024-06-20 19:12       ` Howard Chu
  -- strict thread matches above, loose matches on Subject: below --
2024-06-24 19:20 [PATCH v2 5/5] perf trace: Add test for enum augmentation 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.