|
26 | 26 | #include "perfetto/base/logging.h" |
27 | 27 | #include "perfetto/base/status.h" |
28 | 28 | #include "perfetto/ext/base/status_macros.h" |
| 29 | +#include "perfetto/ext/base/string_splitter.h" |
29 | 30 | #include "perfetto/ext/base/string_utils.h" |
30 | 31 | #include "perfetto/ext/base/utils.h" |
31 | | -#include "perfetto/ext/base/string_splitter.h" |
32 | 32 | #include "protos/perfetto/common/builtin_clock.pbzero.h" |
33 | 33 | #include "src/trace_processor/importers/art_method/art_method_event.h" |
34 | 34 | #include "src/trace_processor/importers/art_method/art_method_parser.h" |
@@ -101,7 +101,8 @@ std::string ConstructPathname(base::StringView class_name, |
101 | 101 | base::StringView pathname) { |
102 | 102 | size_t index = class_name.rfind('/'); |
103 | 103 | if (index != base::StringView::npos && pathname.EndsWith(".java")) { |
104 | | - return class_name.substr(0, index + 1).ToStdString() + pathname.ToStdString(); |
| 104 | + return class_name.substr(0, index + 1).ToStdString() + |
| 105 | + pathname.ToStdString(); |
105 | 106 | } |
106 | 107 | return pathname.ToStdString(); |
107 | 108 | } |
@@ -140,9 +141,10 @@ base::Status ArtMethodV2Tokenizer::Parse(TraceBlobView blob) { |
140 | 141 | std::string_view new_data( |
141 | 142 | reinterpret_cast<const char*>(summary_opt->data()), avail); |
142 | 143 |
|
143 | | - // To optimize the search for "*end" across streaming chunks, we only |
144 | | - // search the newly appended data. We back up by 3 characters into the |
145 | | - // old data in case the "*end" string was split exactly across two chunks. |
| 144 | + // To optimize the search for "*end" across streaming chunks, we only |
| 145 | + // search the newly appended data. We back up by 3 characters into the |
| 146 | + // old data in case the "*end" string was split exactly across two |
| 147 | + // chunks. |
146 | 148 | size_t search_start = summary_.size() >= 3 ? summary_.size() - 3 : 0; |
147 | 149 | summary_.append(new_data); |
148 | 150 |
|
@@ -293,10 +295,10 @@ void ArtMethodV2Tokenizer::ParseMethod(uint64_t id, const std::string& str) { |
293 | 295 | } |
294 | 296 | } |
295 | 297 |
|
296 | | - base::StackString<2048> slice_name("%.*s.%.*s: %.*s", |
297 | | - static_cast<int>(class_name.size()), class_name.data(), |
298 | | - static_cast<int>(method_name.size()), method_name.data(), |
299 | | - static_cast<int>(signature.size()), signature.data()); |
| 298 | + base::StackString<2048> slice_name( |
| 299 | + "%.*s.%.*s: %.*s", static_cast<int>(class_name.size()), class_name.data(), |
| 300 | + static_cast<int>(method_name.size()), method_name.data(), |
| 301 | + static_cast<int>(signature.size()), signature.data()); |
300 | 302 | StringId str_id = context_->storage->InternString(slice_name.string_view()); |
301 | 303 |
|
302 | 304 | method_map_.Insert(id, {str_id, pathname, line_number}); |
@@ -362,7 +364,8 @@ base::StatusOr<bool> ArtMethodV2Tokenizer::ParseTraceEntries() { |
362 | 364 | // In dual clock mode, the second timestamp is Thread CPU time. |
363 | 365 | // We just skip over it. |
364 | 366 | int64_t dummy = 0; |
365 | | - const uint8_t* next_ptr_dual = DecodeSignedLeb128(current_buffer_ptr, buffer_end, &dummy); |
| 367 | + const uint8_t* next_ptr_dual = |
| 368 | + DecodeSignedLeb128(current_buffer_ptr, buffer_end, &dummy); |
366 | 369 | if (next_ptr_dual == current_buffer_ptr) { |
367 | 370 | break; |
368 | 371 | } |
|
0 commit comments