]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
event: Allow multiple spy declarations for each event
authorSimon Glass <sjg@chromium.org>
Wed, 7 Sep 2022 02:26:56 +0000 (20:26 -0600)
committerTom Rini <trini@konsulko.com>
Thu, 29 Sep 2022 20:07:57 +0000 (16:07 -0400)
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@chromium.org>
include/event.h
scripts/event_dump.py

index e8f2f55c63da8176f584b91be0e4e30c1d3380f4..ff883ca064ee9a2b84a12366c4ea21543639c926 100644 (file)
@@ -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
index 751f41b183a5e71dfa11bd3b025c2671c9df1498..6aadddf28dabe37767f328557abbbf68f1a90238 100755 (executable)
@@ -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