[PATCH v2 08/45] event: Allow multiple spy declarations for each event

Simon Glass sjg at chromium.org
Wed Sep 7 04:26:56 CEST 2022


At present only one spy is allowed per event. Update the naming to allow
more than one, since some need this flexibility, e.g. the EVT_FT_FIXUP
event.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

(no changes since v1)

 include/event.h       | 4 ++--
 scripts/event_dump.py | 4 +++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/include/event.h b/include/event.h
index e8f2f55c63d..ff883ca064e 100644
--- a/include/event.h
+++ b/include/event.h
@@ -143,8 +143,8 @@ static inline const char *event_spy_id(struct evspy_info *spy)
  * vbe_simple.c - so for now, make it global.
  */
 #define EVENT_SPY(_type, _func) \
-	__used ll_entry_declare(struct evspy_info, _type, evspy_info) = \
-	_ESPY_REC(_type, _func)
+	__used ll_entry_declare(struct evspy_info, _type ## _3_ ## _func, \
+		evspy_info) = _ESPY_REC(_type, _func)
 
 /**
  * event_register - register a new spy
diff --git a/scripts/event_dump.py b/scripts/event_dump.py
index 751f41b183a..6aadddf28da 100755
--- a/scripts/event_dump.py
+++ b/scripts/event_dump.py
@@ -17,8 +17,10 @@ sys.path.insert(1, os.path.join(our_path, '../tools'))
 from binman import elf
 from patman import tools
 
+# A typical symbol looks like this:
+#   _u_boot_list_2_evspy_info_2_EVT_MISC_INIT_F_3_sandbox_misc_init_f
 PREFIX = '_u_boot_list_2_evspy_info_2_'
-RE_EVTYPE = re.compile('%s(.*)' % PREFIX)
+RE_EVTYPE = re.compile('%s(.*)_3_.*' % PREFIX)
 
 def show_sym(fname, data, endian, evtype, sym):
     """Show information about an evspy entry
-- 
2.37.2.789.g6183377224-goog



More information about the U-Boot mailing list