#include <time.h>
#endif
+namespace __sanitizer {
+ // provided by sanitizer_common_libcdep.cc
+ extern SleepInterval last_sleep_int;
+}
+
namespace __asan {
class HeapProfile; // Pointer to the global object
return res;
}
+ void HPUpdateSleepInt(HPProfileType hp_prof_type) {
+ switch(hp_prof_type) {
+ case HPProfileType::NONE:
+ break;
+ case HPProfileType::SHORT:
+ case HPProfileType::FULL:
+ __sanitizer::last_sleep_int.ends_with_event = true;
+ }
+ }
+
void HPPrintHeader(HPProfileType hp_prof_type) {
switch (hp_prof_type) {
case HPProfileType::NONE:
__asan::HeapProfile::HPProfileType hp_prof_type =
__asan::heap_profile->NeededProfileType();
+ __asan::heap_profile->HPUpdateSleepInt(hp_prof_type);
__asan::heap_profile->HPPrintHeader(hp_prof_type);
if (hp_prof_type == __asan::HeapProfile::HPProfileType::FULL) {
__sanitizer::StopTheWorld(__asan::MemoryProfileCB, (void*)top_percent);