mirror of
https://github.com/dart-lang/sdk
synced 2024-09-18 20:21:21 +00:00
[vm/ios/timeline] Enable cpu time reporting on ios.
This was disabled previously due to inconsistent cpu time reading reported by the ios. It seems to be working correctly now. TEST=verified flutter application cpu timeline numbers in observatory on physical ios device Change-Id: Id97a550bbbc96a32b5c2ccf59ca9805ea8cb9ec4 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200703 Commit-Queue: Alexander Aprelev <aam@google.com> Reviewed-by: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
parent
6f2eeae1a4
commit
626b48090a
|
@ -106,11 +106,6 @@ int64_t OS::GetCurrentMonotonicMicros() {
|
|||
}
|
||||
|
||||
int64_t OS::GetCurrentThreadCPUMicros() {
|
||||
#if HOST_OS_IOS
|
||||
// Thread CPU time appears unreliable on iOS, sometimes incorrectly reporting
|
||||
// no time elapsed.
|
||||
return -1;
|
||||
#else
|
||||
mach_msg_type_number_t count = THREAD_BASIC_INFO_COUNT;
|
||||
thread_basic_info_data_t info_data;
|
||||
thread_basic_info_t info = &info_data;
|
||||
|
@ -124,7 +119,6 @@ int64_t OS::GetCurrentThreadCPUMicros() {
|
|||
thread_cpu_micros += info->user_time.microseconds;
|
||||
thread_cpu_micros += info->system_time.microseconds;
|
||||
return thread_cpu_micros;
|
||||
#endif
|
||||
}
|
||||
|
||||
int64_t OS::GetCurrentThreadCPUMicrosForTimeline() {
|
||||
|
|
Loading…
Reference in a new issue