OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/trace_event/trace_event_argument.h" | 5 #include "base/trace_event/trace_event_argument.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 // TODO(primiano): this could be smarter, skip the ToBaseValue encoding and | 458 // TODO(primiano): this could be smarter, skip the ToBaseValue encoding and |
459 // produce the JSON on its own. This will require refactoring JSONWriter | 459 // produce the JSON on its own. This will require refactoring JSONWriter |
460 // to decouple the base::Value traversal from the JSON writing bits | 460 // to decouple the base::Value traversal from the JSON writing bits |
461 std::string tmp; | 461 std::string tmp; |
462 JSONWriter::Write(*ToBaseValue(), &tmp); | 462 JSONWriter::Write(*ToBaseValue(), &tmp); |
463 *out += tmp; | 463 *out += tmp; |
464 } | 464 } |
465 | 465 |
466 void TracedValue::EstimateTraceMemoryOverhead( | 466 void TracedValue::EstimateTraceMemoryOverhead( |
467 TraceEventMemoryOverhead* overhead) { | 467 TraceEventMemoryOverhead* overhead) { |
468 overhead->Add("TracedValue", | 468 overhead->Add(TraceEventMemoryOverhead::kTracedValue, |
469 /* allocated size */ | 469 /* allocated size */ |
470 pickle_.GetTotalAllocatedSize(), | 470 pickle_.GetTotalAllocatedSize(), |
471 /* resident size */ | 471 /* resident size */ |
472 pickle_.size()); | 472 pickle_.size()); |
473 } | 473 } |
474 | 474 |
475 } // namespace trace_event | 475 } // namespace trace_event |
476 } // namespace base | 476 } // namespace base |
OLD | NEW |