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

Unified Diff: runtime/vm/dart.cc

Issue 1844423003: Include snapshot size in the events for reading the isolate snapshots. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart.cc
diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc
index d8367fe08b60df471165372de3d5484b4ad099d2..0041d9a6dbbfb64781e26efb7f6cb59bc8cfebb6 100644
--- a/runtime/vm/dart.cc
+++ b/runtime/vm/dart.cc
@@ -180,6 +180,13 @@ const char* Dart::InitOnce(const uint8_t* vm_isolate_snapshot,
if (!error.IsNull()) {
return error.ToCString();
}
+ NOT_IN_PRODUCT(if (tds.enabled()) {
+ tds.SetNumArguments(2);
+ tds.FormatArgument(0, "snapshotSize", "%" Pd, snapshot->length());
+ tds.FormatArgument(1, "heapSize", "%" Pd64,
+ vm_isolate_->heap()->UsedInWords(Heap::kOld) *
+ kWordSize);
+ });
if (FLAG_trace_isolates) {
OS::Print("Size of vm isolate snapshot = %" Pd "\n",
snapshot->length());
@@ -444,6 +451,12 @@ RawError* Dart::InitializeIsolate(const uint8_t* snapshot_buffer, void* data) {
if (!error.IsNull()) {
return error.raw();
}
+ NOT_IN_PRODUCT(if (tds.enabled()) {
+ tds.SetNumArguments(2);
+ tds.FormatArgument(0, "snapshotSize", "%" Pd, snapshot->length());
+ tds.FormatArgument(1, "heapSize", "%" Pd64,
+ I->heap()->UsedInWords(Heap::kOld) * kWordSize);
+ });
if (FLAG_trace_isolates) {
I->heap()->PrintSizes();
MegamorphicCacheTable::PrintSizes(I);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698