summaryrefslogtreecommitdiffstats
path: root/src/usr/targeting/trace.H
blob: e7ffe0365c96beea31cb19046ce702c32f0576d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

#ifndef TARG_TRACE_H
#define TARG_TRACE_H

/**
 *  @file trace.H
 *
 *  @brief Targeting related trace macros.  Callers of these macros must
 *      define TARG_NAMESPACE, TARG_CLASS, and TARG_FN as appropriate
 */

//******************************************************************************
// Includes
//******************************************************************************

// Other Components
#include <trace/interface.H>

// Give callers access to the trace buffer
namespace TARGETING
{
    extern trace_desc_t* g_trac_targeting;
}

#define TARG_LOC TARG_NAMESPACE TARG_CLASS TARG_FN ": "

#define TARG_TAG "[TARG]"
#define TARG_ENTER(args...) \
    TRACFCOMP(TARGETING::g_trac_targeting,TARG_TAG " " ENTER_MRK " " TARG_NAMESPACE \
        TARG_CLASS TARG_FN " " args)

#define TARG_EXIT(args...) \
    TRACFCOMP(TARGETING::g_trac_targeting,TARG_TAG " " EXIT_MRK " " TARG_NAMESPACE \
        TARG_CLASS TARG_FN " " args)

#define TARG_ERR(args...) \
    TRACFCOMP(TARGETING::g_trac_targeting,TARG_TAG " " ERR_MRK " " args)

#define TARG_INF(args...) \
    TRACFCOMP(TARGETING::g_trac_targeting,TARG_TAG " " INFO_MRK " " args)

#define TARG_BIN(args...) \
    TRACFBIN(TARGETING::g_trac_targeting,TARG_TAG " " args)

#endif // TARG_TRACE_H
OpenPOWER on IntegriCloud