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

Side by Side Diff: runtime/vm/snapshot.h

Issue 1970363002: Add timeline events for compiling static initializers and writing full snapshots. Remove timeline e… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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
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 #ifndef VM_SNAPSHOT_H_ 5 #ifndef VM_SNAPSHOT_H_
6 #define VM_SNAPSHOT_H_ 6 #define VM_SNAPSHOT_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/bitfield.h" 10 #include "vm/bitfield.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 return static_cast<Kind>(ReadUnaligned(&unaligned_kind_)); 180 return static_cast<Kind>(ReadUnaligned(&unaligned_kind_));
181 } 181 }
182 182
183 static bool IsFull(Kind kind) { 183 static bool IsFull(Kind kind) {
184 return (kind == kCore) || (kind == kAppWithJIT) || (kind == kAppNoJIT); 184 return (kind == kCore) || (kind == kAppWithJIT) || (kind == kAppNoJIT);
185 } 185 }
186 static bool IncludesCode(Kind kind) { 186 static bool IncludesCode(Kind kind) {
187 return (kind == kAppWithJIT) || (kind == kAppNoJIT); 187 return (kind == kAppWithJIT) || (kind == kAppNoJIT);
188 } 188 }
189 189
190 bool IsMessageSnapshot() const { return kind() == kMessage; }
191 bool IsScriptSnapshot() const { return kind() == kScript; }
192 bool IsCoreSnapshot() const { return kind() == kCore; }
193 bool IsAppSnapshotWithJIT() const { return kind() == kAppWithJIT; }
194 bool IsAppSnapshotNoJIT() const { return kind() == kAppNoJIT; }
195 uint8_t* Addr() { return reinterpret_cast<uint8_t*>(this); } 190 uint8_t* Addr() { return reinterpret_cast<uint8_t*>(this); }
196 191
197 static intptr_t length_offset() { 192 static intptr_t length_offset() {
198 return OFFSET_OF(Snapshot, unaligned_length_); 193 return OFFSET_OF(Snapshot, unaligned_length_);
199 } 194 }
200 static intptr_t kind_offset() { 195 static intptr_t kind_offset() {
201 return OFFSET_OF(Snapshot, unaligned_kind_); 196 return OFFSET_OF(Snapshot, unaligned_kind_);
202 } 197 }
203 198
204 private: 199 private:
(...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after
1215 private: 1210 private:
1216 SnapshotWriter* writer_; 1211 SnapshotWriter* writer_;
1217 bool as_references_; 1212 bool as_references_;
1218 1213
1219 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor); 1214 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor);
1220 }; 1215 };
1221 1216
1222 } // namespace dart 1217 } // namespace dart
1223 1218
1224 #endif // VM_SNAPSHOT_H_ 1219 #endif // VM_SNAPSHOT_H_
OLDNEW
« runtime/vm/compiler.cc ('K') | « runtime/vm/parser.cc ('k') | runtime/vm/snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698