Ian Rogers
1470eaa574
perf syscalltbl: Use lookup table containing multiple architectures
Switch to use the lookup table containing all architectures rather
than tables matching the perf binary.
This fixes perf trace when executed on a 32-bit i386 binary on an
x86-64 machine. Note in the following the system call names of the
32-bit i386 binary as seen by an x86-64 perf.
Before:
```
? ( ): a.out/447296 ... [continued]: munmap()) = 0
0.024 ( 0.001 ms): a.out/447296 recvfrom(ubuf: 0x2, size: 4160585708, flags: DONTROUTE|CTRUNC|TRUNC|DONTWAIT|EOR|WAITALL|FIN|SYN|CONFIRM|RST|ERRQUEUE|NOSIGNAL|WAITFORONE|BATCH|SOCK_DEVMEM|ZEROCOPY|FASTOPEN|CMSG_CLOEXEC|0x91f80000, addr: 0xe30, addr_len: 0xffce438c) = 1475198976
0.042 ( 0.003 ms): a.out/447296 lgetxattr(name: "", value: 0x3, size: 34) = 4160344064
0.054 ( 0.003 ms): a.out/447296 dup2(oldfd: -134422744, newfd: 4) = -1 ENOENT (No such file or directory)
0.060 ( 0.009 ms): a.out/447296 preadv(fd: 4294967196, vec: (struct iovec){.iov_base = (void *)0x2e646c2f6374652f,.iov_len = (__kernel_size_t)7307199665335594867,}, vlen: 557056, pos_h: 4160585708) = 3
0.074 ( 0.004 ms): a.out/447296 lgetxattr(name: "", value: 0x1, size: 2) = 4160237568
0.080 ( 0.001 ms): a.out/447296 lstat(filename: "", statbuf: 0x193f6) = 0
0.089 ( 0.007 ms): a.out/447296 preadv(fd: 4294967196, vec: (struct iovec){.iov_base = (void *)0x3833692f62696c2f,.iov_len = (__kernel_size_t)3276497845987585334,}, vlen: 557056, pos_h: 4160585708) = 3
0.097 ( 0.002 ms): a.out/447296 close(fd: 3</proc/447296/status>) = 512
0.103 ( 0.002 ms): a.out/447296 lgetxattr(name: "", value: 0x1, size: 2050) = 4157935616
0.107 ( 0.007 ms): a.out/447296 lgetxattr(pathname: "", name: "", value: 0x5, size: 2066) = 4158078976
0.116 ( 0.003 ms): a.out/447296 lgetxattr(pathname: "", name: "", value: 0x1, size: 2066) = 4159639552
0.121 ( 0.003 ms): a.out/447296 lgetxattr(pathname: "", name: "", value: 0x3, size: 2066) = 4160184320
0.129 ( 0.002 ms): a.out/447296 lgetxattr(pathname: "", name: "", value: 0x3, size: 50) = 4160196608
0.138 ( 0.001 ms): a.out/447296 lstat(filename: "") = 0
0.145 ( 0.002 ms): a.out/447296 mq_timedreceive(mqdes: 4291706800, u_msg_ptr: 0xf7f9ea48, msg_len: 134616640, u_msg_prio: 0xf7fd7fec, u_abs_timeout: (struct __kernel_timespec){.tv_sec = (__kernel_time64_t)-578174027777317696,.tv_nsec = (long long int)4160349376,}) = 0
0.148 ( 0.001 ms): a.out/447296 mkdirat(dfd: -134617816, pathname: " ��� ���▒���▒���", mode: IFREG|ISUID|IRUSR|IWGRP|0xf7fd0000) = 447296
0.150 ( 0.001 ms): a.out/447296 process_vm_writev(pid: -134617812, lvec: (struct iovec){.iov_base = (void *)0xf7f9e9c8f7f9e4c0,.iov_len = (__kernel_size_t)4160349376,}, liovcnt: 4160588048, rvec: (struct iovec){}, riovcnt: 4160585708, flags: 4291707352) = 0
0.197 ( 0.004 ms): a.out/447296 capget(header: 4160184320, dataptr: 8192) = 0
0.202 ( 0.002 ms): a.out/447296 capget(header: 1448669184, dataptr: 4096) = 0
0.208 ( 0.002 ms): a.out/447296 capget(header: 4160577536, dataptr: 8192) = 0
0.220 ( 0.001 ms): a.out/447296 getxattr(pathname: "", name: "c������", value: 0xf7f77e34, size: 1) = 0
0.228 ( 0.005 ms): a.out/447296 fchmod(fd: -134729728, mode: IRUGO|IWUGO|IFREG|IFIFO|ISVTX|IXUSR|0x10000) = 0
0.240 ( 0.009 ms): a.out/447296 preadv(fd: 4294967196, vec: 0x5658e008, pos_h: 4160192052) = 3
0.250 ( 0.008 ms): a.out/447296 close(fd: 3</proc/447296/status>) = 1436
0.260 ( 0.018 ms): a.out/447296 stat(filename: "", statbuf: 0xffce32ac) = 1436
0.288 (1000.213 ms): a.out/447296 readlinkat(buf: 0xffce31d4, bufsiz: 4291703244) = 0
```
After:
```
? ( ): a.out/442930 ... [continued]: execve()) = 0
0.023 ( 0.002 ms): a.out/442930 brk() = 0x57760000
0.052 ( 0.003 ms): a.out/442930 access(filename: 0xf7f5af28, mode: R) = -1 ENOENT (No such file or directory)
0.059 ( 0.009 ms): a.out/442930 openat(dfd: CWD, filename: "/etc/ld.so.cache", flags: RDONLY|CLOEXEC|LARGEFILE) = 3
0.078 ( 0.001 ms): a.out/442930 close(fd: 3</proc/442930/status>) = 0
0.087 ( 0.007 ms): a.out/442930 openat(dfd: CWD, filename: "/lib/i386-linux-", flags: RDONLY|CLOEXEC|LARGEFILE) = 3
0.095 ( 0.002 ms): a.out/442930 read(fd: 3</proc/442930/status>, buf: 0xffbdbb70, count: 512) = 512
0.135 ( 0.001 ms): a.out/442930 close(fd: 3</proc/442930/status>) = 0
0.148 ( 0.001 ms): a.out/442930 set_tid_address(tidptr: 0xf7f2b528) = 442930 (a.out)
0.150 ( 0.001 ms): a.out/442930 set_robust_list(head: 0xf7f2b52c, len: 12) =
0.196 ( 0.004 ms): a.out/442930 mprotect(start: 0xf7f03000, len: 8192, prot: READ) = 0
0.202 ( 0.002 ms): a.out/442930 mprotect(start: 0x5658e000, len: 4096, prot: READ) = 0
0.207 ( 0.002 ms): a.out/442930 mprotect(start: 0xf7f63000, len: 8192, prot: READ) = 0
0.230 ( 0.005 ms): a.out/442930 munmap(addr: 0xf7f10000, len: 103414) = 0
0.244 ( 0.010 ms): a.out/442930 openat(dfd: CWD, filename: 0x5658d008) = 3
0.255 ( 0.007 ms): a.out/442930 read(fd: 3</proc/442930/status>, buf: 0xffbdb67c, count: 4096) = 1436
0.264 ( 0.018 ms): a.out/442930 write(fd: 1</dev/pts/4>, buf: , count: 1436) = 1436
0.292 (1000.173 ms): a.out/442930 clock_nanosleep(rqtp: { .tv_sec: 17866546940376776704, .tv_nsec: 4159878336 }, rmtp: 0xffbdb59c) = 0
1000.478 ( ): a.out/442930 exit_group() = ?
```
Signed-off-by: Ian Rogers <irogers@google.com>
Reviewed-by: Howard Chu <howardchu95@gmail.com>
Reviewed-by: Charlie Jenkins <charlie@rivosinc.com>
Reviewed-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Arnaldo Carvalho de Melo <acme@kernel.org>
Link: https://lore.kernel.org/r/20250319050741.269828-10-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2025-03-20 22:58:13 -07:00
..
2025-03-05 09:13:20 -08:00
2025-03-18 16:55:30 -07:00
2024-09-24 11:46:46 -07:00
2024-06-26 11:07:42 -07:00
2024-11-09 08:39:14 -08:00
2024-12-18 16:24:33 -03:00
2023-08-16 08:48:06 -03:00
2024-06-26 11:07:42 -07:00
2025-02-12 20:06:11 -08:00
2025-02-17 22:00:50 -08:00
2025-02-18 14:04:32 -08:00
2022-12-05 09:29:06 -03:00
2019-11-28 08:08:38 -03:00
2023-08-23 08:41:52 -03:00
2025-03-13 00:19:51 -07:00
2025-03-13 00:19:51 -07:00
2025-03-13 00:19:51 -07:00
2025-03-13 00:19:51 -07:00
2025-02-12 20:06:11 -08:00
2022-10-27 16:37:26 -03:00
2025-03-05 09:13:20 -08:00
2024-10-03 15:23:09 -07:00
2025-02-12 20:06:11 -08:00
2024-12-18 16:24:32 -03:00
2024-08-14 10:20:40 -03:00
2024-08-14 10:20:40 -03:00
2023-11-09 13:49:33 -03:00
2024-09-03 11:43:16 -03:00
2024-11-01 23:31:08 -07:00
2023-01-10 10:51:39 -03:00
2025-03-13 00:18:10 -07:00
2024-12-18 16:24:33 -03:00
2024-12-18 16:24:33 -03:00
2025-02-28 10:09:02 -08:00
2024-08-21 11:39:51 -03:00
2022-10-27 16:37:26 -03:00
2025-01-14 14:57:19 -03:00
2024-12-10 16:59:32 -03:00
2024-01-03 17:54:54 -03:00
2024-11-22 13:36:00 -08:00
2024-08-01 12:11:33 -03:00
2024-08-28 18:21:49 -03:00
2024-08-28 18:21:49 -03:00
2022-06-28 12:05:25 -03:00
2021-11-01 18:16:40 -03:00
2023-10-25 13:38:50 -07:00
2025-03-05 09:13:19 -08:00
2024-12-09 17:52:41 -03:00
2024-12-09 17:52:41 -03:00
2025-02-12 20:06:11 -08:00
2024-12-02 12:36:20 -08:00
2024-08-12 18:07:10 -03:00
2023-05-28 10:24:14 -03:00
2019-08-29 17:38:32 -03:00
2023-02-16 09:33:45 -03:00
2021-03-23 17:13:43 -03:00
2025-03-07 14:06:56 -08:00
2024-09-10 17:32:47 -03:00
2024-10-28 13:04:52 -03:00
2024-08-20 17:53:12 -03:00
2024-12-18 16:24:33 -03:00
2023-09-12 17:32:00 -03:00
2020-08-06 09:33:57 -03:00
2020-08-06 09:33:57 -03:00
2023-03-14 08:29:46 -03:00
2025-03-10 11:31:24 -07:00
2024-10-10 23:38:33 -07:00
2025-03-10 11:31:24 -07:00
2025-01-31 14:45:19 -08:00
2025-03-10 14:37:02 -07:00
2025-03-10 11:31:24 -07:00
2025-03-10 11:31:24 -07:00
2019-10-15 12:05:18 -03:00
2019-09-25 09:51:49 -03:00
2022-10-27 16:37:25 -03:00
2022-10-27 16:37:25 -03:00
2025-03-19 16:56:33 -07:00
2024-05-07 18:06:44 -03:00
2023-12-12 14:55:13 -03:00
2023-02-19 08:03:12 -03:00
2023-04-04 09:39:56 -03:00
2025-02-12 20:06:11 -08:00
2024-08-29 15:55:24 -03:00
2024-12-09 17:52:42 -03:00
2024-12-09 17:52:42 -03:00
2021-04-29 10:30:58 -03:00
2025-03-10 11:31:24 -07:00
2025-03-10 11:31:24 -07:00
2024-05-06 15:28:49 -03:00
2021-05-25 10:07:17 -03:00
2025-03-11 18:55:37 -07:00
2024-03-21 10:41:28 -03:00
2025-02-12 19:44:16 -08:00
2024-10-18 10:17:40 -07:00
2023-03-20 12:49:58 -03:00
2023-03-14 08:29:46 -03:00
2021-03-23 17:13:43 -03:00
2021-03-30 12:45:59 -03:00
2021-02-17 15:15:06 -03:00
2019-09-20 09:19:20 -03:00
2024-08-01 18:54:19 -03:00
2024-08-01 18:54:19 -03:00
2025-03-06 16:52:24 -08:00
2024-11-09 08:39:13 -08:00
2024-12-18 16:24:32 -03:00
2021-08-11 09:35:44 -03:00
2025-03-20 22:58:02 -07:00
2025-03-20 22:58:02 -07:00
2024-08-19 14:52:13 -03:00
2024-08-19 14:52:13 -03:00
2024-09-03 12:22:01 -03:00
2024-09-03 12:22:01 -03:00
2024-10-18 10:17:40 -07:00
2024-10-18 10:17:40 -07:00
2024-11-09 08:39:13 -08:00
2024-11-09 08:39:13 -08:00
2024-11-09 08:39:13 -08:00
2024-11-09 08:39:14 -08:00
2025-02-27 08:47:25 -08:00
2024-12-18 16:24:33 -03:00
2025-02-18 14:04:32 -08:00
2025-03-13 13:19:27 -07:00
2025-02-18 14:04:32 -08:00
2025-03-19 16:56:33 -07:00
2025-03-02 09:47:24 -08:00
2024-12-18 16:24:32 -03:00
2024-12-09 17:52:42 -03:00
2023-05-12 15:21:49 -03:00
2025-03-11 18:55:37 -07:00
2025-02-04 21:29:13 -08:00
2020-11-30 09:48:07 -03:00
2023-01-23 10:00:47 -03:00
2025-02-10 11:46:30 -08:00
2023-08-17 14:12:14 -03:00
2024-02-13 13:47:08 -08:00
2023-09-12 17:46:50 -03:00
2019-11-28 08:08:38 -03:00
2019-11-28 08:08:38 -03:00
2025-02-26 13:48:02 -08:00
2023-06-20 22:18:58 -07:00
2024-10-18 10:17:40 -07:00
2024-10-18 10:17:40 -07:00
2025-01-10 10:59:42 -03:00
2021-08-30 10:06:16 -03:00
2022-11-09 20:45:14 -08:00
2024-10-14 12:04:31 -07:00
2025-02-24 15:46:33 -08:00
2024-11-16 16:40:30 -03:00
2024-03-21 13:54:40 -03:00
2024-08-12 18:05:14 -03:00
2022-10-15 10:13:16 -03:00
2025-03-07 14:07:07 -08:00
2025-02-18 14:04:32 -08:00
2025-02-24 15:46:33 -08:00
2025-02-04 17:22:40 -08:00
2025-02-12 20:06:11 -08:00
2025-02-12 20:06:11 -08:00
2023-10-17 12:40:50 -07:00
2025-03-19 16:56:56 -07:00
2024-08-13 15:24:48 -03:00
2021-02-08 17:02:00 -03:00
2021-02-08 17:02:00 -03:00
2022-11-24 09:40:37 -03:00
2022-11-24 09:40:37 -03:00
2024-08-19 14:51:46 -03:00
2025-02-12 20:06:11 -08:00
2020-05-28 10:03:27 -03:00
2024-12-18 16:24:32 -03:00
2024-12-18 16:24:32 -03:00
2024-12-18 16:24:33 -03:00
2021-03-23 17:13:43 -03:00
2025-01-08 17:38:32 -03:00
2024-09-03 10:39:20 -03:00
2024-12-18 16:24:33 -03:00
2025-02-28 10:09:02 -08:00
2025-03-10 14:37:02 -07:00
2025-03-06 16:00:25 -08:00
2025-02-17 22:00:50 -08:00
2024-08-01 18:55:55 -03:00
2024-08-01 18:55:55 -03:00
2024-09-10 17:32:47 -03:00
2024-09-10 17:32:47 -03:00
2025-03-05 23:03:43 -08:00
2024-02-12 12:35:41 -08:00
2020-11-04 09:42:40 -03:00
2019-08-31 19:10:40 -03:00
2025-03-19 16:56:33 -07:00
2025-03-10 14:26:45 -07:00
2024-08-01 18:55:55 -03:00
2024-08-01 18:55:55 -03:00
2019-09-20 09:19:22 -03:00
2024-10-10 23:40:32 -07:00
2024-04-18 22:22:51 -03:00
2025-03-19 16:56:33 -07:00
2025-02-10 11:46:02 -08:00
2022-10-04 08:55:20 -03:00
2025-03-17 22:07:18 -07:00
2025-01-08 17:31:06 -03:00
2025-01-08 17:31:06 -03:00
2022-06-28 11:45:45 -03:00
2023-04-06 21:41:00 -03:00
2022-07-20 11:07:30 -03:00
2023-11-09 13:47:50 -03:00
2025-03-11 19:00:50 -07:00
2024-12-18 16:24:32 -03:00
2025-02-20 22:35:10 -08:00
2024-10-10 23:40:32 -07:00
2024-02-15 13:48:36 -08:00
2020-08-14 09:15:47 -03:00
2021-08-24 15:01:31 -03:00
2024-12-23 13:53:08 -03:00
2024-12-23 13:53:08 -03:00
2023-12-12 14:55:13 -03:00
2021-06-01 10:32:00 -03:00
2025-03-11 19:00:50 -07:00
2024-02-15 13:48:36 -08:00
2024-02-15 13:48:36 -08:00
2019-09-20 09:19:20 -03:00
2023-01-02 12:34:06 -03:00
2024-11-13 16:27:35 -03:00
2022-11-24 10:04:52 -03:00
2025-03-19 16:56:33 -07:00
2025-02-26 16:23:47 -08:00
2023-04-06 21:40:28 -03:00
2023-09-12 17:47:00 -03:00
2025-03-19 17:00:16 -07:00
2025-03-10 11:31:24 -07:00
2020-10-01 12:10:56 -03:00
2024-07-31 16:12:59 -03:00
2024-07-31 16:12:59 -03:00
2024-10-10 23:40:32 -07:00
2024-10-10 23:40:32 -07:00
2025-01-14 14:57:19 -03:00
2024-12-10 15:41:10 -03:00
2024-11-16 17:07:31 -03:00
2024-11-16 17:07:31 -03:00
2025-02-26 14:25:14 -08:00
2025-02-26 14:25:14 -08:00
2025-03-10 11:31:24 -07:00
2025-03-10 11:31:24 -07:00
2025-03-18 16:08:45 -07:00
2024-03-21 10:41:28 -03:00
2023-03-13 14:52:14 -03:00
2023-10-25 10:02:11 -07:00
2023-10-25 10:02:11 -07:00
2023-10-25 13:35:35 -07:00
2023-10-25 13:35:35 -07:00
2023-11-15 12:51:53 -05:00
2025-02-12 20:06:11 -08:00
2024-10-17 12:44:26 -07:00
2021-09-10 18:15:21 -03:00
2021-09-10 18:15:21 -03:00
2025-02-12 20:06:11 -08:00
2025-02-18 14:04:32 -08:00
2025-02-17 22:00:50 -08:00
2025-02-17 22:00:50 -08:00
2024-08-22 17:26:50 -03:00
2023-06-20 17:03:43 -07:00
2023-06-20 17:03:43 -07:00
2022-04-01 16:19:35 -03:00
2023-02-19 08:03:12 -03:00
2023-02-19 08:03:12 -03:00
2025-03-20 09:17:56 -07:00
2025-02-18 14:04:32 -08:00
2019-10-11 10:57:00 -03:00
2019-10-11 10:57:00 -03:00
2021-06-08 09:36:36 -03:00
2024-09-03 10:15:16 -03:00
2023-06-14 18:19:06 -03:00
2025-03-03 12:48:17 -08:00
2025-01-29 14:06:25 -08:00
2025-02-04 21:29:05 -08:00
2024-12-18 16:24:32 -03:00
2019-08-31 19:10:19 -03:00
2021-03-23 17:13:43 -03:00
2024-12-23 13:53:08 -03:00
2024-12-23 13:53:08 -03:00
2023-04-06 21:41:00 -03:00
2021-03-23 17:13:43 -03:00
2024-11-14 16:56:32 -03:00
2024-12-12 15:53:36 -03:00
2024-12-09 17:52:41 -03:00
2019-08-29 17:38:31 -03:00
2025-02-18 14:04:32 -08:00
2024-05-06 15:28:49 -03:00
2025-03-20 22:58:02 -07:00
2024-05-06 15:28:49 -03:00
2025-03-10 14:37:06 -07:00
2024-05-07 18:06:44 -03:00
2023-02-01 21:51:51 -03:00
2025-02-24 15:46:33 -08:00
2024-09-10 17:32:47 -03:00
2025-03-20 22:58:13 -07:00
2025-03-20 22:57:57 -07:00
2021-01-20 14:25:28 -03:00
2024-11-01 23:31:08 -07:00
2024-02-22 09:11:03 -08:00
2022-11-16 12:17:15 -03:00
2023-08-14 11:46:51 +02:00
2021-03-25 08:59:10 -03:00
2025-03-20 22:58:05 -07:00
2025-03-20 22:58:05 -07:00
2024-10-14 12:04:31 -07:00
2024-03-03 22:52:13 -08:00
2024-09-03 11:21:55 -03:00
2019-10-15 08:36:22 -03:00
2025-03-19 17:00:16 -07:00
2025-02-26 16:23:47 -08:00
2024-08-12 18:13:58 -03:00
2024-08-12 18:13:58 -03:00
2023-12-18 21:34:39 -03:00
2023-12-07 16:47:55 -03:00
2023-02-19 08:07:24 -03:00
2023-02-19 08:07:24 -03:00
2024-09-10 09:52:13 -03:00
2023-10-12 10:01:57 -07:00
2024-12-09 17:52:42 -03:00
2024-11-08 22:42:57 -08:00
2025-03-13 13:19:27 -07:00
2024-11-08 22:42:57 -08:00
2025-03-05 09:13:19 -08:00
2024-05-09 18:46:43 -03:00
2024-05-09 18:46:43 -03:00
2019-08-29 17:38:32 -03:00
2024-11-13 16:27:35 -03:00
2024-10-10 23:40:32 -07:00
2025-03-13 00:30:08 -07:00
2021-03-15 11:36:54 -03:00
2025-02-12 20:06:11 -08:00
2022-04-09 12:34:29 -03:00
2025-03-17 22:07:18 -07:00
2024-05-06 15:28:49 -03:00
2023-08-16 08:48:06 -03:00
2023-04-10 19:20:53 -03:00
2024-11-16 16:30:39 -03:00
2024-11-16 16:30:39 -03:00
2024-12-23 13:53:08 -03:00
2024-12-23 13:53:08 -03:00
2024-09-27 15:38:52 -03:00
2019-09-20 09:19:20 -03:00
2023-11-28 14:25:06 -03:00