LLVM 20.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
19#include <memory>
20
21namespace llvm {
22class SignpostEmitterImpl;
23class StringRef;
24
25/// Manages the emission of signposts into the recording method supported by
26/// the OS.
28 std::unique_ptr<SignpostEmitterImpl> Impl;
29
30public:
33
34 bool isEnabled() const;
35
36 /// Begin a signposted interval for a given object.
37 void startInterval(const void *O, StringRef Name);
38 /// End a signposted interval for a given object.
39 void endInterval(const void *O, StringRef Name);
40};
41
42} // end namespace llvm
43
44#endif // LLVM_SUPPORT_SIGNPOSTS_H
std::string Name
Manages the emission of signposts into the recording method supported by the OS.
Definition: Signposts.h:27
void endInterval(const void *O, StringRef Name)
End a signposted interval for a given object.
Definition: Signposts.cpp:127
bool isEnabled() const
Definition: Signposts.cpp:111
void startInterval(const void *O, StringRef Name)
Begin a signposted interval for a given object.
Definition: Signposts.cpp:119
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18