OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/debug/trace_event_impl.h" | 5 #include "base/debug/trace_event_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/debug/leak_annotations.h" | 10 #include "base/debug/leak_annotations.h" |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 } | 328 } |
329 | 329 |
330 if (alloc_size) { | 330 if (alloc_size) { |
331 parameter_copy_storage_ = new RefCountedString; | 331 parameter_copy_storage_ = new RefCountedString; |
332 parameter_copy_storage_->data().resize(alloc_size); | 332 parameter_copy_storage_->data().resize(alloc_size); |
333 char* ptr = string_as_array(¶meter_copy_storage_->data()); | 333 char* ptr = string_as_array(¶meter_copy_storage_->data()); |
334 const char* end = ptr + alloc_size; | 334 const char* end = ptr + alloc_size; |
335 if (copy) { | 335 if (copy) { |
336 CopyTraceEventParameter(&ptr, &name_, end); | 336 CopyTraceEventParameter(&ptr, &name_, end); |
337 for (i = 0; i < num_args; ++i) { | 337 for (i = 0; i < num_args; ++i) { |
338 if (arg_types_[i] == TRACE_VALUE_TYPE_CONVERTABLE) | |
339 continue; | |
340 CopyTraceEventParameter(&ptr, &arg_names_[i], end); | 338 CopyTraceEventParameter(&ptr, &arg_names_[i], end); |
341 } | 339 } |
342 } | 340 } |
343 for (i = 0; i < num_args; ++i) { | 341 for (i = 0; i < num_args; ++i) { |
344 if (arg_types_[i] == TRACE_VALUE_TYPE_CONVERTABLE) | 342 if (arg_types_[i] == TRACE_VALUE_TYPE_CONVERTABLE) |
345 continue; | 343 continue; |
346 if (arg_is_copy[i]) | 344 if (arg_is_copy[i]) |
347 CopyTraceEventParameter(&ptr, &arg_values_[i].as_string, end); | 345 CopyTraceEventParameter(&ptr, &arg_values_[i].as_string, end); |
348 } | 346 } |
349 DCHECK_EQ(end, ptr) << "Overrun by " << ptr - end; | 347 DCHECK_EQ(end, ptr) << "Overrun by " << ptr - end; |
(...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1421 NULL, // arg_names | 1419 NULL, // arg_names |
1422 NULL, // arg_types | 1420 NULL, // arg_types |
1423 NULL, // arg_values | 1421 NULL, // arg_values |
1424 NULL, // convertable values | 1422 NULL, // convertable values |
1425 TRACE_EVENT_FLAG_NONE); // flags | 1423 TRACE_EVENT_FLAG_NONE); // flags |
1426 } | 1424 } |
1427 } | 1425 } |
1428 | 1426 |
1429 } // namespace trace_event_internal | 1427 } // namespace trace_event_internal |
1430 | 1428 |
OLD | NEW |