| 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");
|
|
|