LLVM  10.0.0svn
Signposts.h
Go to the documentation of this file.
1 //===-- llvm/Support/Signposts.h - Interval debug annotations ---*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 /// \file Some OS's provide profilers that allow applications to provide custom
11 /// annotations to the profiler. For example, on Xcode 10 and later 'signposts'
12 /// can be emitted by the application and these will be rendered to the Points
13 /// of Interest track on the instruments timeline.
14 //
15 //===----------------------------------------------------------------------===//
16 
17 #ifndef LLVM_SUPPORT_SIGNPOSTS_H
18 #define LLVM_SUPPORT_SIGNPOSTS_H
19 
20 namespace llvm {
21 class SignpostEmitterImpl;
22 class Timer;
23 
24 /// Manages the emission of signposts into the recording method supported by
25 /// the OS.
27  SignpostEmitterImpl *Impl;
28 
29 public:
32 
33  bool isEnabled() const;
34 
35  /// Begin a signposted interval for the given timer.
36  void startTimerInterval(Timer *T);
37  /// End a signposted interval for the given timer.
38  void endTimerInterval(Timer *T);
39 };
40 
41 } // end namespace llvm
42 
43 #endif // ifndef LLVM_SUPPORT_SIGNPOSTS_H
This class represents lattice values for constants.
Definition: AllocatorList.h:23
This class is used to track the amount of time spent between invocations of its startTimer()/stopTime...
Definition: Timer.h:76
Manages the emission of signposts into the recording method supported by the OS.
Definition: Signposts.h:26
void startTimerInterval(Timer *T)
Begin a signposted interval for the given timer.
Definition: Signposts.cpp:107
bool isEnabled() const
Definition: Signposts.cpp:99
void endTimerInterval(Timer *T)
End a signposted interval for the given timer.
Definition: Signposts.cpp:115