aboutsummaryrefslogtreecommitdiff
path: root/compiler-rt/lib/scudo/standalone/tracing.h
blob: 6bcdab0417e9b4fb7fcee12ce470c9da55288d14 (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
46
47
48
49
50
51
52
//===-- tracing.h -----------------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef SCUDO_TRACING_H_
#define SCUDO_TRACING_H_

#include "common.h"

#if defined(SCUDO_ENABLE_TRACING)

// This file must include definitions for all of the functions below.
#include "custom_scudo_tracing.h"

#else

// Should start a trace in the given scope, and end the trace when going out of
// scope.
#define SCUDO_SCOPED_TRACE(Name)

// Create a trace name for the call to releaseToOS.
static inline const char *GetReleaseToOSTraceName(scudo::ReleaseToOS) {
  return nullptr;
}

// Create a trace name for the call to releaseToOSMaybe in the primary.
static inline const char *
GetPrimaryReleaseToOSMaybeTraceName(scudo::ReleaseToOS) {
  return nullptr;
}

static inline const char *GetPrimaryReleaseToOSTraceName(scudo::ReleaseToOS) {
  return nullptr;
}

// Create a trace name for the call to releaseToOS in the secondary.
static inline const char *GetSecondaryReleaseToOSTraceName(scudo::ReleaseToOS) {
  return nullptr;
}

// Create a trace name for the call to releaseOlderThan in the secondary.
static inline const char *GetSecondaryReleaseOlderThanTraceName() {
  return nullptr;
}

#endif

#endif // SCUDO_TRACING_H_