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

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

Issue 227423005: Add TraceBuffer log to all Functions (plus small tweaks to function-view) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/raw_object.h ('k') | runtime/vm/trace_buffer.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/bigint_operations.h" 5 #include "vm/bigint_operations.h"
6 #include "vm/object.h" 6 #include "vm/object.h"
7 #include "vm/object_store.h" 7 #include "vm/object_store.h"
8 #include "vm/snapshot.h" 8 #include "vm/snapshot.h"
9 #include "vm/stub_code.h" 9 #include "vm/stub_code.h"
10 #include "vm/symbols.h" 10 #include "vm/symbols.h"
11 #include "vm/trace_buffer.h"
11 #include "vm/visitor.h" 12 #include "vm/visitor.h"
12 13
13 namespace dart { 14 namespace dart {
14 15
15 #define NEW_OBJECT(type) \ 16 #define NEW_OBJECT(type) \
16 ((kind == Snapshot::kFull) ? reader->New##type() : type::New()) 17 ((kind == Snapshot::kFull) ? reader->New##type() : type::New())
17 18
18 #define NEW_OBJECT_WITH_LEN(type, len) \ 19 #define NEW_OBJECT_WITH_LEN(type, len) \
19 ((kind == Snapshot::kFull) ? reader->New##type(len) : type::New(len)) 20 ((kind == Snapshot::kFull) ? reader->New##type(len) : type::New(len))
20 21
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 // Set all the non object fields. 695 // Set all the non object fields.
695 func.set_token_pos(reader->ReadIntptrValue()); 696 func.set_token_pos(reader->ReadIntptrValue());
696 func.set_end_token_pos(reader->ReadIntptrValue()); 697 func.set_end_token_pos(reader->ReadIntptrValue());
697 func.set_usage_counter(reader->ReadIntptrValue()); 698 func.set_usage_counter(reader->ReadIntptrValue());
698 func.set_num_fixed_parameters(reader->ReadIntptrValue()); 699 func.set_num_fixed_parameters(reader->ReadIntptrValue());
699 func.set_num_optional_parameters(reader->ReadIntptrValue()); 700 func.set_num_optional_parameters(reader->ReadIntptrValue());
700 func.set_deoptimization_counter(reader->ReadIntptrValue()); 701 func.set_deoptimization_counter(reader->ReadIntptrValue());
701 func.set_kind_tag(reader->Read<uint16_t>()); 702 func.set_kind_tag(reader->Read<uint16_t>());
702 func.set_optimized_instruction_count(reader->Read<uint16_t>()); 703 func.set_optimized_instruction_count(reader->Read<uint16_t>());
703 func.set_optimized_call_site_count(reader->Read<uint16_t>()); 704 func.set_optimized_call_site_count(reader->Read<uint16_t>());
705 func.set_log(new TraceBuffer());
704 706
705 // Set all the object fields. 707 // Set all the object fields.
706 // TODO(5411462): Need to assert No GC can happen here, even though 708 // TODO(5411462): Need to assert No GC can happen here, even though
707 // allocations may happen. 709 // allocations may happen.
708 intptr_t num_flds = (func.raw()->to() - func.raw()->from()); 710 intptr_t num_flds = (func.raw()->to() - func.raw()->from());
709 for (intptr_t i = 0; i <= num_flds; i++) { 711 for (intptr_t i = 0; i <= num_flds; i++) {
710 *(func.raw()->from() + i) = reader->ReadObjectRef(); 712 *(func.raw()->from() + i) = reader->ReadObjectRef();
711 } 713 }
712 714
713 // TODO(zra): Remove when arm64 is ready. 715 // TODO(zra): Remove when arm64 is ready.
(...skipping 1996 matching lines...) Expand 10 before | Expand all | Expand 10 after
2710 // We do not allow objects with native fields in an isolate message. 2712 // We do not allow objects with native fields in an isolate message.
2711 writer->SetWriteException(Exceptions::kArgument, 2713 writer->SetWriteException(Exceptions::kArgument,
2712 "Illegal argument in isolate message" 2714 "Illegal argument in isolate message"
2713 " : (object is a UserTag)"); 2715 " : (object is a UserTag)");
2714 } else { 2716 } else {
2715 UNREACHABLE(); 2717 UNREACHABLE();
2716 } 2718 }
2717 } 2719 }
2718 2720
2719 } // namespace dart 2721 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/raw_object.h ('k') | runtime/vm/trace_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698