This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 13f071baa8 note: fix sched_note_begin address errr
13f071baa8 is described below
commit 13f071baa87e2df9ad9918980c4240c522febdc6
Author: yinshengkai <[email protected]>
AuthorDate: Mon Jun 19 18:04:07 2023 +0800
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 <[email protected]>
---
include/nuttx/sched_note.h | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/include/nuttx/sched_note.h b/include/nuttx/sched_note.h
index 4810aa4b3a..14576dfaf4 100644
--- a/include/nuttx/sched_note.h
+++ b/include/nuttx/sched_note.h
@@ -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) \