| 1 | //===-- tracing.h -----------------------------------------------*- C++ -*-===// |
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #ifndef SCUDO_TRACING_H_ |
| 10 | #define SCUDO_TRACING_H_ |
| 11 | |
| 12 | #include "common.h" |
| 13 | |
| 14 | #if defined(SCUDO_ENABLE_TRACING) |
| 15 | |
| 16 | // This file must include definitions for all of the functions below. |
| 17 | #include "custom_scudo_tracing.h" |
| 18 | |
| 19 | #else |
| 20 | |
| 21 | // Should start a trace in the given scope, and end the trace when going out of |
| 22 | // scope. |
| 23 | #define SCUDO_SCOPED_TRACE(Name) |
| 24 | |
| 25 | // Create a trace name for the call to releaseToOS. |
| 26 | static inline const char *GetReleaseToOSTraceName(scudo::ReleaseToOS) { |
| 27 | return nullptr; |
| 28 | } |
| 29 | |
| 30 | // Create a trace name for the call to releaseToOSMaybe in the primary. |
| 31 | static inline const char * |
| 32 | GetPrimaryReleaseToOSMaybeTraceName(scudo::ReleaseToOS) { |
| 33 | return nullptr; |
| 34 | } |
| 35 | |
| 36 | static inline const char *GetPrimaryReleaseToOSTraceName(scudo::ReleaseToOS) { |
| 37 | return nullptr; |
| 38 | } |
| 39 | |
| 40 | // Create a trace name for the call to releaseToOS in the secondary. |
| 41 | static inline const char *GetSecondaryReleaseToOSTraceName(scudo::ReleaseToOS) { |
| 42 | return nullptr; |
| 43 | } |
| 44 | |
| 45 | // Create a trace name for the call to releaseOlderThan in the secondary. |
| 46 | static inline const char *GetSecondaryReleaseOlderThanTraceName() { |
| 47 | return nullptr; |
| 48 | } |
| 49 | |
| 50 | #endif |
| 51 | |
| 52 | #endif // SCUDO_TRACING_H_ |
| 53 | |