blob: b90a501660d8108b5ad59a6847c95fa7adefdd24 [file] [log] [blame]
Angel Pons32859fc2020-04-02 23:48:27 +02001/* SPDX-License-Identifier: GPL-2.0-only */
2/* This file is part of the coreboot project. */
Rudolf Marek7f0e9302011-09-02 23:23:41 +02003
4#ifndef __TRACE_H
5#define __TRACE_H
6
Kyösti Mälkki7596c542019-09-13 10:51:04 +03007#if !ENV_ROMSTAGE_OR_BEFORE && CONFIG(TRACE)
Rudolf Marek7f0e9302011-09-02 23:23:41 +02008
Lee Leahy91d1e762017-03-07 14:31:19 -08009void __cyg_profile_func_enter(void *, void *)
Stefan Reinauer6a001132017-07-13 02:20:27 +020010 __attribute__((no_instrument_function));
Rudolf Marek7f0e9302011-09-02 23:23:41 +020011
Lee Leahy91d1e762017-03-07 14:31:19 -080012void __cyg_profile_func_exit(void *, void *)
Stefan Reinauer6a001132017-07-13 02:20:27 +020013 __attribute__((no_instrument_function));
Rudolf Marek7f0e9302011-09-02 23:23:41 +020014
15extern volatile int trace_dis;
16
17#define DISABLE_TRACE do { trace_dis = 1; } while (0);
18#define ENABLE_TRACE do { trace_dis = 0; } while (0);
Stefan Reinauer6a001132017-07-13 02:20:27 +020019#define DISABLE_TRACE_ON_FUNCTION __attribute__((no_instrument_function));
Rudolf Marek7f0e9302011-09-02 23:23:41 +020020
21#else /* !CONFIG_TRACE */
22
23#define DISABLE_TRACE
24#define ENABLE_TRACE
25#define DISABLE_TRACE_ON_FUNCTION
26
27#endif
Kyösti Mälkki7596c542019-09-13 10:51:04 +030028
Rudolf Marek7f0e9302011-09-02 23:23:41 +020029#endif