1 //===-- llvm/Support/Signposts.h - Interval debug annotations ---*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
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.
15 //===----------------------------------------------------------------------===//
17 #ifndef LLVM_SUPPORT_SIGNPOSTS_H
18 #define LLVM_SUPPORT_SIGNPOSTS_H
21 class SignpostEmitterImpl
;
24 /// Manages the emission of signposts into the recording method supported by
26 class SignpostEmitter
{
27 SignpostEmitterImpl
*Impl
;
33 bool isEnabled() const;
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
);
41 } // end namespace llvm
43 #endif // ifndef LLVM_SUPPORT_SIGNPOSTS_H