blob: ece1b2110c06f53f9b613e181e7a81387939e08e [file] [log] [blame]
Angel Pons32859fc2020-04-02 23:48:27 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Rudolf Marek7f0e9302011-09-02 23:23:41 +02002
3#ifndef __TRACE_H
4#define __TRACE_H
5
Kyösti Mälkki7596c542019-09-13 10:51:04 +03006#if !ENV_ROMSTAGE_OR_BEFORE && CONFIG(TRACE)
Rudolf Marek7f0e9302011-09-02 23:23:41 +02007
Lee Leahy91d1e762017-03-07 14:31:19 -08008void __cyg_profile_func_enter(void *, void *)
Stefan Reinauer6a001132017-07-13 02:20:27 +02009 __attribute__((no_instrument_function));
Rudolf Marek7f0e9302011-09-02 23:23:41 +020010
Lee Leahy91d1e762017-03-07 14:31:19 -080011void __cyg_profile_func_exit(void *, void *)
Stefan Reinauer6a001132017-07-13 02:20:27 +020012 __attribute__((no_instrument_function));
Rudolf Marek7f0e9302011-09-02 23:23:41 +020013
14extern volatile int trace_dis;
15
16#define DISABLE_TRACE do { trace_dis = 1; } while (0);
17#define ENABLE_TRACE do { trace_dis = 0; } while (0);
Stefan Reinauer6a001132017-07-13 02:20:27 +020018#define DISABLE_TRACE_ON_FUNCTION __attribute__((no_instrument_function));
Rudolf Marek7f0e9302011-09-02 23:23:41 +020019
20#else /* !CONFIG_TRACE */
21
22#define DISABLE_TRACE
23#define ENABLE_TRACE
24#define DISABLE_TRACE_ON_FUNCTION
25
26#endif
Kyösti Mälkki7596c542019-09-13 10:51:04 +030027
Rudolf Marek7f0e9302011-09-02 23:23:41 +020028#endif