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

Side by Side Diff: runtime/vm/object.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/dart_api_impl.cc ('k') | runtime/vm/os.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 "vm/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 13361 matching lines...) Expand 10 before | Expand all | Expand 10 after
13372 INC_STAT(Thread::Current(), total_code_size, assembler->CodeSize()); 13372 INC_STAT(Thread::Current(), total_code_size, assembler->CodeSize());
13373 13373
13374 // Copy the instructions into the instruction area and apply all fixups. 13374 // Copy the instructions into the instruction area and apply all fixups.
13375 // Embedded pointers are still in handles at this point. 13375 // Embedded pointers are still in handles at this point.
13376 MemoryRegion region(reinterpret_cast<void*>(instrs.EntryPoint()), 13376 MemoryRegion region(reinterpret_cast<void*>(instrs.EntryPoint()),
13377 instrs.size()); 13377 instrs.size());
13378 assembler->FinalizeInstructions(region); 13378 assembler->FinalizeInstructions(region);
13379 VerifiedMemory::Accept(region.start(), region.size()); 13379 VerifiedMemory::Accept(region.start(), region.size());
13380 CPU::FlushICache(instrs.EntryPoint(), instrs.size()); 13380 CPU::FlushICache(instrs.EntryPoint(), instrs.size());
13381 13381
13382 code.set_compile_timestamp(OS::GetCurrentTraceMicros()); 13382 code.set_compile_timestamp(OS::GetCurrentMonotonicMicros());
13383 CodeObservers::NotifyAll(name, 13383 CodeObservers::NotifyAll(name,
13384 instrs.EntryPoint(), 13384 instrs.EntryPoint(),
13385 assembler->prologue_offset(), 13385 assembler->prologue_offset(),
13386 instrs.size(), 13386 instrs.size(),
13387 optimized); 13387 optimized);
13388 { 13388 {
13389 NoSafepointScope no_safepoint; 13389 NoSafepointScope no_safepoint;
13390 const ZoneGrowableArray<intptr_t>& pointer_offsets = 13390 const ZoneGrowableArray<intptr_t>& pointer_offsets =
13391 assembler->GetPointerOffsets(); 13391 assembler->GetPointerOffsets();
13392 ASSERT(pointer_offsets.length() == pointer_offset_count); 13392 ASSERT(pointer_offsets.length() == pointer_offset_count);
(...skipping 8563 matching lines...) Expand 10 before | Expand all | Expand 10 after
21956 return tag_label.ToCString(); 21956 return tag_label.ToCString();
21957 } 21957 }
21958 21958
21959 21959
21960 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 21960 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
21961 Instance::PrintJSONImpl(stream, ref); 21961 Instance::PrintJSONImpl(stream, ref);
21962 } 21962 }
21963 21963
21964 21964
21965 } // namespace dart 21965 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/os.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698