1/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2/*
3 *     Copyright 2016 Couchbase, Inc
4 *
5 *   Licensed under the Apache License, Version 2.0 (the "License");
6 *   you may not use this file except in compliance with the License.
7 *   You may obtain a copy of the License at
8 *
9 *       http://www.apache.org/licenses/LICENSE-2.0
10 *
11 *   Unless required by applicable law or agreed to in writing, software
12 *   distributed under the License is distributed on an "AS IS" BASIS,
13 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 *   See the License for the specific language governing permissions and
15 *   limitations under the License.
16 */
17/** \file
18 * This file is internal to the inner workings of
19 * Phosphor and is not intended for public consumption.
20 */
21
22#pragma once
23
24#include <array>
25
26#include "relaxed_atomic.h"
27
28namespace phosphor {
29    /**
30     * Enumeration of the possible types of a TraceArgument
31     */
32    enum class TraceArgumentType : char {
33        is_bool,
34        is_uint,
35        is_int,
36        is_double,
37        is_pointer,
38        is_string,
39        is_istring,
40        is_none
41    };
42
43    /**
44     * Enumeration of the possible types of a TraceEvent
45     */
46    enum class TraceEventType : char {
47        AsyncStart,
48        AsyncEnd,
49        SyncStart,
50        SyncEnd,
51        Instant,
52        GlobalInstant,
53        Complete
54    };
55
56    /**
57     * The tracepoint_info struct holds data that
58     * is static for a given tracepoint.
59     */
60    struct tracepoint_info {
61        const char* category;
62        const char* name;
63        TraceEventType type;
64        std::array<const char*, 2> argument_names;
65        std::array<TraceArgumentType, 2> argument_types;
66    };
67}
68