note: fix sched_note_begin address errr

SCHED_NOTE_IP address calculation error in some cases, refer to _THIS_IP_ implementation in linux
https://elixir.bootlin.com/linux/latest/source/include/linux/instruction_pointer.h#L6

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
yinshengkai
2023-08-09 15:11:33 +08:00
committed by Xiang Xiao
parent 9914999715
commit 13f071baa8
+1 -5
View File
@@ -120,12 +120,8 @@
#endif
#ifdef CONFIG_SCHED_INSTRUMENTATION_DUMP
# define SCHED_NOTE_LABEL__(x, y) x ## y
# define SCHED_NOTE_LABEL_(x, y) SCHED_NOTE_LABEL__(x, y)
# define SCHED_NOTE_LABEL \
SCHED_NOTE_LABEL_(sched_note_here, __LINE__)
# define SCHED_NOTE_IP \
({SCHED_NOTE_LABEL: (uintptr_t)&&SCHED_NOTE_LABEL;})
({ __label__ __here; __here: (unsigned long)&&__here; })
# define sched_note_string(tag, buf) \
sched_note_string_ip(tag, SCHED_NOTE_IP, buf)
# define sched_note_dump(tag, event, buf, len) \