LLVM 22.0.0git
Signposts.h
Go to the documentation of this file.
1//===-- llvm/Support/Signposts.h - Interval debug annotations ---*- 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/// \file Some OS's provide profilers that allow applications to provide custom
10/// annotations to the profiler. For example, on Xcode 10 and later 'signposts'
11/// can be emitted by the application and these will be rendered to the Points
12/// of Interest track on the instruments timeline.
13//
14//===----------------------------------------------------------------------===//
15
16#ifndef LLVM_SUPPORT_SIGNPOSTS_H
17#define LLVM_SUPPORT_SIGNPOSTS_H
18
20#include <memory>
21
22namespace llvm {
23class SignpostEmitterImpl;
24class StringRef;
25
26/// Manages the emission of signposts into the recording method supported by
27/// the OS.
29 std::unique_ptr<SignpostEmitterImpl> Impl;
30
31public:
34
35 LLVM_ABI bool isEnabled() const;
36
37 /// Begin a signposted interval for a given object.
38 LLVM_ABI void startInterval(const void *O, StringRef Name);
39 /// End a signposted interval for a given object.
40 LLVM_ABI void endInterval(const void *O, StringRef Name);
41};
42
43} // end namespace llvm
44
45#endif // LLVM_SUPPORT_SIGNPOSTS_H
#define LLVM_ABI
Definition: Compiler.h:213
std::string Name
Manages the emission of signposts into the recording method supported by the OS.
Definition: Signposts.h:28
LLVM_ABI SignpostEmitter()
Definition: Signposts.cpp:103
LLVM_ABI void endInterval(const void *O, StringRef Name)
End a signposted interval for a given object.
Definition: Signposts.cpp:127
LLVM_ABI bool isEnabled() const
Definition: Signposts.cpp:111
LLVM_ABI void startInterval(const void *O, StringRef Name)
Begin a signposted interval for a given object.
Definition: Signposts.cpp:119
LLVM_ABI ~SignpostEmitter()
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:55
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18