CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SimpleProfiler.h
Go to the documentation of this file.
1 #ifndef FWCore_Services_SimpleProfiler_h
2 #define FWCore_Services_SimpleProfiler_h
3 
4 #ifndef _POSIX_C_SOURCE
5 #define _POSIX_C_SOURCE 199309
6 #endif
7 
8 #include <vector>
9 #include <string>
10 #include "boost/thread/mutex.hpp"
11 
13 {
14  public:
15  typedef std::vector<void*> VoidVec;
17 
18  static SimpleProfiler* instance();
19 
20  void start();
21  void stop();
22 
23  void* stackTop() { return stacktop_; }
24  void** tempStack() { return &tmp_stack_[0]; }
25  size_type tempStackSize() { return tmp_stack_.size(); }
26 
27  void commitFrame(void** first, void** last);
28 
29  private:
32 
33  void complete();
34  void doWrite();
35 
40  void** high_water_;
41  void** curr_;
42  std::string filename_;
43  int fd_;
44  bool installed_;
45  bool running_;
46  pthread_t owner_;
47  void* stacktop_;
48 };
49 
50 #endif
pthread_t owner_
VoidVec frame_data_
static boost::mutex mutex
Definition: LHEProxy.cc:11
void commitFrame(void **first, void **last)
static SimpleProfiler * inst_
static boost::mutex lock_
VoidVec tmp_stack_
std::string filename_
uint16_t size_type
void ** high_water_
bool first
Definition: L1TdeRCT.cc:94
static SimpleProfiler * instance()
std::vector< void * > VoidVec
void ** tempStack()
VoidVec::size_type size_type
size_type tempStackSize()
void * stackTop()