sampling_provider.h 654 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef __SAMPLING_PROVIDER
  2. #define __SAMPLING_PROVIDER
  3. #include "fixed_types.h"
  4. #include "subsecond_time.h"
  5. // Emulate 'enum class InstrumentLevel' because it is
  6. // unsupported in GCC 4.4
  7. namespace InstrumentLevel {
  8. enum Level {
  9. INSTR_WITH_BBVS,
  10. INSTR,
  11. NONE,
  12. };
  13. };
  14. class SamplingProvider
  15. {
  16. public:
  17. virtual ~SamplingProvider() {}
  18. virtual void startSampling(SubsecondTime until) = 0;
  19. virtual int32_t registerSignal()
  20. {
  21. // Do not register a signal
  22. return 0;
  23. }
  24. virtual InstrumentLevel::Level requestedInstrumentation() = 0;
  25. static SamplingProvider* create();
  26. };
  27. #endif /* __SAMPLING_PROVIDER */