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

Unified Diff: runtime/vm/object.cc

Issue 1300033002: Fix compiler stats (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Review comments Created 5 years, 3 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 1d5e8601d9c6e5a64b497d10e32e0d43958537a6..5c8c868839f9931a09901c0bf4e87c8aa1f7ed5d 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -6877,7 +6877,7 @@ void Function::SaveICDataMap(
set_ic_data_array(Object::empty_array());
} else {
const Array& a = Array::Handle(Array::New(count, Heap::kOld));
- INC_STAT(Isolate::Current(), total_code_size, count * sizeof(uword));
+ INC_STAT(Thread::Current(), total_code_size, count * sizeof(uword));
count = 0;
for (intptr_t i = 0; i < deopt_id_to_ic_data.length(); i++) {
if (deopt_id_to_ic_data[i] != NULL) {
@@ -8577,7 +8577,6 @@ void Script::set_tokens(const TokenStream& value) const {
void Script::Tokenize(const String& private_key) const {
Thread* thread = Thread::Current();
Zone* zone = thread->zone();
- Isolate* isolate = thread->isolate();
const TokenStream& tkns = TokenStream::Handle(zone, tokens());
if (!tkns.IsNull()) {
// Already tokenized.
@@ -8591,7 +8590,7 @@ void Script::Tokenize(const String& private_key) const {
set_tokens(TokenStream::Handle(zone,
TokenStream::New(scanner.GetStream(),
private_key)));
- INC_STAT(isolate, src_length, src.Length());
+ INC_STAT(thread, src_length, src.Length());
}
@@ -11108,15 +11107,14 @@ void PcDescriptors::CopyData(GrowableArray<uint8_t>* delta_encoded_data) {
RawPcDescriptors* PcDescriptors::New(GrowableArray<uint8_t>* data) {
ASSERT(Object::pc_descriptors_class() != Class::null());
Thread* thread = Thread::Current();
- Isolate* isolate = thread->isolate();
PcDescriptors& result = PcDescriptors::Handle(thread->zone());
{
uword size = PcDescriptors::InstanceSize(data->length());
RawObject* raw = Object::Allocate(PcDescriptors::kClassId,
size,
Heap::kOld);
- INC_STAT(isolate, total_code_size, size);
- INC_STAT(isolate, pc_desc_size, size);
+ INC_STAT(thread, total_code_size, size);
+ INC_STAT(thread, pc_desc_size, size);
NoSafepointScope no_safepoint;
result ^= raw;
result.SetLength(data->length());
@@ -11129,15 +11127,14 @@ RawPcDescriptors* PcDescriptors::New(GrowableArray<uint8_t>* data) {
RawPcDescriptors* PcDescriptors::New(intptr_t length) {
ASSERT(Object::pc_descriptors_class() != Class::null());
Thread* thread = Thread::Current();
- Isolate* isolate = thread->isolate();
PcDescriptors& result = PcDescriptors::Handle(thread->zone());
{
uword size = PcDescriptors::InstanceSize(length);
RawObject* raw = Object::Allocate(PcDescriptors::kClassId,
size,
Heap::kOld);
- INC_STAT(isolate, total_code_size, size);
- INC_STAT(isolate, pc_desc_size, size);
+ INC_STAT(thread, total_code_size, size);
+ INC_STAT(thread, pc_desc_size, size);
NoSafepointScope no_safepoint;
result ^= raw;
result.SetLength(length);
@@ -11587,8 +11584,8 @@ RawLocalVarDescriptors* LocalVarDescriptors::New(intptr_t num_variables) {
RawObject* raw = Object::Allocate(LocalVarDescriptors::kClassId,
size,
Heap::kOld);
- INC_STAT(Isolate::Current(), total_code_size, size);
- INC_STAT(Isolate::Current(), vardesc_size, size);
+ INC_STAT(Thread::Current(), total_code_size, size);
+ INC_STAT(Thread::Current(), vardesc_size, size);
NoSafepointScope no_safepoint;
result ^= raw;
result.StoreNonPointer(&result.raw_ptr()->num_entries_, num_variables);
@@ -12729,7 +12726,7 @@ void Code::set_is_alive(bool value) const {
void Code::set_stackmaps(const Array& maps) const {
ASSERT(maps.IsOld());
StorePointer(&raw_ptr()->stackmaps_, maps.raw());
- INC_STAT(Isolate::Current(),
+ INC_STAT(Thread::Current(),
total_code_size,
maps.IsNull() ? 0 : maps.Length() * sizeof(uword));
}
@@ -13033,8 +13030,8 @@ RawCode* Code::FinalizeCode(const char* name,
Code& code = Code::ZoneHandle(Code::New(pointer_offset_count));
Instructions& instrs =
Instructions::ZoneHandle(Instructions::New(assembler->CodeSize()));
- INC_STAT(isolate, total_instr_size, assembler->CodeSize());
- INC_STAT(isolate, total_code_size, assembler->CodeSize());
+ INC_STAT(Thread::Current(), total_instr_size, assembler->CodeSize());
+ INC_STAT(Thread::Current(), total_code_size, assembler->CodeSize());
// Copy the instructions into the instruction area and apply all fixups.
// Embedded pointers are still in handles at this point.
@@ -13074,7 +13071,7 @@ RawCode* Code::FinalizeCode(const char* name,
code.set_is_alive(true);
// Set object pool in Instructions object.
- INC_STAT(isolate,
+ INC_STAT(Thread::Current(),
total_code_size, object_pool.Length() * sizeof(uintptr_t));
instrs.set_object_pool(object_pool.raw());
@@ -13095,7 +13092,7 @@ RawCode* Code::FinalizeCode(const char* name,
// pushed onto the stack.
code.SetPrologueOffset(assembler->CodeSize());
}
- INC_STAT(isolate,
+ INC_STAT(Thread::Current(),
total_code_size, code.comments().comments_.Length());
return code.raw();
}
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698