linux/tools
Namhyung Kim a5a00497b9 perf annotate-data: Handle RSP if it's not the FB register
In some cases, the stack pointer on x86 (rsp = reg7) is used to point
variables on stack but it's not the frame base register.  Then it
should handle the register like normal registers (IOW not to access
the other stack variables using offset calculation) but it should not
assume it would have a pointer.

Before:
  -----------------------------------------------------------
  find data type for 0x7c(reg7) at tcp_getsockopt+0xb62
  CU for net/ipv4/tcp.c (die:0x7b5f516)
  frame base: cfa=0 fbreg=6
  no pointer or no type
  check variable "zc" failed (die: 0x7b9580a)
   variable location: base=reg7, offset=0x40
   type='struct tcp_zerocopy_receive' size=0x40 (die:0x7b947f4)

After:
  -----------------------------------------------------------
  find data type for 0x7c(reg7) at tcp_getsockopt+0xb62
  CU for net/ipv4/tcp.c (die:0x7b5f516)
  frame base: cfa=0 fbreg=6
  found "zc" in scope=3/3 (die: 0x7b957fc) type_offset=0x3c
   variable location: base=reg7, offset=0x40
   type='struct tcp_zerocopy_receive' size=0x40 (die:0x7b947f4)

Note that the type-offset was properly calculated to 0x3c as the
variable starts at 0x40.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20240412183310.2518474-5-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2024-04-16 10:46:55 -03:00
..
accounting
arch perf beauty: Move prctl.h files (uapi/linux and x86's) copy out of the directory used to build perf 2024-03-21 10:41:27 -03:00
bootconfig
bpf libbpf: Recognize __arena global variables. 2024-03-11 15:43:35 -07:00
build perf: build: introduce the libcapstone 2024-02-20 18:06:25 -08:00
certs
cgroup
counter
crypto crypto: ccp - Update return values for some unit tests 2024-02-24 08:41:20 +08:00
debugging
firewire
firmware
gpio
hv
iio
include perf beauty: Move uapi/linux/vhost.h copy out of the directory used to build perf 2024-03-21 20:44:35 -03:00
kvm/kvm_stat
laptop
leds
lib tools subcmd: Add check_if_command_finished() 2024-04-08 17:43:20 -03:00
memory-model
mm tools/mm: add thpmaps script to dump THP usage info 2024-02-22 10:24:38 -08:00
net/ynl netlink: specs: support generating code for genl socket priv 2024-03-11 15:15:42 -07:00
objtool - Kuan-Wei Chiu has developed the well-named series "lib min_heap: Min 2024-03-14 18:03:09 -07:00
pci
pcmcia
perf perf annotate-data: Handle RSP if it's not the FB register 2024-04-16 10:46:55 -03:00
power linux-cpupower-6.9-rc1 2024-03-07 21:02:51 +01:00
rcu
scripts treewide: remove meaningless assignments in Makefiles 2024-02-23 14:19:07 -08:00
spi
testing ktest updates for v6.9: 2024-03-18 15:27:03 -07:00
thermal
time
tracing tools/rtla: Add -U/--user-load option to timerlat 2024-03-20 05:39:06 +01:00
usb
verification tools/verification: Use tools/build makefiles on rv 2024-03-20 05:39:06 +01:00
virtio tools: virtio: introduce vhost_net_test 2024-03-05 11:38:14 +01:00
wmi
workqueue workqueue: Implement BH workqueues to eventually replace tasklets 2024-02-04 11:28:06 -10:00
Makefile