diff options
author | Simon Glass <sjg@chromium.org> | 2022-12-22 02:08:15 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2023-01-18 21:49:12 +0300 |
commit | 33c60a38bb95c9954704857fe5edb29b749b9b18 (patch) | |
tree | 9cd3850586f99633e33f6f14f6488130ad0a04ee /lib | |
parent | 5b958dea5c678dbdb2aeb6ac3c0c8cc8dfea065c (diff) | |
download | u-boot-33c60a38bb95c9954704857fe5edb29b749b9b18.tar.xz |
trace: Use notrace for short
The attribute syntax is quite verbose. Use the macro provided for this
purpose.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efi_loader/efi_freestanding.c | 4 | ||||
-rw-r--r-- | lib/trace.c | 26 |
2 files changed, 13 insertions, 17 deletions
diff --git a/lib/efi_loader/efi_freestanding.c b/lib/efi_loader/efi_freestanding.c index c85df026f0..4b65fc64dd 100644 --- a/lib/efi_loader/efi_freestanding.c +++ b/lib/efi_loader/efi_freestanding.c @@ -100,7 +100,7 @@ void *memset(void *s, int c, size_t n) * func_ptr: Pointer to function being entered * caller: Pointer to function which called this function */ -void __attribute__((no_instrument_function)) +void notrace __cyg_profile_func_enter(void *func_ptr, void *caller) { } @@ -116,7 +116,7 @@ __cyg_profile_func_enter(void *func_ptr, void *caller) * func_ptr: Pointer to function being entered * caller: Pointer to function which called this function */ -void __attribute__((no_instrument_function)) +void notrace __cyg_profile_func_exit(void *func_ptr, void *caller) { } diff --git a/lib/trace.c b/lib/trace.c index 54f0bf2f57..880d90ebd5 100644 --- a/lib/trace.c +++ b/lib/trace.c @@ -68,7 +68,7 @@ static volatile gd_t *trace_gd; /** * trace_save_gd() - save the value of the gd register */ -static void __attribute__((no_instrument_function)) trace_save_gd(void) +static void notrace trace_save_gd(void) { trace_gd = gd; } @@ -81,7 +81,7 @@ static void __attribute__((no_instrument_function)) trace_save_gd(void) * have to set the gd register to the U-Boot value when entering a trace * point and set it back to the application value when exiting the trace point. */ -static void __attribute__((no_instrument_function)) trace_swap_gd(void) +static void notrace trace_swap_gd(void) { volatile gd_t *temp_gd = trace_gd; @@ -91,18 +91,17 @@ static void __attribute__((no_instrument_function)) trace_swap_gd(void) #else -static void __attribute__((no_instrument_function)) trace_save_gd(void) +static void notrace trace_save_gd(void) { } -static void __attribute__((no_instrument_function)) trace_swap_gd(void) +static void notrace trace_swap_gd(void) { } #endif -static void __attribute__((no_instrument_function)) add_ftrace(void *func_ptr, - void *caller, ulong flags) +static void notrace add_ftrace(void *func_ptr, void *caller, ulong flags) { if (hdr->depth > hdr->depth_limit) { hdr->ftrace_too_deep_count++; @@ -118,7 +117,7 @@ static void __attribute__((no_instrument_function)) add_ftrace(void *func_ptr, hdr->ftrace_count++; } -static void __attribute__((no_instrument_function)) add_textbase(void) +static void notrace add_textbase(void) { if (hdr->ftrace_count < hdr->ftrace_size) { struct trace_call *rec = &hdr->ftrace[hdr->ftrace_count]; @@ -139,8 +138,7 @@ static void __attribute__((no_instrument_function)) add_textbase(void) * @func_ptr: pointer to function being entered * @caller: pointer to function which called this function */ -void __attribute__((no_instrument_function)) __cyg_profile_func_enter( - void *func_ptr, void *caller) +void notrace __cyg_profile_func_enter(void *func_ptr, void *caller) { if (trace_enabled) { int func; @@ -167,8 +165,7 @@ void __attribute__((no_instrument_function)) __cyg_profile_func_enter( * @func_ptr: pointer to function being entered * @caller: pointer to function which called this function */ -void __attribute__((no_instrument_function)) __cyg_profile_func_exit( - void *func_ptr, void *caller) +void notrace __cyg_profile_func_exit(void *func_ptr, void *caller) { if (trace_enabled) { trace_swap_gd(); @@ -327,7 +324,7 @@ void trace_print_stats(void) puts(" calls not traced due to depth\n"); } -void __attribute__((no_instrument_function)) trace_set_enabled(int enabled) +void notrace trace_set_enabled(int enabled) { trace_enabled = enabled != 0; } @@ -339,8 +336,7 @@ void __attribute__((no_instrument_function)) trace_set_enabled(int enabled) * @buff_size: Size of trace buffer * Return: 0 if ok */ -int __attribute__((no_instrument_function)) trace_init(void *buff, - size_t buff_size) +int notrace trace_init(void *buff, size_t buff_size) { ulong func_count = gd->mon_len / FUNC_SITE_SIZE; size_t needed; @@ -404,7 +400,7 @@ int __attribute__((no_instrument_function)) trace_init(void *buff, * * Return: 0 if ok, -ENOSPC if not enough memory is available */ -int __attribute__((no_instrument_function)) trace_early_init(void) +int notrace trace_early_init(void) { ulong func_count = gd->mon_len / FUNC_SITE_SIZE; size_t buff_size = CONFIG_TRACE_EARLY_SIZE; |