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

Unified Diff: runtime/vm/class_table.cc

Issue 2255613002: Converted Observatory heap-profile element (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Better sorting tests Created 4 years, 4 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/observatory/tests/service/get_allocation_profile_rpc_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/class_table.cc
diff --git a/runtime/vm/class_table.cc b/runtime/vm/class_table.cc
index 334bca9c2f974122eb5a16edc1d995f4d463f744..e8d8ae847460c974f40e58d2209cd7c194c93e5e 100644
--- a/runtime/vm/class_table.cc
+++ b/runtime/vm/class_table.cc
@@ -521,14 +521,18 @@ void ClassTable::AllocationProfilePrintJSON(JSONStream* stream) {
ASSERT(heap != NULL);
JSONObject obj(stream);
obj.AddProperty("type", "AllocationProfile");
- obj.AddPropertyF(
- "dateLastAccumulatorReset",
- "%" Pd64 "",
- isolate->last_allocationprofile_accumulator_reset_timestamp());
- obj.AddPropertyF(
- "dateLastServiceGC",
- "%" Pd64 "",
- isolate->last_allocationprofile_gc_timestamp());
+ if (isolate->last_allocationprofile_accumulator_reset_timestamp() != 0) {
+ obj.AddPropertyF(
+ "dateLastAccumulatorReset",
+ "%" Pd64 "",
+ isolate->last_allocationprofile_accumulator_reset_timestamp());
+ }
+ if (isolate->last_allocationprofile_gc_timestamp() != 0) {
+ obj.AddPropertyF(
+ "dateLastServiceGC",
+ "%" Pd64 "",
+ isolate->last_allocationprofile_gc_timestamp());
+ }
{
JSONObject heaps(&obj, "heaps");
« no previous file with comments | « runtime/observatory/tests/service/get_allocation_profile_rpc_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698