Lines Matching refs:spin_info
61 SpinInfo spin_info; member
260 SpinInfo& spin_info = thread.spin_info; in ProcessSampleRecord() local
261 spin_info.runtime_in_check_period += runtime; in ProcessSampleRecord()
262 spin_info.samples_in_check_period.push(SampleInfo(record.Timestamp(), runtime)); in ProcessSampleRecord()
265 if (thread.spin_info.samples_in_check_period.size() == 1u) { in ProcessSampleRecord()
268 uint64_t start_timestamp = spin_info.samples_in_check_period.front().timestamp; in ProcessSampleRecord()
273 if (thread.spin_info.runtime_in_check_period > time_period_in_ns * spinloop_check_rate_) { in ProcessSampleRecord()
275 thread.spin_info.spinloop_count++; in ProcessSampleRecord()
277 1.0, static_cast<double>(thread.spin_info.runtime_in_check_period) / time_period_in_ns); in ProcessSampleRecord()
278 if (rate > thread.spin_info.max_rate) { in ProcessSampleRecord()
279 thread.spin_info.max_rate = rate; in ProcessSampleRecord()
280 thread.spin_info.max_rate_start_timestamp = start_timestamp; in ProcessSampleRecord()
281 thread.spin_info.max_rate_end_timestamp = record.Timestamp(); in ProcessSampleRecord()
284 std::swap(thread.spin_info.samples_in_check_period, empty_q); in ProcessSampleRecord()
285 thread.spin_info.runtime_in_check_period = 0; in ProcessSampleRecord()
287 thread.spin_info.runtime_in_check_period -= in ProcessSampleRecord()
288 spin_info.samples_in_check_period.front().runtime_in_ns; in ProcessSampleRecord()
289 thread.spin_info.samples_in_check_period.pop(); in ProcessSampleRecord()
401 if (thread->spin_info.spinloop_count != 0u) { in ReportProcessInfo()
402 double percentage = 100.0 * thread->spin_info.max_rate; in ReportProcessInfo()
404 thread->spin_info.max_rate_end_timestamp - thread->spin_info.max_rate_start_timestamp; in ReportProcessInfo()
405 double running_time_in_ns = duration_in_ns * thread->spin_info.max_rate; in ReportProcessInfo()
409 thread->spin_info.spinloop_count, process.name.c_str(), process.process_id, in ReportProcessInfo()
411 thread->spin_info.max_rate_start_timestamp / 1e9, in ReportProcessInfo()
412 thread->spin_info.max_rate_end_timestamp / 1e9, running_time_in_ns / 1e6, in ReportProcessInfo()