Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(502)

Side by Side Diff: runtime/vm/profiler.cc

Issue 1504523002: Use a monotonic clock in the implementation of Stopwatch. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/os_win.cc ('k') | runtime/vm/timeline.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/address_sanitizer.h" 5 #include "platform/address_sanitizer.h"
6 #include "platform/memory_sanitizer.h" 6 #include "platform/memory_sanitizer.h"
7 #include "platform/utils.h" 7 #include "platform/utils.h"
8 8
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/atomic.h" 10 #include "vm/atomic.h"
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 } 813 }
814 814
815 815
816 static Sample* SetupSample(Thread* thread, 816 static Sample* SetupSample(Thread* thread,
817 SampleBuffer* sample_buffer, 817 SampleBuffer* sample_buffer,
818 ThreadId tid) { 818 ThreadId tid) {
819 ASSERT(thread != NULL); 819 ASSERT(thread != NULL);
820 Isolate* isolate = thread->isolate(); 820 Isolate* isolate = thread->isolate();
821 ASSERT(sample_buffer != NULL); 821 ASSERT(sample_buffer != NULL);
822 Sample* sample = sample_buffer->ReserveSample(); 822 Sample* sample = sample_buffer->ReserveSample();
823 sample->Init(isolate, OS::GetCurrentTraceMicros(), tid); 823 sample->Init(isolate, OS::GetCurrentMonotonicMicros(), tid);
824 uword vm_tag = thread->vm_tag(); 824 uword vm_tag = thread->vm_tag();
825 #if defined(USING_SIMULATOR) 825 #if defined(USING_SIMULATOR)
826 // When running in the simulator, the runtime entry function address 826 // When running in the simulator, the runtime entry function address
827 // (stored as the vm tag) is the address of a redirect function. 827 // (stored as the vm tag) is the address of a redirect function.
828 // Attempt to find the real runtime entry function address and use that. 828 // Attempt to find the real runtime entry function address and use that.
829 uword redirect_vm_tag = Simulator::FunctionForRedirect(vm_tag); 829 uword redirect_vm_tag = Simulator::FunctionForRedirect(vm_tag);
830 if (redirect_vm_tag != 0) { 830 if (redirect_vm_tag != 0) {
831 vm_tag = redirect_vm_tag; 831 vm_tag = redirect_vm_tag;
832 } 832 }
833 #endif 833 #endif
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
1361 } 1361 }
1362 } 1362 }
1363 1363
1364 1364
1365 ProcessedSampleBuffer::ProcessedSampleBuffer() 1365 ProcessedSampleBuffer::ProcessedSampleBuffer()
1366 : code_lookup_table_(new CodeLookupTable(Thread::Current())) { 1366 : code_lookup_table_(new CodeLookupTable(Thread::Current())) {
1367 ASSERT(code_lookup_table_ != NULL); 1367 ASSERT(code_lookup_table_ != NULL);
1368 } 1368 }
1369 1369
1370 } // namespace dart 1370 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/os_win.cc ('k') | runtime/vm/timeline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698