Primiano Tucci | 4f9b6d7 | 2017-12-05 20:59:16 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2017 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
Primiano Tucci | 3cbb10a | 2018-04-10 17:52:40 +0100 | [diff] [blame] | 17 | #include "src/ftrace_reader/cpu_reader.h" |
Primiano Tucci | 4f9b6d7 | 2017-12-05 20:59:16 +0000 | [diff] [blame] | 18 | |
Anna Zappone | 5a407c1 | 2018-02-22 14:21:38 +0000 | [diff] [blame] | 19 | #include <sys/stat.h> |
| 20 | |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 21 | #include "gmock/gmock.h" |
Primiano Tucci | 4f9b6d7 | 2017-12-05 20:59:16 +0000 | [diff] [blame] | 22 | #include "gtest/gtest.h" |
Florian Mayer | ba3eeae | 2018-03-12 11:48:21 +0000 | [diff] [blame] | 23 | #include "src/ftrace_reader/event_info.h" |
Primiano Tucci | 3cbb10a | 2018-04-10 17:52:40 +0100 | [diff] [blame] | 24 | #include "src/ftrace_reader/proto_translation_table.h" |
Primiano Tucci | 4f9b6d7 | 2017-12-05 20:59:16 +0000 | [diff] [blame] | 25 | |
Primiano Tucci | 808d6df | 2018-03-31 13:24:18 +0100 | [diff] [blame] | 26 | #include "perfetto/base/build_config.h" |
Anna Zappone | bba1941 | 2018-01-24 16:38:18 +0000 | [diff] [blame] | 27 | #include "perfetto/base/utils.h" |
Primiano Tucci | 4f9b6d7 | 2017-12-05 20:59:16 +0000 | [diff] [blame] | 28 | #include "perfetto/protozero/scattered_stream_writer.h" |
Oystein Eftevaag | 72daa6c | 2018-04-13 10:34:06 -0700 | [diff] [blame^] | 29 | #include "src/protozero/scattered_stream_delegate_for_testing.h" |
Primiano Tucci | 4f9b6d7 | 2017-12-05 20:59:16 +0000 | [diff] [blame] | 30 | |
Primiano Tucci | 20b760c | 2018-01-19 12:36:12 +0000 | [diff] [blame] | 31 | #include "perfetto/trace/ftrace/ftrace_event.pb.h" |
| 32 | #include "perfetto/trace/ftrace/ftrace_event.pbzero.h" |
| 33 | #include "perfetto/trace/ftrace/ftrace_event_bundle.pb.h" |
| 34 | #include "perfetto/trace/ftrace/ftrace_event_bundle.pbzero.h" |
Hector Dearman | bc8368e | 2018-01-25 17:34:11 +0000 | [diff] [blame] | 35 | #include "src/ftrace_reader/test/cpu_reader_support.h" |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 36 | #include "src/ftrace_reader/test/test_messages.pb.h" |
| 37 | #include "src/ftrace_reader/test/test_messages.pbzero.h" |
| 38 | |
Anna Zappone | 5a407c1 | 2018-02-22 14:21:38 +0000 | [diff] [blame] | 39 | using testing::Each; |
| 40 | using testing::ElementsAre; |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 41 | using testing::ElementsAreArray; |
Hector Dearman | 8fd632b | 2018-02-27 13:42:50 +0000 | [diff] [blame] | 42 | using testing::EndsWith; |
Anna Zappone | 5a407c1 | 2018-02-22 14:21:38 +0000 | [diff] [blame] | 43 | using testing::Eq; |
| 44 | using testing::Pair; |
Hector Dearman | 8fd632b | 2018-02-27 13:42:50 +0000 | [diff] [blame] | 45 | using testing::StartsWith; |
Hector Dearman | f19e7c5 | 2018-03-06 10:25:01 +0000 | [diff] [blame] | 46 | using testing::Contains; |
Primiano Tucci | 4f9b6d7 | 2017-12-05 20:59:16 +0000 | [diff] [blame] | 47 | |
| 48 | namespace perfetto { |
| 49 | |
| 50 | namespace { |
| 51 | |
Florian Mayer | dbd0878 | 2018-03-21 14:07:51 +0000 | [diff] [blame] | 52 | constexpr uint64_t kNanoInSecond = 1000 * 1000 * 1000; |
| 53 | constexpr uint64_t kNanoInMicro = 1000; |
Hector Dearman | 71372ea | 2017-12-06 17:13:37 +0000 | [diff] [blame] | 54 | |
| 55 | ::testing::AssertionResult WithinOneMicrosecond(uint64_t actual_ns, |
| 56 | uint64_t expected_s, |
| 57 | uint64_t expected_us) { |
| 58 | // Round to closest us. |
| 59 | uint64_t actual_us = (actual_ns + kNanoInMicro / 2) / kNanoInMicro; |
| 60 | uint64_t total_expected_us = expected_s * 1000 * 1000 + expected_us; |
Florian Mayer | 22e4b39 | 2018-03-08 10:20:11 +0000 | [diff] [blame] | 61 | if (actual_us == total_expected_us) |
Hector Dearman | 71372ea | 2017-12-06 17:13:37 +0000 | [diff] [blame] | 62 | return ::testing::AssertionSuccess(); |
Florian Mayer | 22e4b39 | 2018-03-08 10:20:11 +0000 | [diff] [blame] | 63 | |
| 64 | return ::testing::AssertionFailure() |
| 65 | << actual_ns / kNanoInSecond << "." |
| 66 | << (actual_ns % kNanoInSecond) / kNanoInMicro << " vs. " << expected_s |
| 67 | << "." << expected_us; |
Hector Dearman | 71372ea | 2017-12-06 17:13:37 +0000 | [diff] [blame] | 68 | } |
Primiano Tucci | 4f9b6d7 | 2017-12-05 20:59:16 +0000 | [diff] [blame] | 69 | |
Hector Dearman | 5add654 | 2017-12-06 15:47:42 +0000 | [diff] [blame] | 70 | // Single class to manage the whole protozero -> scattered stream -> chunks -> |
| 71 | // single buffer -> real proto dance. Has a method: writer() to get an |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 72 | // protozero ftrace bundle writer and a method ParseProto() to attempt to |
Hector Dearman | 5add654 | 2017-12-06 15:47:42 +0000 | [diff] [blame] | 73 | // parse whatever has been written so far into a proto message. |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 74 | template <class ZeroT, class ProtoT> |
| 75 | class ProtoProvider { |
Primiano Tucci | 4f9b6d7 | 2017-12-05 20:59:16 +0000 | [diff] [blame] | 76 | public: |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 77 | explicit ProtoProvider(size_t chunk_size) |
Hector Dearman | 5add654 | 2017-12-06 15:47:42 +0000 | [diff] [blame] | 78 | : chunk_size_(chunk_size), delegate_(chunk_size_), stream_(&delegate_) { |
| 79 | delegate_.set_writer(&stream_); |
| 80 | writer_.Reset(&stream_); |
Primiano Tucci | 4f9b6d7 | 2017-12-05 20:59:16 +0000 | [diff] [blame] | 81 | } |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 82 | ~ProtoProvider() = default; |
Primiano Tucci | 4f9b6d7 | 2017-12-05 20:59:16 +0000 | [diff] [blame] | 83 | |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 84 | ZeroT* writer() { return &writer_; } |
Primiano Tucci | 4f9b6d7 | 2017-12-05 20:59:16 +0000 | [diff] [blame] | 85 | |
Hector Dearman | 5add654 | 2017-12-06 15:47:42 +0000 | [diff] [blame] | 86 | // Stitch together the scattered chunks into a single buffer then attempt |
| 87 | // to parse the buffer as a FtraceEventBundle. Returns the FtraceEventBundle |
| 88 | // on success and nullptr on failure. |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 89 | std::unique_ptr<ProtoT> ParseProto() { |
| 90 | auto bundle = std::unique_ptr<ProtoT>(new ProtoT()); |
Hector Dearman | 5add654 | 2017-12-06 15:47:42 +0000 | [diff] [blame] | 91 | size_t msg_size = |
| 92 | delegate_.chunks().size() * chunk_size_ - stream_.bytes_available(); |
| 93 | std::unique_ptr<uint8_t[]> buffer = delegate_.StitchChunks(msg_size); |
| 94 | if (!bundle->ParseFromArray(buffer.get(), static_cast<int>(msg_size))) |
| 95 | return nullptr; |
| 96 | return bundle; |
Primiano Tucci | 4f9b6d7 | 2017-12-05 20:59:16 +0000 | [diff] [blame] | 97 | } |
| 98 | |
| 99 | private: |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 100 | ProtoProvider(const ProtoProvider&) = delete; |
| 101 | ProtoProvider& operator=(const ProtoProvider&) = delete; |
Hector Dearman | 5add654 | 2017-12-06 15:47:42 +0000 | [diff] [blame] | 102 | |
| 103 | size_t chunk_size_; |
Hector Dearman | bc8368e | 2018-01-25 17:34:11 +0000 | [diff] [blame] | 104 | ScatteredStreamDelegateForTesting delegate_; |
Hector Dearman | 5add654 | 2017-12-06 15:47:42 +0000 | [diff] [blame] | 105 | protozero::ScatteredStreamWriter stream_; |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 106 | ZeroT writer_; |
Primiano Tucci | 4f9b6d7 | 2017-12-05 20:59:16 +0000 | [diff] [blame] | 107 | }; |
| 108 | |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 109 | using BundleProvider = |
| 110 | ProtoProvider<protos::pbzero::FtraceEventBundle, protos::FtraceEventBundle>; |
| 111 | |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 112 | class BinaryWriter { |
| 113 | public: |
| 114 | BinaryWriter() |
Anna Zappone | bba1941 | 2018-01-24 16:38:18 +0000 | [diff] [blame] | 115 | : size_(base::kPageSize), page_(new uint8_t[size_]), ptr_(page_.get()) {} |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 116 | |
| 117 | template <typename T> |
| 118 | void Write(T t) { |
| 119 | memcpy(ptr_, &t, sizeof(T)); |
| 120 | ptr_ += sizeof(T); |
| 121 | PERFETTO_CHECK(ptr_ < ptr_ + size_); |
| 122 | } |
| 123 | |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 124 | void WriteFixedString(size_t n, const char* s) { |
| 125 | size_t length = strlen(s); |
| 126 | PERFETTO_CHECK(length < n); |
| 127 | char c; |
| 128 | while ((c = *s++)) { |
| 129 | Write<char>(c); |
| 130 | } |
| 131 | Write<char>('\0'); |
| 132 | for (size_t i = 0; i < n - length - 1; i++) { |
| 133 | Write<char>('\xff'); |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | std::unique_ptr<uint8_t[]> GetCopy() { |
| 138 | std::unique_ptr<uint8_t[]> buffer(new uint8_t[written()]); |
| 139 | memcpy(buffer.get(), page_.get(), written()); |
| 140 | return buffer; |
| 141 | } |
| 142 | |
Primiano Tucci | 3cbb10a | 2018-04-10 17:52:40 +0100 | [diff] [blame] | 143 | size_t written() { return static_cast<size_t>(ptr_ - page_.get()); } |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 144 | |
| 145 | private: |
| 146 | size_t size_; |
| 147 | std::unique_ptr<uint8_t[]> page_; |
| 148 | uint8_t* ptr_; |
| 149 | }; |
| 150 | |
Primiano Tucci | 4f9b6d7 | 2017-12-05 20:59:16 +0000 | [diff] [blame] | 151 | } // namespace |
| 152 | |
Hector Dearman | 5add654 | 2017-12-06 15:47:42 +0000 | [diff] [blame] | 153 | TEST(PageFromXxdTest, OneLine) { |
| 154 | std::string text = R"( |
| 155 | 00000000: 0000 0000 0000 0000 0000 0000 0000 0000 ................ |
| 156 | 00000000: 0000 0000 5600 0000 0000 0000 0000 0000 ................ |
| 157 | )"; |
| 158 | auto page = PageFromXxd(text); |
| 159 | EXPECT_EQ(page.get()[0x14], 0x56); |
| 160 | } |
| 161 | |
| 162 | TEST(PageFromXxdTest, ManyLines) { |
| 163 | std::string text = R"( |
| 164 | 00000000: 1234 0000 0000 0000 0000 0000 0000 0056 ................ |
| 165 | 00000010: 7800 0000 0000 0000 0000 0000 0000 009a ................ |
| 166 | 00000020: 0000 0000 bc00 0000 00de 0000 0000 009a ................ |
| 167 | )"; |
| 168 | auto page = PageFromXxd(text); |
| 169 | EXPECT_EQ(page.get()[0x00], 0x12); |
| 170 | EXPECT_EQ(page.get()[0x01], 0x34); |
| 171 | EXPECT_EQ(page.get()[0x0f], 0x56); |
| 172 | EXPECT_EQ(page.get()[0x10], 0x78); |
| 173 | EXPECT_EQ(page.get()[0x1f], 0x9a); |
| 174 | EXPECT_EQ(page.get()[0x24], 0xbc); |
| 175 | EXPECT_EQ(page.get()[0x29], 0xde); |
| 176 | } |
| 177 | |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 178 | TEST(CpuReaderTest, BinaryWriter) { |
| 179 | BinaryWriter writer; |
| 180 | writer.Write<uint64_t>(1); |
| 181 | writer.Write<uint32_t>(2); |
| 182 | writer.Write<uint16_t>(3); |
| 183 | writer.Write<uint8_t>(4); |
| 184 | auto buffer = writer.GetCopy(); |
| 185 | EXPECT_EQ(buffer.get()[0], 1); |
| 186 | EXPECT_EQ(buffer.get()[1], 0); |
| 187 | EXPECT_EQ(buffer.get()[2], 0); |
| 188 | EXPECT_EQ(buffer.get()[3], 0); |
| 189 | EXPECT_EQ(buffer.get()[4], 0); |
| 190 | EXPECT_EQ(buffer.get()[5], 0); |
| 191 | EXPECT_EQ(buffer.get()[6], 0); |
| 192 | EXPECT_EQ(buffer.get()[7], 0); |
| 193 | EXPECT_EQ(buffer.get()[8], 2); |
| 194 | } |
| 195 | |
Primiano Tucci | 4f9b6d7 | 2017-12-05 20:59:16 +0000 | [diff] [blame] | 196 | TEST(EventFilterTest, EventFilter) { |
Primiano Tucci | 4f9b6d7 | 2017-12-05 20:59:16 +0000 | [diff] [blame] | 197 | std::vector<Field> common_fields; |
| 198 | std::vector<Event> events; |
| 199 | |
| 200 | { |
| 201 | Event event; |
| 202 | event.name = "foo"; |
Hector Dearman | c27e5fb | 2018-03-26 14:02:35 +0100 | [diff] [blame] | 203 | event.group = "foo_group"; |
Primiano Tucci | 4f9b6d7 | 2017-12-05 20:59:16 +0000 | [diff] [blame] | 204 | event.ftrace_event_id = 1; |
| 205 | events.push_back(event); |
| 206 | } |
| 207 | |
| 208 | { |
| 209 | Event event; |
| 210 | event.name = "bar"; |
Hector Dearman | c27e5fb | 2018-03-26 14:02:35 +0100 | [diff] [blame] | 211 | event.group = "bar_group"; |
Primiano Tucci | 4f9b6d7 | 2017-12-05 20:59:16 +0000 | [diff] [blame] | 212 | event.ftrace_event_id = 10; |
| 213 | events.push_back(event); |
| 214 | } |
| 215 | |
| 216 | ProtoTranslationTable table(events, std::move(common_fields)); |
Hector Dearman | 7391c0f | 2018-02-02 14:20:09 +0000 | [diff] [blame] | 217 | EventFilter filter(table, {"foo"}); |
Primiano Tucci | 4f9b6d7 | 2017-12-05 20:59:16 +0000 | [diff] [blame] | 218 | |
| 219 | EXPECT_TRUE(filter.IsEventEnabled(1)); |
| 220 | EXPECT_FALSE(filter.IsEventEnabled(2)); |
| 221 | EXPECT_FALSE(filter.IsEventEnabled(10)); |
| 222 | } |
| 223 | |
Hector Dearman | 5add654 | 2017-12-06 15:47:42 +0000 | [diff] [blame] | 224 | TEST(ReadAndAdvanceTest, Number) { |
Primiano Tucci | 4f9b6d7 | 2017-12-05 20:59:16 +0000 | [diff] [blame] | 225 | uint64_t expected = 42; |
| 226 | uint64_t actual = 0; |
| 227 | uint8_t buffer[8] = {}; |
| 228 | const uint8_t* start = buffer; |
| 229 | const uint8_t* ptr = buffer; |
| 230 | memcpy(&buffer, &expected, 8); |
| 231 | EXPECT_TRUE(CpuReader::ReadAndAdvance<uint64_t>(&ptr, ptr + 8, &actual)); |
| 232 | EXPECT_EQ(ptr, start + 8); |
| 233 | EXPECT_EQ(actual, expected); |
| 234 | } |
| 235 | |
Hector Dearman | 5add654 | 2017-12-06 15:47:42 +0000 | [diff] [blame] | 236 | TEST(ReadAndAdvanceTest, PlainStruct) { |
Primiano Tucci | 4f9b6d7 | 2017-12-05 20:59:16 +0000 | [diff] [blame] | 237 | struct PlainStruct { |
| 238 | uint64_t timestamp; |
| 239 | uint64_t length; |
| 240 | }; |
| 241 | |
| 242 | uint64_t expected[2] = {42, 999}; |
| 243 | PlainStruct actual; |
| 244 | uint8_t buffer[16] = {}; |
| 245 | const uint8_t* start = buffer; |
| 246 | const uint8_t* ptr = buffer; |
| 247 | memcpy(&buffer, &expected, 16); |
| 248 | EXPECT_TRUE(CpuReader::ReadAndAdvance<PlainStruct>(&ptr, ptr + 16, &actual)); |
| 249 | EXPECT_EQ(ptr, start + 16); |
| 250 | EXPECT_EQ(actual.timestamp, 42ul); |
| 251 | EXPECT_EQ(actual.length, 999ul); |
| 252 | } |
| 253 | |
Hector Dearman | 5add654 | 2017-12-06 15:47:42 +0000 | [diff] [blame] | 254 | TEST(ReadAndAdvanceTest, ComplexStruct) { |
Primiano Tucci | 4f9b6d7 | 2017-12-05 20:59:16 +0000 | [diff] [blame] | 255 | struct ComplexStruct { |
| 256 | uint64_t timestamp; |
| 257 | uint32_t length; |
| 258 | uint32_t : 24; |
| 259 | uint32_t overwrite : 8; |
| 260 | }; |
| 261 | |
| 262 | uint64_t expected[2] = {42, 0xcdffffffabababab}; |
| 263 | ComplexStruct actual = {}; |
| 264 | uint8_t buffer[16] = {}; |
| 265 | const uint8_t* start = buffer; |
| 266 | const uint8_t* ptr = buffer; |
| 267 | memcpy(&buffer, &expected, 16); |
| 268 | EXPECT_TRUE( |
| 269 | CpuReader::ReadAndAdvance<ComplexStruct>(&ptr, ptr + 16, &actual)); |
| 270 | EXPECT_EQ(ptr, start + 16); |
| 271 | EXPECT_EQ(actual.timestamp, 42ul); |
| 272 | EXPECT_EQ(actual.length, 0xabababab); |
| 273 | EXPECT_EQ(actual.overwrite, 0xCDu); |
| 274 | } |
| 275 | |
Hector Dearman | 5add654 | 2017-12-06 15:47:42 +0000 | [diff] [blame] | 276 | TEST(ReadAndAdvanceTest, Overruns) { |
Primiano Tucci | 4f9b6d7 | 2017-12-05 20:59:16 +0000 | [diff] [blame] | 277 | uint64_t result = 42; |
| 278 | uint8_t buffer[7] = {}; |
| 279 | const uint8_t* start = buffer; |
| 280 | const uint8_t* ptr = buffer; |
| 281 | EXPECT_FALSE(CpuReader::ReadAndAdvance<uint64_t>(&ptr, ptr + 7, &result)); |
| 282 | EXPECT_EQ(ptr, start); |
| 283 | EXPECT_EQ(result, 42ul); |
| 284 | } |
| 285 | |
Hector Dearman | 5add654 | 2017-12-06 15:47:42 +0000 | [diff] [blame] | 286 | TEST(ReadAndAdvanceTest, AtEnd) { |
Primiano Tucci | 4f9b6d7 | 2017-12-05 20:59:16 +0000 | [diff] [blame] | 287 | uint8_t result = 42; |
| 288 | uint8_t buffer[8] = {}; |
| 289 | const uint8_t* start = buffer; |
| 290 | const uint8_t* ptr = buffer; |
| 291 | EXPECT_FALSE(CpuReader::ReadAndAdvance<uint8_t>(&ptr, ptr, &result)); |
| 292 | EXPECT_EQ(ptr, start); |
| 293 | EXPECT_EQ(result, 42); |
| 294 | } |
| 295 | |
Hector Dearman | 5add654 | 2017-12-06 15:47:42 +0000 | [diff] [blame] | 296 | TEST(ReadAndAdvanceTest, Underruns) { |
Primiano Tucci | 4f9b6d7 | 2017-12-05 20:59:16 +0000 | [diff] [blame] | 297 | uint64_t expected = 42; |
| 298 | uint64_t actual = 0; |
| 299 | uint8_t buffer[9] = {}; |
| 300 | const uint8_t* start = buffer; |
| 301 | const uint8_t* ptr = buffer; |
| 302 | memcpy(&buffer, &expected, 8); |
| 303 | EXPECT_TRUE(CpuReader::ReadAndAdvance<uint64_t>(&ptr, ptr + 8, &actual)); |
| 304 | EXPECT_EQ(ptr, start + 8); |
| 305 | EXPECT_EQ(actual, expected); |
| 306 | } |
| 307 | |
Hector Dearman | 639651c | 2018-03-09 19:00:40 +0000 | [diff] [blame] | 308 | // clang-format off |
Hector Dearman | 5add654 | 2017-12-06 15:47:42 +0000 | [diff] [blame] | 309 | // # tracer: nop |
| 310 | // # |
| 311 | // # entries-in-buffer/entries-written: 1/1 #P:8 |
| 312 | // # |
| 313 | // # _-----=> irqs-off |
| 314 | // # / _----=> need-resched |
| 315 | // # | / _---=> hardirq/softirq |
| 316 | // # || / _--=> preempt-depth |
| 317 | // # ||| / delay |
| 318 | // # TASK-PID CPU# |||| TIMESTAMP FUNCTION |
| 319 | // # | | | |||| | | |
| 320 | // sh-28712 [000] ...1 608934.535199: tracing_mark_write: Hello, world! |
Hector Dearman | 639651c | 2018-03-09 19:00:40 +0000 | [diff] [blame] | 321 | // clang-format on |
| 322 | |
Primiano Tucci | 3cbb10a | 2018-04-10 17:52:40 +0100 | [diff] [blame] | 323 | static ExamplePage g_single_print{ |
Hector Dearman | 5add654 | 2017-12-06 15:47:42 +0000 | [diff] [blame] | 324 | "synthetic", |
| 325 | R"( |
| 326 | 00000000: ba12 6a33 c628 0200 2c00 0000 0000 0000 ..j3.(..,....... |
| 327 | 00000010: def0 ec67 8d21 0000 0800 0000 0500 0001 ...g.!.......... |
| 328 | 00000020: 2870 0000 ac5d 1661 86ff ffff 4865 6c6c (p...].a....Hell |
| 329 | 00000030: 6f2c 2077 6f72 6c64 210a 00ff 0000 0000 o, world!....... |
| 330 | )", |
| 331 | }; |
Primiano Tucci | 4f9b6d7 | 2017-12-05 20:59:16 +0000 | [diff] [blame] | 332 | |
Hector Dearman | 5add654 | 2017-12-06 15:47:42 +0000 | [diff] [blame] | 333 | TEST(CpuReaderTest, ParseSinglePrint) { |
| 334 | const ExamplePage* test_case = &g_single_print; |
Primiano Tucci | 4f9b6d7 | 2017-12-05 20:59:16 +0000 | [diff] [blame] | 335 | |
Anna Zappone | bba1941 | 2018-01-24 16:38:18 +0000 | [diff] [blame] | 336 | BundleProvider bundle_provider(base::kPageSize); |
Hector Dearman | 5add654 | 2017-12-06 15:47:42 +0000 | [diff] [blame] | 337 | ProtoTranslationTable* table = GetTable(test_case->name); |
| 338 | auto page = PageFromXxd(test_case->data); |
Primiano Tucci | 4f9b6d7 | 2017-12-05 20:59:16 +0000 | [diff] [blame] | 339 | |
Hector Dearman | 7391c0f | 2018-02-02 14:20:09 +0000 | [diff] [blame] | 340 | EventFilter filter(*table, {"print"}); |
Primiano Tucci | 4f9b6d7 | 2017-12-05 20:59:16 +0000 | [diff] [blame] | 341 | |
Hector Dearman | c848803 | 2018-03-02 13:12:01 +0000 | [diff] [blame] | 342 | FtraceMetadata metadata{}; |
Hector Dearman | 1f14b62 | 2018-02-27 11:17:37 +0000 | [diff] [blame] | 343 | size_t bytes = CpuReader::ParsePage( |
Hector Dearman | c848803 | 2018-03-02 13:12:01 +0000 | [diff] [blame] | 344 | page.get(), &filter, bundle_provider.writer(), table, &metadata); |
Hector Dearman | 680a28b | 2018-01-11 18:34:24 +0000 | [diff] [blame] | 345 | EXPECT_EQ(bytes, 60ul); |
Primiano Tucci | 4f9b6d7 | 2017-12-05 20:59:16 +0000 | [diff] [blame] | 346 | |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 347 | auto bundle = bundle_provider.ParseProto(); |
Hector Dearman | 5add654 | 2017-12-06 15:47:42 +0000 | [diff] [blame] | 348 | ASSERT_TRUE(bundle); |
Hector Dearman | c848803 | 2018-03-02 13:12:01 +0000 | [diff] [blame] | 349 | EXPECT_EQ(metadata.overwrite_count, 0ul); |
Hector Dearman | 5add654 | 2017-12-06 15:47:42 +0000 | [diff] [blame] | 350 | ASSERT_EQ(bundle->event().size(), 1); |
| 351 | const protos::FtraceEvent& event = bundle->event().Get(0); |
Oystein Eftevaag | ed4df19 | 2017-12-07 10:52:58 -0800 | [diff] [blame] | 352 | EXPECT_EQ(event.pid(), 28712ul); |
Hector Dearman | 71372ea | 2017-12-06 17:13:37 +0000 | [diff] [blame] | 353 | EXPECT_TRUE(WithinOneMicrosecond(event.timestamp(), 608934, 535199)); |
Hector Dearman | 5add654 | 2017-12-06 15:47:42 +0000 | [diff] [blame] | 354 | EXPECT_EQ(event.print().buf(), "Hello, world!\n"); |
Primiano Tucci | 4f9b6d7 | 2017-12-05 20:59:16 +0000 | [diff] [blame] | 355 | } |
| 356 | |
Hector Dearman | 639651c | 2018-03-09 19:00:40 +0000 | [diff] [blame] | 357 | // clang-format off |
Hector Dearman | 8fd632b | 2018-02-27 13:42:50 +0000 | [diff] [blame] | 358 | // # tracer: nop |
| 359 | // # |
| 360 | // # entries-in-buffer/entries-written: 2/2 #P:8 |
| 361 | // # |
| 362 | // # _-----=> irqs-off |
| 363 | // # / _----=> need-resched |
| 364 | // # | / _---=> hardirq/softirq |
| 365 | // # || / _--=> preempt-depth |
| 366 | // # ||| / delay |
| 367 | // # TASK-PID TGID CPU# |||| TIMESTAMP FUNCTION |
| 368 | // # | | | | |||| | | |
| 369 | // echo-6908 ( 6908) [000] ...1 282762.884473: tracing_mark_write: qwertyuiopqwrtyuiopqwertyuiopqwertyuiopqwer[...] |
| 370 | // echo-6908 ( 6908) [000] ...1 282762.884492: tracing_mark_write: |
Hector Dearman | 639651c | 2018-03-09 19:00:40 +0000 | [diff] [blame] | 371 | // clang-format on |
| 372 | |
Primiano Tucci | 3cbb10a | 2018-04-10 17:52:40 +0100 | [diff] [blame] | 373 | static ExamplePage g_really_long_event{ |
Hector Dearman | 8fd632b | 2018-02-27 13:42:50 +0000 | [diff] [blame] | 374 | "synthetic", |
| 375 | R"( |
| 376 | 00000000: 6be0 48dd 2b01 0100 e403 0000 0000 0000 k.H.+........... |
| 377 | 00000010: 1e00 0000 0000 0000 0000 0000 c003 0000 ................ |
| 378 | 00000020: 0500 0001 fc1a 0000 4096 3615 9cff ffff ........@.6..... |
| 379 | 00000030: 7177 6572 7479 7569 6f70 7177 7274 7975 qwertyuiopqwrtyu |
| 380 | 00000040: 696f 7071 7765 7274 7975 696f 7071 7765 iopqwertyuiopqwe |
| 381 | 00000050: 7274 7975 696f 7071 7765 7274 7975 696f rtyuiopqwertyuio |
| 382 | 00000060: 7071 7772 7479 7569 6f70 7177 6572 7479 pqwrtyuiopqwerty |
| 383 | 00000070: 7569 6f70 7177 6572 7479 7569 6f71 7765 uiopqwertyuioqwe |
| 384 | 00000080: 7274 7975 696f 7071 7772 7479 7569 6f70 rtyuiopqwrtyuiop |
| 385 | 00000090: 7177 6572 7479 7569 6f70 7177 6572 7479 qwertyuiopqwerty |
| 386 | 000000a0: 7569 6f71 7765 7274 7975 696f 7071 7772 uioqwertyuiopqwr |
| 387 | 000000b0: 7479 7569 6f70 7177 6572 7479 7569 6f70 tyuiopqwertyuiop |
| 388 | 000000c0: 7177 6572 7479 7569 6f70 7070 7177 6572 qwertyuiopppqwer |
| 389 | 000000d0: 7479 7569 6f70 7177 7274 7975 696f 7071 tyuiopqwrtyuiopq |
| 390 | 000000e0: 7765 7274 7975 696f 7071 7765 7274 7975 wertyuiopqwertyu |
| 391 | 000000f0: 696f 7071 7765 7274 7975 696f 7071 7772 iopqwertyuiopqwr |
| 392 | 00000100: 7479 7569 6f70 7177 6572 7479 7569 6f70 tyuiopqwertyuiop |
| 393 | 00000110: 7177 6572 7479 7569 6f71 7765 7274 7975 qwertyuioqwertyu |
| 394 | 00000120: 696f 7071 7772 7479 7569 6f70 7177 6572 iopqwrtyuiopqwer |
| 395 | 00000130: 7479 7569 6f70 7177 6572 7479 7569 6f71 tyuiopqwertyuioq |
| 396 | 00000140: 7765 7274 7975 696f 7071 7772 7479 7569 wertyuiopqwrtyui |
| 397 | 00000150: 6f70 7177 6572 7479 7569 6f70 7177 6572 opqwertyuiopqwer |
| 398 | 00000160: 7479 7569 6f70 7070 7177 6572 7479 7569 tyuiopppqwertyui |
| 399 | 00000170: 6f70 7177 7274 7975 696f 7071 7765 7274 opqwrtyuiopqwert |
| 400 | 00000180: 7975 696f 7071 7765 7274 7975 696f 7071 yuiopqwertyuiopq |
| 401 | 00000190: 7765 7274 7975 696f 7071 7772 7479 7569 wertyuiopqwrtyui |
| 402 | 000001a0: 6f70 7177 6572 7479 7569 6f70 7177 6572 opqwertyuiopqwer |
| 403 | 000001b0: 7479 7569 6f71 7765 7274 7975 696f 7071 tyuioqwertyuiopq |
| 404 | 000001c0: 7772 7479 7569 6f70 7177 6572 7479 7569 wrtyuiopqwertyui |
| 405 | 000001d0: 6f70 7177 6572 7479 7569 6f71 7765 7274 opqwertyuioqwert |
| 406 | 000001e0: 7975 696f 7071 7772 7479 7569 6f70 7177 yuiopqwrtyuiopqw |
| 407 | 000001f0: 6572 7479 7569 6f70 7177 6572 7479 7569 ertyuiopqwertyui |
| 408 | 00000200: 6f70 7070 7177 6572 7479 7569 6f70 7177 opppqwertyuiopqw |
| 409 | 00000210: 7274 7975 696f 7071 7765 7274 7975 696f rtyuiopqwertyuio |
| 410 | 00000220: 7071 7765 7274 7975 696f 7071 7765 7274 pqwertyuiopqwert |
| 411 | 00000230: 7975 696f 7071 7772 7479 7569 6f70 7177 yuiopqwrtyuiopqw |
| 412 | 00000240: 6572 7479 7569 6f70 7177 6572 7479 7569 ertyuiopqwertyui |
| 413 | 00000250: 6f71 7765 7274 7975 696f 7071 7772 7479 oqwertyuiopqwrty |
| 414 | 00000260: 7569 6f70 7177 6572 7479 7569 6f70 7177 uiopqwertyuiopqw |
| 415 | 00000270: 6572 7479 7569 6f71 7765 7274 7975 696f ertyuioqwertyuio |
| 416 | 00000280: 7071 7772 7479 7569 6f70 7177 6572 7479 pqwrtyuiopqwerty |
| 417 | 00000290: 7569 6f70 7177 6572 7479 7569 6f70 7070 uiopqwertyuioppp |
| 418 | 000002a0: 7177 6572 7479 7569 6f70 7177 7274 7975 qwertyuiopqwrtyu |
| 419 | 000002b0: 696f 7071 7765 7274 7975 696f 7071 7765 iopqwertyuiopqwe |
| 420 | 000002c0: 7274 7975 696f 7071 7765 7274 7975 696f rtyuiopqwertyuio |
| 421 | 000002d0: 7071 7772 7479 7569 6f70 7177 6572 7479 pqwrtyuiopqwerty |
| 422 | 000002e0: 7569 6f70 7177 6572 7479 7569 6f71 7765 uiopqwertyuioqwe |
| 423 | 000002f0: 7274 7975 696f 7071 7772 7479 7569 6f70 rtyuiopqwrtyuiop |
| 424 | 00000300: 7177 6572 7479 7569 6f70 7177 6572 7479 qwertyuiopqwerty |
| 425 | 00000310: 7569 6f71 7765 7274 7975 696f 7071 7772 uioqwertyuiopqwr |
| 426 | 00000320: 7479 7569 6f70 7177 6572 7479 7569 6f70 tyuiopqwertyuiop |
| 427 | 00000330: 7177 6572 7479 7569 6f70 7070 7177 6572 qwertyuiopppqwer |
| 428 | 00000340: 7479 7569 6f70 7177 7274 7975 696f 7071 tyuiopqwrtyuiopq |
| 429 | 00000350: 7765 7274 7975 696f 7071 7765 7274 7975 wertyuiopqwertyu |
| 430 | 00000360: 696f 7071 7765 7274 7975 696f 7071 7772 iopqwertyuiopqwr |
| 431 | 00000370: 7479 7569 6f70 7177 6572 7479 7569 6f70 tyuiopqwertyuiop |
| 432 | 00000380: 7177 6572 7479 7569 6f71 7765 7274 7975 qwertyuioqwertyu |
| 433 | 00000390: 696f 7071 7772 7479 7569 6f70 7177 6572 iopqwrtyuiopqwer |
| 434 | 000003a0: 7479 7569 6f70 7177 6572 7479 7569 6f71 tyuiopqwertyuioq |
| 435 | 000003b0: 7765 7274 7975 696f 7071 7772 7479 7569 wertyuiopqwrtyui |
| 436 | 000003c0: 6f70 7177 6572 7479 7569 6f70 7177 6572 opqwertyuiopqwer |
| 437 | 000003d0: 7479 7569 6f70 7070 0a00 5115 6562 0900 tyuioppp..Q.eb.. |
| 438 | 000003e0: 0500 0001 fc1a 0000 4096 3615 9cff ffff ........@.6..... |
| 439 | 000003f0: 0a00 0000 0000 0000 0000 0000 0000 0000 ................ |
| 440 | 00000400: 0000 0000 0000 0000 0000 0000 0000 0000 ................ |
| 441 | 00000410: 0000 0000 0000 0000 0000 0000 0000 0000 ................ |
| 442 | 00000420: 0000 0000 0000 0000 0000 0000 0000 0000 ................ |
| 443 | )", |
| 444 | }; |
| 445 | |
| 446 | TEST(CpuReaderTest, ReallyLongEvent) { |
| 447 | const ExamplePage* test_case = &g_really_long_event; |
| 448 | |
| 449 | BundleProvider bundle_provider(base::kPageSize); |
| 450 | ProtoTranslationTable* table = GetTable(test_case->name); |
| 451 | auto page = PageFromXxd(test_case->data); |
| 452 | |
| 453 | EventFilter filter(*table, {"print"}); |
| 454 | |
Hector Dearman | c848803 | 2018-03-02 13:12:01 +0000 | [diff] [blame] | 455 | FtraceMetadata metadata{}; |
| 456 | CpuReader::ParsePage(page.get(), &filter, bundle_provider.writer(), table, |
| 457 | &metadata); |
Hector Dearman | 8fd632b | 2018-02-27 13:42:50 +0000 | [diff] [blame] | 458 | |
| 459 | auto bundle = bundle_provider.ParseProto(); |
| 460 | ASSERT_TRUE(bundle); |
| 461 | const protos::FtraceEvent& long_print = bundle->event().Get(0); |
| 462 | EXPECT_THAT(long_print.print().buf(), StartsWith("qwerty")); |
| 463 | EXPECT_THAT(long_print.print().buf(), EndsWith("ppp\n")); |
| 464 | const protos::FtraceEvent& newline = bundle->event().Get(1); |
| 465 | EXPECT_EQ(newline.print().buf(), "\n"); |
| 466 | } |
| 467 | |
Hector Dearman | 7a472d9 | 2018-01-15 12:39:26 +0000 | [diff] [blame] | 468 | // This event is as the event for ParseSinglePrint above except the string |
| 469 | // is extended to overflow the page size written in the header. |
Primiano Tucci | 3cbb10a | 2018-04-10 17:52:40 +0100 | [diff] [blame] | 470 | static ExamplePage g_single_print_malformed{ |
Hector Dearman | 7a472d9 | 2018-01-15 12:39:26 +0000 | [diff] [blame] | 471 | "synthetic", |
| 472 | R"( |
| 473 | 00000000: ba12 6a33 c628 0200 2c00 0000 0000 0000 ................ |
| 474 | 00000010: def0 ec67 8d21 0000 0800 0000 0500 0001 ................ |
| 475 | 00000020: 2870 0000 ac5d 1661 86ff ffff 4865 6c6c ................ |
| 476 | 00000030: 6f2c 2077 6f72 6c64 2120 776f 726c 6421 ................ |
| 477 | 00000040: 0a00 ff00 0000 0000 0000 0000 0000 0000 ................ |
| 478 | )", |
| 479 | }; |
| 480 | |
| 481 | TEST(CpuReaderTest, ParseSinglePrintMalformed) { |
| 482 | const ExamplePage* test_case = &g_single_print_malformed; |
| 483 | |
Anna Zappone | bba1941 | 2018-01-24 16:38:18 +0000 | [diff] [blame] | 484 | BundleProvider bundle_provider(base::kPageSize); |
Hector Dearman | 7a472d9 | 2018-01-15 12:39:26 +0000 | [diff] [blame] | 485 | ProtoTranslationTable* table = GetTable(test_case->name); |
| 486 | auto page = PageFromXxd(test_case->data); |
| 487 | |
Hector Dearman | 7391c0f | 2018-02-02 14:20:09 +0000 | [diff] [blame] | 488 | EventFilter filter(*table, {"print"}); |
Hector Dearman | 7a472d9 | 2018-01-15 12:39:26 +0000 | [diff] [blame] | 489 | |
Hector Dearman | c848803 | 2018-03-02 13:12:01 +0000 | [diff] [blame] | 490 | FtraceMetadata metadata{}; |
Hector Dearman | 1f14b62 | 2018-02-27 11:17:37 +0000 | [diff] [blame] | 491 | ASSERT_FALSE(CpuReader::ParsePage( |
Hector Dearman | c848803 | 2018-03-02 13:12:01 +0000 | [diff] [blame] | 492 | page.get(), &filter, bundle_provider.writer(), table, &metadata)); |
Hector Dearman | 7a472d9 | 2018-01-15 12:39:26 +0000 | [diff] [blame] | 493 | |
| 494 | auto bundle = bundle_provider.ParseProto(); |
| 495 | ASSERT_TRUE(bundle); |
Hector Dearman | c848803 | 2018-03-02 13:12:01 +0000 | [diff] [blame] | 496 | EXPECT_EQ(metadata.overwrite_count, 0ul); |
Hector Dearman | 7a472d9 | 2018-01-15 12:39:26 +0000 | [diff] [blame] | 497 | ASSERT_EQ(bundle->event().size(), 1); |
| 498 | // Although one field is malformed we still see data for the rest |
| 499 | // since we write the fields as we parse them for speed. |
| 500 | const protos::FtraceEvent& event = bundle->event().Get(0); |
| 501 | EXPECT_EQ(event.pid(), 28712ul); |
| 502 | EXPECT_TRUE(WithinOneMicrosecond(event.timestamp(), 608934, 535199)); |
| 503 | EXPECT_EQ(event.print().buf(), ""); |
| 504 | } |
| 505 | |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 506 | TEST(CpuReaderTest, FilterByEvent) { |
| 507 | const ExamplePage* test_case = &g_single_print; |
| 508 | |
Anna Zappone | bba1941 | 2018-01-24 16:38:18 +0000 | [diff] [blame] | 509 | BundleProvider bundle_provider(base::kPageSize); |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 510 | ProtoTranslationTable* table = GetTable(test_case->name); |
| 511 | auto page = PageFromXxd(test_case->data); |
| 512 | |
Hector Dearman | 7391c0f | 2018-02-02 14:20:09 +0000 | [diff] [blame] | 513 | EventFilter filter(*table, {}); |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 514 | |
Hector Dearman | c848803 | 2018-03-02 13:12:01 +0000 | [diff] [blame] | 515 | FtraceMetadata metadata{}; |
Hector Dearman | 1f14b62 | 2018-02-27 11:17:37 +0000 | [diff] [blame] | 516 | ASSERT_TRUE(CpuReader::ParsePage(page.get(), &filter, |
Hector Dearman | c848803 | 2018-03-02 13:12:01 +0000 | [diff] [blame] | 517 | bundle_provider.writer(), table, &metadata)); |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 518 | |
| 519 | auto bundle = bundle_provider.ParseProto(); |
| 520 | ASSERT_TRUE(bundle); |
Hector Dearman | c848803 | 2018-03-02 13:12:01 +0000 | [diff] [blame] | 521 | EXPECT_EQ(metadata.overwrite_count, 0ul); |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 522 | ASSERT_EQ(bundle->event().size(), 0); |
| 523 | } |
| 524 | |
Hector Dearman | 639651c | 2018-03-09 19:00:40 +0000 | [diff] [blame] | 525 | // clang-format off |
Hector Dearman | 71372ea | 2017-12-06 17:13:37 +0000 | [diff] [blame] | 526 | // # tracer: nop |
| 527 | // # |
| 528 | // # entries-in-buffer/entries-written: 3/3 #P:8 |
| 529 | // # |
| 530 | // # _-----=> irqs-off |
| 531 | // # / _----=> need-resched |
| 532 | // # | / _---=> hardirq/softirq |
| 533 | // # || / _--=> preempt-depth |
| 534 | // # ||| / delay |
| 535 | // # TASK-PID CPU# |||| TIMESTAMP FUNCTION |
| 536 | // # | | | |||| | | |
| 537 | // sh-30693 [000] ...1 615436.216806: tracing_mark_write: Hello, world! |
| 538 | // sh-30693 [000] ...1 615486.377232: tracing_mark_write: Good afternoon, world! |
| 539 | // sh-30693 [000] ...1 615495.632679: tracing_mark_write: Goodbye, world! |
Hector Dearman | 639651c | 2018-03-09 19:00:40 +0000 | [diff] [blame] | 540 | // clang-format on |
| 541 | |
Primiano Tucci | 3cbb10a | 2018-04-10 17:52:40 +0100 | [diff] [blame] | 542 | static ExamplePage g_three_prints{ |
Hector Dearman | 71372ea | 2017-12-06 17:13:37 +0000 | [diff] [blame] | 543 | "synthetic", |
| 544 | R"( |
| 545 | 00000000: a3ab 1569 bc2f 0200 9400 0000 0000 0000 ...i./.......... |
| 546 | 00000010: 1e00 0000 0000 0000 0800 0000 0500 0001 ................ |
| 547 | 00000020: e577 0000 ac5d 1661 86ff ffff 4865 6c6c .w...].a....Hell |
| 548 | 00000030: 6f2c 2077 6f72 6c64 210a 0000 5e32 6bb9 o, world!...^2k. |
| 549 | 00000040: 7501 0000 0b00 0000 0500 0001 e577 0000 u............w.. |
| 550 | 00000050: ac5d 1661 86ff ffff 476f 6f64 2061 6674 .].a....Good aft |
| 551 | 00000060: 6572 6e6f 6f6e 2c20 776f 726c 6421 0a00 ernoon, world!.. |
| 552 | 00000070: 0000 0000 9e6a 5df5 4400 0000 0900 0000 .....j].D....... |
| 553 | 00000080: 0500 0001 e577 0000 ac5d 1661 86ff ffff .....w...].a.... |
| 554 | 00000090: 476f 6f64 6279 652c 2077 6f72 6c64 210a Goodbye, world!. |
| 555 | 000000a0: 0051 0000 0000 0000 0000 0000 0000 0000 .Q.............. |
| 556 | )", |
| 557 | }; |
| 558 | |
| 559 | TEST(CpuReaderTest, ParseThreePrint) { |
| 560 | const ExamplePage* test_case = &g_three_prints; |
| 561 | |
Anna Zappone | bba1941 | 2018-01-24 16:38:18 +0000 | [diff] [blame] | 562 | BundleProvider bundle_provider(base::kPageSize); |
Hector Dearman | 71372ea | 2017-12-06 17:13:37 +0000 | [diff] [blame] | 563 | ProtoTranslationTable* table = GetTable(test_case->name); |
| 564 | auto page = PageFromXxd(test_case->data); |
| 565 | |
Hector Dearman | 7391c0f | 2018-02-02 14:20:09 +0000 | [diff] [blame] | 566 | EventFilter filter(*table, {"print"}); |
Hector Dearman | 71372ea | 2017-12-06 17:13:37 +0000 | [diff] [blame] | 567 | |
Hector Dearman | c848803 | 2018-03-02 13:12:01 +0000 | [diff] [blame] | 568 | FtraceMetadata metadata{}; |
Hector Dearman | 1f14b62 | 2018-02-27 11:17:37 +0000 | [diff] [blame] | 569 | ASSERT_TRUE(CpuReader::ParsePage(page.get(), &filter, |
Hector Dearman | c848803 | 2018-03-02 13:12:01 +0000 | [diff] [blame] | 570 | bundle_provider.writer(), table, &metadata)); |
Hector Dearman | 71372ea | 2017-12-06 17:13:37 +0000 | [diff] [blame] | 571 | |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 572 | auto bundle = bundle_provider.ParseProto(); |
Hector Dearman | 71372ea | 2017-12-06 17:13:37 +0000 | [diff] [blame] | 573 | ASSERT_TRUE(bundle); |
Hector Dearman | c848803 | 2018-03-02 13:12:01 +0000 | [diff] [blame] | 574 | EXPECT_EQ(metadata.overwrite_count, 0ul); |
Hector Dearman | 71372ea | 2017-12-06 17:13:37 +0000 | [diff] [blame] | 575 | ASSERT_EQ(bundle->event().size(), 3); |
| 576 | |
| 577 | { |
| 578 | const protos::FtraceEvent& event = bundle->event().Get(0); |
Oystein Eftevaag | ed4df19 | 2017-12-07 10:52:58 -0800 | [diff] [blame] | 579 | EXPECT_EQ(event.pid(), 30693ul); |
Hector Dearman | 71372ea | 2017-12-06 17:13:37 +0000 | [diff] [blame] | 580 | EXPECT_TRUE(WithinOneMicrosecond(event.timestamp(), 615436, 216806)); |
| 581 | EXPECT_EQ(event.print().buf(), "Hello, world!\n"); |
| 582 | } |
| 583 | |
| 584 | { |
| 585 | const protos::FtraceEvent& event = bundle->event().Get(1); |
Oystein Eftevaag | ed4df19 | 2017-12-07 10:52:58 -0800 | [diff] [blame] | 586 | EXPECT_EQ(event.pid(), 30693ul); |
Hector Dearman | 71372ea | 2017-12-06 17:13:37 +0000 | [diff] [blame] | 587 | EXPECT_TRUE(WithinOneMicrosecond(event.timestamp(), 615486, 377232)); |
| 588 | EXPECT_EQ(event.print().buf(), "Good afternoon, world!\n"); |
| 589 | } |
| 590 | |
| 591 | { |
| 592 | const protos::FtraceEvent& event = bundle->event().Get(2); |
Oystein Eftevaag | ed4df19 | 2017-12-07 10:52:58 -0800 | [diff] [blame] | 593 | EXPECT_EQ(event.pid(), 30693ul); |
Hector Dearman | 71372ea | 2017-12-06 17:13:37 +0000 | [diff] [blame] | 594 | EXPECT_TRUE(WithinOneMicrosecond(event.timestamp(), 615495, 632679)); |
| 595 | EXPECT_EQ(event.print().buf(), "Goodbye, world!\n"); |
| 596 | } |
| 597 | } |
| 598 | |
Hector Dearman | 639651c | 2018-03-09 19:00:40 +0000 | [diff] [blame] | 599 | // clang-format off |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 600 | // # tracer: nop |
| 601 | // # |
| 602 | // # entries-in-buffer/entries-written: 6/6 #P:8 |
| 603 | // # |
| 604 | // # _-----=> irqs-off |
| 605 | // # / _----=> need-resched |
| 606 | // # | / _---=> hardirq/softirq |
| 607 | // # || / _--=> preempt-depth |
| 608 | // # ||| / delay |
| 609 | // # TASK-PID CPU# |||| TIMESTAMP FUNCTION |
| 610 | // # | | | |||| | | |
Hector Dearman | 639651c | 2018-03-09 19:00:40 +0000 | [diff] [blame] | 611 | // ksoftirqd/0-3 [000] d..3 1045157.722134: sched_switch: prev_comm=ksoftirqd/0 prev_pid=3 prev_prio=120 prev_state=S ==> next_comm=sleep next_pid=3733 next_prio=120 |
| 612 | // sleep-3733 [000] d..3 1045157.725035: sched_switch: prev_comm=sleep prev_pid=3733 prev_prio=120 prev_state=R+ ==> next_comm=rcuop/0 next_pid=10 next_prio=120 |
| 613 | // rcu_preempt-7 [000] d..3 1045157.725182: sched_switch: prev_comm=rcu_preempt prev_pid=7 prev_prio=120 prev_state=S ==> next_comm=sleep next_pid=3733 next_prio=120 |
| 614 | // sleep-3733 [000] d..3 1045157.725671: sched_switch: prev_comm=sleep prev_pid=3733 prev_prio=120 prev_state=R+ ==> next_comm=sh next_pid=3513 next_prio=120 |
| 615 | // sh-3513 [000] d..3 1045157.726668: sched_switch: prev_comm=sh prev_pid=3513 prev_prio=120 prev_state=S ==> next_comm=sleep next_pid=3733 next_prio=120 |
| 616 | // sleep-3733 [000] d..3 1045157.726697: sched_switch: prev_comm=sleep prev_pid=3733 prev_prio=120 prev_state=x ==> next_comm=kworker/u16:3 next_pid=3681 next_prio=120 |
| 617 | // clang-format on |
| 618 | |
Primiano Tucci | 3cbb10a | 2018-04-10 17:52:40 +0100 | [diff] [blame] | 619 | static ExamplePage g_six_sched_switch{ |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 620 | "synthetic", |
| 621 | R"( |
| 622 | 00000000: 2b16 c3be 90b6 0300 a001 0000 0000 0000 +............... |
| 623 | 00000010: 1e00 0000 0000 0000 1000 0000 2f00 0103 ............/... |
| 624 | 00000020: 0300 0000 6b73 6f66 7469 7271 642f 3000 ....ksoftirqd/0. |
| 625 | 00000030: 0000 0000 0300 0000 7800 0000 0100 0000 ........x....... |
| 626 | 00000040: 0000 0000 736c 6565 7000 722f 3000 0000 ....sleep.r/0... |
| 627 | 00000050: 0000 0000 950e 0000 7800 0000 b072 8805 ........x....r.. |
| 628 | 00000060: 2f00 0103 950e 0000 736c 6565 7000 722f /.......sleep.r/ |
| 629 | 00000070: 3000 0000 0000 0000 950e 0000 7800 0000 0...........x... |
| 630 | 00000080: 0008 0000 0000 0000 7263 756f 702f 3000 ........rcuop/0. |
| 631 | 00000090: 0000 0000 0000 0000 0a00 0000 7800 0000 ............x... |
| 632 | 000000a0: f0b0 4700 2f00 0103 0700 0000 7263 755f ..G./.......rcu_ |
| 633 | 000000b0: 7072 6565 6d70 7400 0000 0000 0700 0000 preempt......... |
| 634 | 000000c0: 7800 0000 0100 0000 0000 0000 736c 6565 x...........slee |
| 635 | 000000d0: 7000 722f 3000 0000 0000 0000 950e 0000 p.r/0........... |
| 636 | 000000e0: 7800 0000 1001 ef00 2f00 0103 950e 0000 x......./....... |
| 637 | 000000f0: 736c 6565 7000 722f 3000 0000 0000 0000 sleep.r/0....... |
| 638 | 00000100: 950e 0000 7800 0000 0008 0000 0000 0000 ....x........... |
| 639 | 00000110: 7368 0064 0065 722f 3000 0000 0000 0000 sh.d.er/0....... |
| 640 | 00000120: b90d 0000 7800 0000 f0c7 e601 2f00 0103 ....x......./... |
| 641 | 00000130: b90d 0000 7368 0064 0065 722f 3000 0000 ....sh.d.er/0... |
| 642 | 00000140: 0000 0000 b90d 0000 7800 0000 0100 0000 ........x....... |
| 643 | 00000150: 0000 0000 736c 6565 7000 722f 3000 0000 ....sleep.r/0... |
| 644 | 00000160: 0000 0000 950e 0000 7800 0000 d030 0e00 ........x....0.. |
| 645 | 00000170: 2f00 0103 950e 0000 736c 6565 7000 722f /.......sleep.r/ |
| 646 | 00000180: 3000 0000 0000 0000 950e 0000 7800 0000 0...........x... |
| 647 | 00000190: 4000 0000 0000 0000 6b77 6f72 6b65 722f @.......kworker/ |
| 648 | 000001a0: 7531 363a 3300 0000 610e 0000 7800 0000 u16:3...a...x... |
| 649 | 000001b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ |
| 650 | )", |
| 651 | }; |
| 652 | |
| 653 | TEST(CpuReaderTest, ParseSixSchedSwitch) { |
| 654 | const ExamplePage* test_case = &g_six_sched_switch; |
| 655 | |
Anna Zappone | bba1941 | 2018-01-24 16:38:18 +0000 | [diff] [blame] | 656 | BundleProvider bundle_provider(base::kPageSize); |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 657 | ProtoTranslationTable* table = GetTable(test_case->name); |
| 658 | auto page = PageFromXxd(test_case->data); |
| 659 | |
Hector Dearman | 7391c0f | 2018-02-02 14:20:09 +0000 | [diff] [blame] | 660 | EventFilter filter(*table, {"sched_switch"}); |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 661 | |
Hector Dearman | c848803 | 2018-03-02 13:12:01 +0000 | [diff] [blame] | 662 | FtraceMetadata metadata{}; |
Hector Dearman | 1f14b62 | 2018-02-27 11:17:37 +0000 | [diff] [blame] | 663 | ASSERT_TRUE(CpuReader::ParsePage(page.get(), &filter, |
Hector Dearman | c848803 | 2018-03-02 13:12:01 +0000 | [diff] [blame] | 664 | bundle_provider.writer(), table, &metadata)); |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 665 | |
Hector Dearman | 2c3ac7f | 2018-03-22 15:39:36 +0000 | [diff] [blame] | 666 | auto bundle = bundle_provider.ParseProto(); |
| 667 | ASSERT_TRUE(bundle); |
| 668 | EXPECT_EQ(metadata.overwrite_count, 0ul); |
| 669 | ASSERT_EQ(bundle->event().size(), 6); |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 670 | |
Hector Dearman | 2c3ac7f | 2018-03-22 15:39:36 +0000 | [diff] [blame] | 671 | { |
| 672 | const protos::FtraceEvent& event = bundle->event().Get(1); |
| 673 | EXPECT_EQ(event.pid(), 3733ul); |
| 674 | EXPECT_TRUE(WithinOneMicrosecond(event.timestamp(), 1045157, 725035)); |
| 675 | EXPECT_EQ(event.sched_switch().prev_comm(), "sleep"); |
| 676 | EXPECT_EQ(event.sched_switch().prev_pid(), 3733); |
| 677 | EXPECT_EQ(event.sched_switch().prev_prio(), 120); |
| 678 | EXPECT_EQ(event.sched_switch().next_comm(), "rcuop/0"); |
| 679 | EXPECT_EQ(event.sched_switch().next_pid(), 10); |
| 680 | EXPECT_EQ(event.sched_switch().next_prio(), 120); |
| 681 | } |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 682 | } |
| 683 | |
| 684 | TEST(CpuReaderTest, ParseAllFields) { |
| 685 | using FakeEventProvider = |
| 686 | ProtoProvider<pbzero::FakeFtraceEvent, FakeFtraceEvent>; |
| 687 | |
| 688 | uint16_t ftrace_event_id = 102; |
| 689 | |
| 690 | std::vector<Field> common_fields; |
Hector Dearman | 77af133 | 2017-12-15 11:55:33 +0000 | [diff] [blame] | 691 | { |
| 692 | common_fields.emplace_back(Field{}); |
| 693 | Field* field = &common_fields.back(); |
| 694 | field->ftrace_offset = 0; |
| 695 | field->ftrace_size = 4; |
| 696 | field->ftrace_type = kFtraceUint32; |
| 697 | field->proto_field_id = 1; |
| 698 | field->proto_field_type = kProtoUint32; |
| 699 | SetTranslationStrategy(field->ftrace_type, field->proto_field_type, |
| 700 | &field->strategy); |
| 701 | } |
| 702 | |
Florian Mayer | b8e235b | 2018-03-22 20:32:50 +0000 | [diff] [blame] | 703 | { |
| 704 | common_fields.emplace_back(Field{}); |
| 705 | Field* field = &common_fields.back(); |
| 706 | field->ftrace_offset = 4; |
| 707 | field->ftrace_size = 4; |
| 708 | field->ftrace_type = kFtraceCommonPid32; |
| 709 | field->proto_field_id = 2; |
| 710 | field->proto_field_type = kProtoInt32; |
| 711 | SetTranslationStrategy(field->ftrace_type, field->proto_field_type, |
| 712 | &field->strategy); |
| 713 | } |
| 714 | |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 715 | std::vector<Event> events; |
Hector Dearman | 2c3ac7f | 2018-03-22 15:39:36 +0000 | [diff] [blame] | 716 | events.emplace_back(Event{}); |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 717 | { |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 718 | Event* event = &events.back(); |
| 719 | event->name = ""; |
| 720 | event->group = ""; |
| 721 | event->proto_field_id = 42; |
| 722 | event->ftrace_event_id = ftrace_event_id; |
Hector Dearman | 2c3ac7f | 2018-03-22 15:39:36 +0000 | [diff] [blame] | 723 | |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 724 | { |
Hector Dearman | 2c3ac7f | 2018-03-22 15:39:36 +0000 | [diff] [blame] | 725 | // uint32 -> uint32 |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 726 | event->fields.emplace_back(Field{}); |
| 727 | Field* field = &event->fields.back(); |
| 728 | field->ftrace_offset = 8; |
| 729 | field->ftrace_size = 4; |
Hector Dearman | 2c3ac7f | 2018-03-22 15:39:36 +0000 | [diff] [blame] | 730 | field->ftrace_type = kFtraceUint32; |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 731 | field->proto_field_id = 1; |
Hector Dearman | 2c3ac7f | 2018-03-22 15:39:36 +0000 | [diff] [blame] | 732 | field->proto_field_type = kProtoUint32; |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 733 | } |
Hector Dearman | 2c3ac7f | 2018-03-22 15:39:36 +0000 | [diff] [blame] | 734 | |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 735 | { |
Anna Zappone | 4ea73c0 | 2018-03-09 16:01:21 +0000 | [diff] [blame] | 736 | // pid32 -> uint32 |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 737 | event->fields.emplace_back(Field{}); |
| 738 | Field* field = &event->fields.back(); |
| 739 | field->ftrace_offset = 12; |
Hector Dearman | f19e7c5 | 2018-03-06 10:25:01 +0000 | [diff] [blame] | 740 | field->ftrace_size = 4; |
| 741 | field->ftrace_type = kFtracePid32; |
| 742 | field->proto_field_id = 2; |
| 743 | field->proto_field_type = kProtoInt32; |
Hector Dearman | f19e7c5 | 2018-03-06 10:25:01 +0000 | [diff] [blame] | 744 | } |
Hector Dearman | 2c3ac7f | 2018-03-22 15:39:36 +0000 | [diff] [blame] | 745 | |
Hector Dearman | f19e7c5 | 2018-03-06 10:25:01 +0000 | [diff] [blame] | 746 | { |
Hector Dearman | 2c3ac7f | 2018-03-22 15:39:36 +0000 | [diff] [blame] | 747 | // dev32 -> uint64 |
Hector Dearman | f19e7c5 | 2018-03-06 10:25:01 +0000 | [diff] [blame] | 748 | event->fields.emplace_back(Field{}); |
| 749 | Field* field = &event->fields.back(); |
| 750 | field->ftrace_offset = 16; |
| 751 | field->ftrace_size = 4; |
Hector Dearman | 2c3ac7f | 2018-03-22 15:39:36 +0000 | [diff] [blame] | 752 | field->ftrace_type = kFtraceDevId32; |
| 753 | field->proto_field_id = 3; |
| 754 | field->proto_field_type = kProtoUint64; |
Anna Zappone | 4ea73c0 | 2018-03-09 16:01:21 +0000 | [diff] [blame] | 755 | } |
Hector Dearman | 2c3ac7f | 2018-03-22 15:39:36 +0000 | [diff] [blame] | 756 | |
Anna Zappone | 4ea73c0 | 2018-03-09 16:01:21 +0000 | [diff] [blame] | 757 | { |
| 758 | // ino_t (32bit) -> uint64 |
| 759 | event->fields.emplace_back(Field{}); |
| 760 | Field* field = &event->fields.back(); |
| 761 | field->ftrace_offset = 20; |
| 762 | field->ftrace_size = 4; |
Hector Dearman | f19e7c5 | 2018-03-06 10:25:01 +0000 | [diff] [blame] | 763 | field->ftrace_type = kFtraceInode32; |
Hector Dearman | 2c3ac7f | 2018-03-22 15:39:36 +0000 | [diff] [blame] | 764 | field->proto_field_id = 4; |
Hector Dearman | f19e7c5 | 2018-03-06 10:25:01 +0000 | [diff] [blame] | 765 | field->proto_field_type = kProtoUint64; |
Hector Dearman | f19e7c5 | 2018-03-06 10:25:01 +0000 | [diff] [blame] | 766 | } |
Hector Dearman | 2c3ac7f | 2018-03-22 15:39:36 +0000 | [diff] [blame] | 767 | |
Hector Dearman | f19e7c5 | 2018-03-06 10:25:01 +0000 | [diff] [blame] | 768 | { |
Anna Zappone | 8ce3087 | 2018-03-19 17:01:15 +0000 | [diff] [blame] | 769 | // dev64 -> uint64 |
Hector Dearman | f19e7c5 | 2018-03-06 10:25:01 +0000 | [diff] [blame] | 770 | event->fields.emplace_back(Field{}); |
| 771 | Field* field = &event->fields.back(); |
Anna Zappone | 4ea73c0 | 2018-03-09 16:01:21 +0000 | [diff] [blame] | 772 | field->ftrace_offset = 24; |
Hector Dearman | f19e7c5 | 2018-03-06 10:25:01 +0000 | [diff] [blame] | 773 | field->ftrace_size = 8; |
Anna Zappone | 8ce3087 | 2018-03-19 17:01:15 +0000 | [diff] [blame] | 774 | field->ftrace_type = kFtraceDevId64; |
Hector Dearman | 2c3ac7f | 2018-03-22 15:39:36 +0000 | [diff] [blame] | 775 | field->proto_field_id = 5; |
Anna Zappone | 8ce3087 | 2018-03-19 17:01:15 +0000 | [diff] [blame] | 776 | field->proto_field_type = kProtoUint64; |
Anna Zappone | 8ce3087 | 2018-03-19 17:01:15 +0000 | [diff] [blame] | 777 | } |
Hector Dearman | 2c3ac7f | 2018-03-22 15:39:36 +0000 | [diff] [blame] | 778 | |
Anna Zappone | 8ce3087 | 2018-03-19 17:01:15 +0000 | [diff] [blame] | 779 | { |
| 780 | // ino_t (64bit) -> uint64 |
| 781 | event->fields.emplace_back(Field{}); |
| 782 | Field* field = &event->fields.back(); |
| 783 | field->ftrace_offset = 32; |
| 784 | field->ftrace_size = 8; |
Hector Dearman | f19e7c5 | 2018-03-06 10:25:01 +0000 | [diff] [blame] | 785 | field->ftrace_type = kFtraceInode64; |
Hector Dearman | 2c3ac7f | 2018-03-22 15:39:36 +0000 | [diff] [blame] | 786 | field->proto_field_id = 6; |
Hector Dearman | f19e7c5 | 2018-03-06 10:25:01 +0000 | [diff] [blame] | 787 | field->proto_field_type = kProtoUint64; |
Hector Dearman | f19e7c5 | 2018-03-06 10:25:01 +0000 | [diff] [blame] | 788 | } |
Hector Dearman | 2c3ac7f | 2018-03-22 15:39:36 +0000 | [diff] [blame] | 789 | |
Hector Dearman | f19e7c5 | 2018-03-06 10:25:01 +0000 | [diff] [blame] | 790 | { |
| 791 | // char[16] -> string |
| 792 | event->fields.emplace_back(Field{}); |
| 793 | Field* field = &event->fields.back(); |
Anna Zappone | 8ce3087 | 2018-03-19 17:01:15 +0000 | [diff] [blame] | 794 | field->ftrace_offset = 40; |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 795 | field->ftrace_size = 16; |
Hector Dearman | 77af133 | 2017-12-15 11:55:33 +0000 | [diff] [blame] | 796 | field->ftrace_type = kFtraceFixedCString; |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 797 | field->proto_field_id = 500; |
| 798 | field->proto_field_type = kProtoString; |
| 799 | } |
Hector Dearman | 2c3ac7f | 2018-03-22 15:39:36 +0000 | [diff] [blame] | 800 | |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 801 | { |
Anna Zappone | 5a407c1 | 2018-02-22 14:21:38 +0000 | [diff] [blame] | 802 | // char -> string |
| 803 | event->fields.emplace_back(Field{}); |
| 804 | Field* field = &event->fields.back(); |
Anna Zappone | 8ce3087 | 2018-03-19 17:01:15 +0000 | [diff] [blame] | 805 | field->ftrace_offset = 56; |
Anna Zappone | 5a407c1 | 2018-02-22 14:21:38 +0000 | [diff] [blame] | 806 | field->ftrace_size = 0; |
| 807 | field->ftrace_type = kFtraceCString; |
| 808 | field->proto_field_id = 501; |
| 809 | field->proto_field_type = kProtoString; |
Hector Dearman | 2c3ac7f | 2018-03-22 15:39:36 +0000 | [diff] [blame] | 810 | } |
| 811 | |
| 812 | for (Field& field : event->fields) { |
| 813 | SetTranslationStrategy(field.ftrace_type, field.proto_field_type, |
| 814 | &field.strategy); |
Anna Zappone | 5a407c1 | 2018-02-22 14:21:38 +0000 | [diff] [blame] | 815 | } |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 816 | } |
Hector Dearman | 2c3ac7f | 2018-03-22 15:39:36 +0000 | [diff] [blame] | 817 | |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 818 | ProtoTranslationTable table(events, std::move(common_fields)); |
| 819 | |
Anna Zappone | bba1941 | 2018-01-24 16:38:18 +0000 | [diff] [blame] | 820 | FakeEventProvider provider(base::kPageSize); |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 821 | |
| 822 | BinaryWriter writer; |
Anna Zappone | 8ce3087 | 2018-03-19 17:01:15 +0000 | [diff] [blame] | 823 | |
| 824 | // Must use the bit masks to translate between kernel and userspace device ids |
| 825 | // to generate the below examples |
Hector Dearman | 2c3ac7f | 2018-03-22 15:39:36 +0000 | [diff] [blame] | 826 | const uint32_t kKernelBlockDeviceId = 271581216; |
Anna Zappone | dfaa90b | 2018-03-23 14:56:48 +0000 | [diff] [blame] | 827 | |
Primiano Tucci | 3cbb10a | 2018-04-10 17:52:40 +0100 | [diff] [blame] | 828 | const BlockDeviceID kUserspaceBlockDeviceId = |
| 829 | CpuReader::TranslateBlockDeviceIDToUserspace<BlockDeviceID>( |
Hector Dearman | 2c3ac7f | 2018-03-22 15:39:36 +0000 | [diff] [blame] | 830 | kKernelBlockDeviceId); |
| 831 | const uint64_t k64BitKernelBlockDeviceId = 4442450946; |
Primiano Tucci | 3cbb10a | 2018-04-10 17:52:40 +0100 | [diff] [blame] | 832 | const BlockDeviceID k64BitUserspaceBlockDeviceId = |
Anna Zappone | 8ce3087 | 2018-03-19 17:01:15 +0000 | [diff] [blame] | 833 | CpuReader::TranslateBlockDeviceIDToUserspace<uint64_t>( |
Hector Dearman | 2c3ac7f | 2018-03-22 15:39:36 +0000 | [diff] [blame] | 834 | k64BitKernelBlockDeviceId); |
Anna Zappone | 8ce3087 | 2018-03-19 17:01:15 +0000 | [diff] [blame] | 835 | |
Primiano Tucci | 3cbb10a | 2018-04-10 17:52:40 +0100 | [diff] [blame] | 836 | writer.Write<int32_t>(1001); // Common field. |
| 837 | writer.Write<int32_t>(9999); // Common pid |
| 838 | writer.Write<int32_t>(1003); // Uint32 field |
| 839 | writer.Write<int32_t>(97); // Pid |
| 840 | writer.Write<int32_t>(kKernelBlockDeviceId); // Dev id |
| 841 | writer.Write<int32_t>(98); // Inode 32 |
Hector Dearman | 2c3ac7f | 2018-03-22 15:39:36 +0000 | [diff] [blame] | 842 | writer.Write<int64_t>(k64BitKernelBlockDeviceId); // Dev id 64 |
| 843 | writer.Write<int64_t>(99u); // Inode 64 |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 844 | writer.WriteFixedString(16, "Hello"); |
| 845 | writer.WriteFixedString(300, "Goodbye"); |
| 846 | |
| 847 | auto input = writer.GetCopy(); |
| 848 | auto length = writer.written(); |
Hector Dearman | c848803 | 2018-03-02 13:12:01 +0000 | [diff] [blame] | 849 | FtraceMetadata metadata{}; |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 850 | |
| 851 | ASSERT_TRUE(CpuReader::ParseEvent(ftrace_event_id, input.get(), |
| 852 | input.get() + length, &table, |
Hector Dearman | c848803 | 2018-03-02 13:12:01 +0000 | [diff] [blame] | 853 | provider.writer(), &metadata)); |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 854 | |
| 855 | auto event = provider.ParseProto(); |
| 856 | ASSERT_TRUE(event); |
Hector Dearman | 77af133 | 2017-12-15 11:55:33 +0000 | [diff] [blame] | 857 | EXPECT_EQ(event->common_field(), 1001ul); |
Anna Zappone | dfaa90b | 2018-03-23 14:56:48 +0000 | [diff] [blame] | 858 | EXPECT_EQ(event->common_pid(), 9999ul); |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 859 | EXPECT_EQ(event->event_case(), FakeFtraceEvent::kAllFields); |
Anna Zappone | 4ea73c0 | 2018-03-09 16:01:21 +0000 | [diff] [blame] | 860 | EXPECT_EQ(event->all_fields().field_uint32(), 1003u); |
Hector Dearman | 2c3ac7f | 2018-03-22 15:39:36 +0000 | [diff] [blame] | 861 | EXPECT_EQ(event->all_fields().field_pid(), 97); |
Primiano Tucci | 3cbb10a | 2018-04-10 17:52:40 +0100 | [diff] [blame] | 862 | EXPECT_EQ(event->all_fields().field_dev_32(), |
| 863 | static_cast<uint32_t>(kUserspaceBlockDeviceId)); |
Hector Dearman | f19e7c5 | 2018-03-06 10:25:01 +0000 | [diff] [blame] | 864 | EXPECT_EQ(event->all_fields().field_inode_32(), 98u); |
Primiano Tucci | 808d6df | 2018-03-31 13:24:18 +0100 | [diff] [blame] | 865 | // TODO(primiano): for some reason this fails on mac. |
| 866 | #if !PERFETTO_BUILDFLAG(PERFETTO_OS_MACOSX) |
Hector Dearman | 2c3ac7f | 2018-03-22 15:39:36 +0000 | [diff] [blame] | 867 | EXPECT_EQ(event->all_fields().field_dev_64(), k64BitUserspaceBlockDeviceId); |
Primiano Tucci | 808d6df | 2018-03-31 13:24:18 +0100 | [diff] [blame] | 868 | #endif |
Hector Dearman | f19e7c5 | 2018-03-06 10:25:01 +0000 | [diff] [blame] | 869 | EXPECT_EQ(event->all_fields().field_inode_64(), 99u); |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 870 | EXPECT_EQ(event->all_fields().field_char_16(), "Hello"); |
| 871 | EXPECT_EQ(event->all_fields().field_char(), "Goodbye"); |
Hector Dearman | f19e7c5 | 2018-03-06 10:25:01 +0000 | [diff] [blame] | 872 | EXPECT_THAT(metadata.pids, Contains(97)); |
Anna Zappone | 8ce3087 | 2018-03-19 17:01:15 +0000 | [diff] [blame] | 873 | EXPECT_EQ(metadata.inode_and_device.size(), 2U); |
| 874 | EXPECT_THAT(metadata.inode_and_device, |
Hector Dearman | 2c3ac7f | 2018-03-22 15:39:36 +0000 | [diff] [blame] | 875 | Contains(Pair(98u, kUserspaceBlockDeviceId))); |
Anna Zappone | 8ce3087 | 2018-03-19 17:01:15 +0000 | [diff] [blame] | 876 | EXPECT_THAT(metadata.inode_and_device, |
Hector Dearman | 2c3ac7f | 2018-03-22 15:39:36 +0000 | [diff] [blame] | 877 | Contains(Pair(99u, k64BitUserspaceBlockDeviceId))); |
Anna Zappone | 8ce3087 | 2018-03-19 17:01:15 +0000 | [diff] [blame] | 878 | } |
| 879 | |
| 880 | TEST(CpuReaderTest, TranslateBlockDeviceIDToUserspace) { |
Hector Dearman | 2c3ac7f | 2018-03-22 15:39:36 +0000 | [diff] [blame] | 881 | const uint32_t kKernelBlockDeviceId = 271581216; |
Primiano Tucci | 3cbb10a | 2018-04-10 17:52:40 +0100 | [diff] [blame] | 882 | const BlockDeviceID kUserspaceBlockDeviceId = 66336; |
Hector Dearman | 2c3ac7f | 2018-03-22 15:39:36 +0000 | [diff] [blame] | 883 | const uint64_t k64BitKernelBlockDeviceId = 4442450946; |
Primiano Tucci | 3cbb10a | 2018-04-10 17:52:40 +0100 | [diff] [blame] | 884 | const BlockDeviceID k64BitUserspaceBlockDeviceId = |
| 885 | static_cast<BlockDeviceID>(17594983681026ULL); |
Anna Zappone | 8ce3087 | 2018-03-19 17:01:15 +0000 | [diff] [blame] | 886 | |
Primiano Tucci | 3cbb10a | 2018-04-10 17:52:40 +0100 | [diff] [blame] | 887 | EXPECT_EQ(CpuReader::TranslateBlockDeviceIDToUserspace<uint32_t>( |
| 888 | kKernelBlockDeviceId), |
| 889 | kUserspaceBlockDeviceId); |
| 890 | EXPECT_EQ(CpuReader::TranslateBlockDeviceIDToUserspace<uint64_t>( |
| 891 | k64BitKernelBlockDeviceId), |
| 892 | k64BitUserspaceBlockDeviceId); |
Hector Dearman | cc6dcb0 | 2017-12-12 16:48:43 +0000 | [diff] [blame] | 893 | } |
| 894 | |
Hector Dearman | 639651c | 2018-03-09 19:00:40 +0000 | [diff] [blame] | 895 | // clang-format off |
Hector Dearman | bc8368e | 2018-01-25 17:34:11 +0000 | [diff] [blame] | 896 | // # tracer: nop |
| 897 | // # |
Hector Dearman | 639651c | 2018-03-09 19:00:40 +0000 | [diff] [blame] | 898 | // # entries-in-buffer/entries-written: 1041/238740 #P:8 |
Hector Dearman | bc8368e | 2018-01-25 17:34:11 +0000 | [diff] [blame] | 899 | // # |
| 900 | // # _-----=> irqs-off |
| 901 | // # / _----=> need-resched |
| 902 | // # | / _---=> hardirq/softirq |
| 903 | // # || / _--=> preempt-depth |
| 904 | // # ||| / delay |
| 905 | // # TASK-PID CPU# |||| TIMESTAMP FUNCTION |
| 906 | // # | | | |||| | | |
Hector Dearman | 639651c | 2018-03-09 19:00:40 +0000 | [diff] [blame] | 907 | // android.bg-1668 [000] ...1 174991.234105: ext4_journal_start: dev 259,32 blocks, 2 rsv_blocks, 0 caller ext4_dirty_inode+0x30/0x68 |
| 908 | // android.bg-1668 [000] ...1 174991.234108: ext4_mark_inode_dirty: dev 259,32 ino 2883605 caller ext4_dirty_inode+0x48/0x68 |
| 909 | // android.bg-1668 [000] ...1 174991.234118: ext4_da_write_begin: dev 259,32 ino 2883605 pos 20480 len 4096 flags 0 |
| 910 | // android.bg-1668 [000] ...1 174991.234126: ext4_journal_start: dev 259,32 blocks, 1 rsv_blocks, 0 caller ext4_da_write_begin+0x3d4/0x518 |
| 911 | // android.bg-1668 [000] ...1 174991.234133: ext4_es_lookup_extent_enter: dev 259,32 ino 2883605 lblk 5 |
| 912 | // android.bg-1668 [000] ...1 174991.234135: ext4_es_lookup_extent_exit: dev 259,32 ino 2883605 found 1 [5/4294967290) 576460752303423487 H0x10 |
| 913 | // android.bg-1668 [000] ...2 174991.234140: ext4_da_reserve_space: dev 259,32 ino 2883605 mode 0100600 i_blocks 8 reserved_data_blocks 6 reserved_meta_blocks 0 |
| 914 | // android.bg-1668 [000] ...1 174991.234142: ext4_es_insert_extent: dev 259,32 ino 2883605 es [5/1) mapped 576460752303423487 status D |
| 915 | // android.bg-1668 [000] ...1 174991.234153: ext4_da_write_end: dev 259,32 ino 2883605 pos 20480 len 4096 copied 4096 |
| 916 | // android.bg-1668 [000] ...1 174991.234158: ext4_journal_start: dev 259,32 blocks, 2 rsv_blocks, 0 caller ext4_dirty_inode+0x30/0x68 |
| 917 | // android.bg-1668 [000] ...1 174991.234160: ext4_mark_inode_dirty: dev 259,32 ino 2883605 caller ext4_dirty_inode+0x48/0x68 |
| 918 | // android.bg-1668 [000] ...1 174991.234170: ext4_da_write_begin: dev 259,32 ino 2883605 pos 24576 len 2968 flags 0 |
| 919 | // android.bg-1668 [000] ...1 174991.234178: ext4_journal_start: dev 259,32 blocks, 1 rsv_blocks, 0 caller ext4_da_write_begin+0x3d4/0x518 |
| 920 | // android.bg-1668 [000] ...1 174991.234184: ext4_es_lookup_extent_enter: dev 259,32 ino 2883605 lblk 6 |
| 921 | // android.bg-1668 [000] ...1 174991.234187: ext4_es_lookup_extent_exit: dev 259,32 ino 2883605 found 1 [6/4294967289) 576460752303423487 H0x10 |
| 922 | // android.bg-1668 [000] ...2 174991.234191: ext4_da_reserve_space: dev 259,32 ino 2883605 mode 0100600 i_blocks 8 reserved_data_blocks 7 reserved_meta_blocks 0 |
| 923 | // android.bg-1668 [000] ...1 174991.234193: ext4_es_insert_extent: dev 259,32 ino 2883605 es [6/1) mapped 576460752303423487 status D |
| 924 | // android.bg-1668 [000] ...1 174991.234203: ext4_da_write_end: dev 259,32 ino 2883605 pos 24576 len 2968 copied 2968 |
| 925 | // android.bg-1668 [000] ...1 174991.234209: ext4_journal_start: dev 259,32 blocks, 2 rsv_blocks, 0 caller ext4_dirty_inode+0x30/0x68 |
| 926 | // android.bg-1668 [000] ...1 174991.234211: ext4_mark_inode_dirty: dev 259,32 ino 2883605 caller ext4_dirty_inode+0x48/0x68 |
| 927 | // android.bg-1668 [000] ...1 174991.234262: ext4_sync_file_enter: dev 259,32 ino 2883605 parent 2883592 datasync 0 |
| 928 | // android.bg-1668 [000] ...1 174991.234270: ext4_writepages: dev 259,32 ino 2883605 nr_to_write 9223372036854775807 pages_skipped 0 range_start 0 range_end 9223372036854775807 sync_mode 1 for_kupdate 0 range_cyclic 0 writeback_index 0 |
| 929 | // android.bg-1668 [000] ...1 174991.234287: ext4_journal_start: dev 259,32 blocks, 10 rsv_blocks, 0 caller ext4_writepages+0x6a4/0x119c |
| 930 | // android.bg-1668 [000] ...1 174991.234294: ext4_da_write_pages: dev 259,32 ino 2883605 first_page 0 nr_to_write 9223372036854775807 sync_mode 1 |
| 931 | // android.bg-1668 [000] ...1 174991.234319: ext4_da_write_pages_extent: dev 259,32 ino 2883605 lblk 0 len 7 flags 0x200 |
| 932 | // android.bg-1668 [000] ...1 174991.234322: ext4_es_lookup_extent_enter: dev 259,32 ino 2883605 lblk 0 |
| 933 | // android.bg-1668 [000] ...1 174991.234324: ext4_es_lookup_extent_exit: dev 259,32 ino 2883605 found 1 [0/7) 576460752303423487 D0x10 |
| 934 | // android.bg-1668 [000] ...1 174991.234328: ext4_ext_map_blocks_enter: dev 259,32 ino 2883605 lblk 0 len 7 flags CREATE|DELALLOC|METADATA_NOFAIL |
| 935 | // android.bg-1668 [000] ...1 174991.234341: ext4_request_blocks: dev 259,32 ino 2883605 flags HINT_DATA|DELALLOC_RESV|USE_RESV len 7 lblk 0 goal 11567104 lleft 0 lright 0 pleft 0 pright 0 |
| 936 | // android.bg-1668 [000] ...1 174991.234394: ext4_mballoc_prealloc: dev 259,32 inode 2883605 orig 353/0/7@0 result 65/25551/7@0 |
| 937 | // android.bg-1668 [000] ...1 174991.234400: ext4_allocate_blocks: dev 259,32 ino 2883605 flags HINT_DATA|DELALLOC_RESV|USE_RESV len 7 block 2155471 lblk 0 goal 11567104 lleft 0 lright 0 pleft 0 pright 0 |
| 938 | // android.bg-1668 [000] ...1 174991.234409: ext4_mark_inode_dirty: dev 259,32 ino 2883605 caller __ext4_ext_dirty+0x104/0x170 |
| 939 | // android.bg-1668 [000] ...1 174991.234420: ext4_get_reserved_cluster_alloc: dev 259,32 ino 2883605 lblk 0 len 7 |
| 940 | // android.bg-1668 [000] ...2 174991.234426: ext4_da_update_reserve_space: dev 259,32 ino 2883605 mode 0100600 i_blocks 8 used_blocks 7 reserved_data_blocks 7 reserved_meta_blocks 0 allocated_meta_blocks 0 quota_claim 1 |
| 941 | // android.bg-1668 [000] ...1 174991.234434: ext4_journal_start: dev 259,32 blocks, 1 rsv_blocks, 0 caller ext4_mark_dquot_dirty+0x80/0xd4 |
| 942 | // android.bg-1668 [000] ...1 174991.234441: ext4_es_lookup_extent_enter: dev 259,32 ino 3 lblk 1 |
| 943 | // android.bg-1668 [000] ...1 174991.234445: ext4_es_lookup_extent_exit: dev 259,32 ino 3 found 1 [0/2) 9255 W0x10 |
| 944 | // android.bg-1668 [000] ...1 174991.234456: ext4_journal_start: dev 259,32 blocks, 1 rsv_blocks, 0 caller ext4_mark_dquot_dirty+0x80/0xd4 |
| 945 | // android.bg-1668 [000] ...1 174991.234460: ext4_es_lookup_extent_enter: dev 259,32 ino 4 lblk 1 |
| 946 | // android.bg-1668 [000] ...1 174991.234463: ext4_es_lookup_extent_exit: dev 259,32 ino 4 found 1 [0/2) 9257 W0x10 |
| 947 | // android.bg-1668 [000] ...1 174991.234471: ext4_journal_start: dev 259,32 blocks, 2 rsv_blocks, 0 caller ext4_dirty_inode+0x30/0x68 |
| 948 | // android.bg-1668 [000] ...1 174991.234474: ext4_mark_inode_dirty: dev 259,32 ino 2883605 caller ext4_dirty_inode+0x48/0x68 |
| 949 | // android.bg-1668 [000] ...1 174991.234481: ext4_ext_map_blocks_exit: dev 259,32 ino 2883605 flags CREATE|DELALLOC|METADATA_NOFAIL lblk 0 pblk 2155471 len 7 mflags NM ret 7 |
| 950 | // android.bg-1668 [000] ...1 174991.234484: ext4_es_insert_extent: dev 259,32 ino 2883605 es [0/7) mapped 2155471 status W |
| 951 | // android.bg-1668 [000] ...1 174991.234547: ext4_mark_inode_dirty: dev 259,32 ino 2883605 caller ext4_writepages+0xdc0/0x119c |
| 952 | // android.bg-1668 [000] ...1 174991.234604: ext4_journal_start: dev 259,32 blocks, 10 rsv_blocks, 0 caller ext4_writepages+0x6a4/0x119c |
| 953 | // android.bg-1668 [000] ...1 174991.234609: ext4_da_write_pages: dev 259,32 ino 2883605 first_page 7 nr_to_write 9223372036854775800 sync_mode 1 |
| 954 | // android.bg-1668 [000] ...1 174991.234876: ext4_writepages_result: dev 259,32 ino 2883605 ret 0 pages_written 7 pages_skipped 0 sync_mode 1 writeback_index 7 |
| 955 | // Profile Saver-5504 [000] ...1 175002.711928: ext4_discard_preallocations: dev 259,32 ino 1311176 |
| 956 | // Profile Saver-5504 [000] ...1 175002.714165: ext4_begin_ordered_truncate: dev 259,32 ino 1311176 new_size 0 |
| 957 | // Profile Saver-5504 [000] ...1 175002.714172: ext4_journal_start: dev 259,32 blocks, 3 rsv_blocks, 0 caller ext4_setattr+0x5b4/0x788 |
| 958 | // Profile Saver-5504 [000] ...1 175002.714218: ext4_mark_inode_dirty: dev 259,32 ino 1311176 caller ext4_setattr+0x65c/0x788 |
| 959 | // Profile Saver-5504 [000] ...1 175002.714277: ext4_invalidatepage: dev 259,32 ino 1311176 page_index 0 offset 0 length 4096 |
| 960 | // Profile Saver-5504 [000] ...1 175002.714281: ext4_releasepage: dev 259,32 ino 1311176 page_index 0 |
| 961 | // Profile Saver-5504 [000] ...1 175002.714295: ext4_invalidatepage: dev 259,32 ino 1311176 page_index 1 offset 0 length 4096 |
| 962 | // Profile Saver-5504 [000] ...1 175002.714296: ext4_releasepage: dev 259,32 ino 1311176 page_index 1 |
| 963 | // Profile Saver-5504 [000] ...1 175002.714315: ext4_truncate_enter: dev 259,32 ino 1311176 blocks 24 |
| 964 | // Profile Saver-5504 [000] ...1 175002.714318: ext4_journal_start: dev 259,32 blocks, 10 rsv_blocks, 0 caller ext4_truncate+0x258/0x4b8 |
| 965 | // Profile Saver-5504 [000] ...1 175002.714322: ext4_discard_preallocations: dev 259,32 ino 1311176 |
| 966 | // Profile Saver-5504 [000] ...1 175002.714324: ext4_mark_inode_dirty: dev 259,32 ino 1311176 caller ext4_ext_truncate+0x24/0xc8 |
| 967 | // Profile Saver-5504 [000] ...1 175002.714328: ext4_es_remove_extent: dev 259,32 ino 1311176 es [0/4294967295) |
| 968 | // Profile Saver-5504 [000] ...1 175002.714335: ext4_journal_start: dev 259,32 blocks, 1 rsv_blocks, 0 caller ext4_ext_remove_space+0x60/0x1180 |
| 969 | // Profile Saver-5504 [000] ...1 175002.714338: ext4_ext_remove_space: dev 259,32 ino 1311176 since 0 end 4294967294 depth 0 |
| 970 | // Profile Saver-5504 [000] ...1 175002.714347: ext4_ext_rm_leaf: dev 259,32 ino 1311176 start_lblk 0 last_extent [0(5276994), 2]partial_cluster 0 |
| 971 | // Profile Saver-5504 [000] ...1 175002.714351: ext4_remove_blocks: dev 259,32 ino 1311176 extent [0(5276994), 2]from 0 to 1 partial_cluster 0 |
| 972 | // Profile Saver-5504 [000] ...1 175002.714354: ext4_free_blocks: dev 259,32 ino 1311176 mode 0100600 block 5276994 count 2 flags 1ST_CLUSTER |
| 973 | // Profile Saver-5504 [000] ...1 175002.714365: ext4_mballoc_free: dev 259,32 inode 1311176 extent 161/1346/2 |
| 974 | // Profile Saver-5504 [000] ...1 175002.714382: ext4_journal_start: dev 259,32 blocks, 1 rsv_blocks, 0 caller ext4_mark_dquot_dirty+0x80/0xd4 |
| 975 | // Profile Saver-5504 [000] ...1 175002.714391: ext4_es_lookup_extent_enter: dev 259,32 ino 3 lblk 4 |
| 976 | // Profile Saver-5504 [000] ...1 175002.714394: ext4_es_lookup_extent_exit: dev 259,32 ino 3 found 1 [4/1) 557094 W0x10 |
| 977 | // Profile Saver-5504 [000] ...1 175002.714402: ext4_journal_start: dev 259,32 blocks, 1 rsv_blocks, 0 caller ext4_mark_dquot_dirty+0x80/0xd4 |
| 978 | // Profile Saver-5504 [000] ...1 175002.714404: ext4_es_lookup_extent_enter: dev 259,32 ino 4 lblk 8 |
| 979 | // Profile Saver-5504 [000] ...1 175002.714406: ext4_es_lookup_extent_exit: dev 259,32 ino 4 found 1 [8/3) 7376914 W0x10 |
| 980 | // Profile Saver-5504 [000] ...1 175002.714413: ext4_journal_start: dev 259,32 blocks, 2 rsv_blocks, 0 caller ext4_dirty_inode+0x30/0x68 |
| 981 | // Profile Saver-5504 [000] ...1 175002.714414: ext4_mark_inode_dirty: dev 259,32 ino 1311176 caller ext4_dirty_inode+0x48/0x68 |
| 982 | // Profile Saver-5504 [000] ...1 175002.714420: ext4_mark_inode_dirty: dev 259,32 ino 1311176 caller __ext4_ext_dirty+0x104/0x170 |
| 983 | // Profile Saver-5504 [000] ...1 175002.714423: ext4_ext_remove_space_done: dev 259,32 ino 1311176 since 0 end 4294967294 depth 0 partial 0 remaining_entries 0 |
| 984 | // Profile Saver-5504 [000] ...1 175002.714425: ext4_mark_inode_dirty: dev 259,32 ino 1311176 caller __ext4_ext_dirty+0x104/0x170 |
| 985 | // Profile Saver-5504 [000] ...1 175002.714433: ext4_mark_inode_dirty: dev 259,32 ino 1311176 caller ext4_truncate+0x3c4/0x4b8 |
| 986 | // Profile Saver-5504 [000] ...1 175002.714436: ext4_truncate_exit: dev 259,32 ino 1311176 blocks 8 |
| 987 | // Profile Saver-5504 [000] ...1 175002.714437: ext4_journal_start: dev 259,32 blocks, 2 rsv_blocks, 0 caller ext4_dirty_inode+0x30/0x68 |
| 988 | // Profile Saver-5504 [000] ...1 175002.714438: ext4_mark_inode_dirty: dev 259,32 ino 1311176 caller ext4_dirty_inode+0x48/0x68 |
| 989 | // Profile Saver-5504 [000] ...1 175002.714462: ext4_da_write_begin: dev 259,32 ino 1311176 pos 0 len 4 flags 0 |
| 990 | // Profile Saver-5504 [000] ...1 175002.714472: ext4_journal_start: dev 259,32 blocks, 1 rsv_blocks, 0 caller ext4_da_write_begin+0x3d4/0x518 |
| 991 | // Profile Saver-5504 [000] ...1 175002.714477: ext4_es_lookup_extent_enter: dev 259,32 ino 1311176 lblk 0 |
| 992 | // Profile Saver-5504 [000] ...1 175002.714477: ext4_es_lookup_extent_exit: dev 259,32 ino 1311176 found 0 [0/0) 0 |
| 993 | // Profile Saver-5504 [000] ...1 175002.714480: ext4_ext_map_blocks_enter: dev 259,32 ino 1311176 lblk 0 len 1 flags |
| 994 | // Profile Saver-5504 [000] ...1 175002.714485: ext4_es_find_delayed_extent_range_enter: dev 259,32 ino 1311176 lblk 0 |
| 995 | // Profile Saver-5504 [000] ...1 175002.714488: ext4_es_find_delayed_extent_range_exit: dev 259,32 ino 1311176 es [0/0) mapped 0 status |
| 996 | // Profile Saver-5504 [000] ...1 175002.714490: ext4_es_insert_extent: dev 259,32 ino 1311176 es [0/4294967295) mapped 576460752303423487 status H |
| 997 | // Profile Saver-5504 [000] ...1 175002.714495: ext4_ext_map_blocks_exit: dev 259,32 ino 1311176 flags lblk 0 pblk 4294967296 len 1 mflags ret 0 |
| 998 | // Profile Saver-5504 [000] ...2 175002.714501: ext4_da_reserve_space: dev 259,32 ino 1311176 mode 0100600 i_blocks 8 reserved_data_blocks 1 reserved_meta_blocks 0 |
| 999 | // Profile Saver-5504 [000] ...1 175002.714505: ext4_es_insert_extent: dev 259,32 ino 1311176 es [0/1) mapped 576460752303423487 status D |
| 1000 | // Profile Saver-5504 [000] ...1 175002.714513: ext4_da_write_end: dev 259,32 ino 1311176 pos 0 len 4 copied 4 |
| 1001 | // Profile Saver-5504 [000] ...1 175002.714519: ext4_journal_start: dev 259,32 blocks, 2 rsv_blocks, 0 caller ext4_dirty_inode+0x30/0x68 |
| 1002 | // Profile Saver-5504 [000] ...1 175002.714520: ext4_mark_inode_dirty: dev 259,32 ino 1311176 caller ext4_dirty_inode+0x48/0x68 |
| 1003 | // Profile Saver-5504 [000] ...1 175002.714527: ext4_da_write_begin: dev 259,32 ino 1311176 pos 4 len 4 flags 0 |
| 1004 | // Profile Saver-5504 [000] ...1 175002.714529: ext4_journal_start: dev 259,32 blocks, 1 rsv_blocks, 0 caller ext4_da_write_begin+0x3d4/0x518 |
| 1005 | // Profile Saver-5504 [000] ...1 175002.714531: ext4_da_write_end: dev 259,32 ino 1311176 pos 4 len 4 copied 4 |
| 1006 | // Profile Saver-5504 [000] ...1 175002.714532: ext4_journal_start: dev 259,32 blocks, 2 rsv_blocks, 0 caller ext4_dirty_inode+0x30/0x68 |
| 1007 | // Profile Saver-5504 [000] ...1 175002.714532: ext4_mark_inode_dirty: dev 259,32 ino 1311176 caller ext4_dirty_inode+0x48/0x68 |
| 1008 | // Profile Saver-5504 [000] ...1 175002.715313: ext4_journal_start: dev 259,32 blocks, 2 rsv_blocks, 0 caller ext4_dirty_inode+0x30/0x68 |
| 1009 | // Profile Saver-5504 [000] ...1 175002.715322: ext4_mark_inode_dirty: dev 259,32 ino 1311176 caller ext4_dirty_inode+0x48/0x68 |
| 1010 | // Profile Saver-5504 [000] ...1 175002.723849: ext4_da_write_begin: dev 259,32 ino 1311176 pos 8 len 5 flags 0 |
| 1011 | // Profile Saver-5504 [000] ...1 175002.723862: ext4_journal_start: dev 259,32 blocks, 1 rsv_blocks, 0 caller ext4_da_write_begin+0x3d4/0x518 |
| 1012 | // Profile Saver-5504 [000] ...1 175002.723873: ext4_da_write_end: dev 259,32 ino 1311176 pos 8 len 5 copied 5 |
| 1013 | // Profile Saver-5504 [000] ...1 175002.723877: ext4_journal_start: dev 259,32 blocks, 2 rsv_blocks, 0 caller ext4_dirty_inode+0x30/0x68 |
| 1014 | // Profile Saver-5504 [000] ...1 175002.723879: ext4_mark_inode_dirty: dev 259,32 ino 1311176 caller ext4_dirty_inode+0x48/0x68 |
| 1015 | // Profile Saver-5504 [000] ...1 175002.726857: ext4_journal_start: dev 259,32 blocks, 2 rsv_blocks, 0 caller ext4_dirty_inode+0x30/0x68 |
| 1016 | // Profile Saver-5504 [000] ...1 175002.726867: ext4_mark_inode_dirty: dev 259,32 ino 1311176 caller ext4_dirty_inode+0x48/0x68 |
| 1017 | // Profile Saver-5504 [000] ...1 175002.726881: ext4_da_write_begin: dev 259,32 ino 1311176 pos 13 len 4 flags 0 |
| 1018 | // Profile Saver-5504 [000] ...1 175002.726883: ext4_journal_start: dev 259,32 blocks, 1 rsv_blocks, 0 caller ext4_da_write_begin+0x3d4/0x518 |
| 1019 | // Profile Saver-5504 [000] ...1 175002.726890: ext4_da_write_end: dev 259,32 ino 1311176 pos 13 len 4 copied 4 |
| 1020 | // Profile Saver-5504 [000] ...1 175002.726892: ext4_journal_start: dev 259,32 blocks, 2 rsv_blocks, 0 caller ext4_dirty_inode+0x30/0x68 |
| 1021 | // Profile Saver-5504 [000] ...1 175002.726892: ext4_mark_inode_dirty: dev 259,32 ino 1311176 caller ext4_dirty_inode+0x48/0x68 |
| 1022 | // Profile Saver-5504 [000] ...1 175002.726900: ext4_da_write_begin: dev 259,32 ino 1311176 pos 17 len 4079 flags 0 |
| 1023 | // Profile Saver-5504 [000] ...1 175002.726901: ext4_journal_start: dev 259,32 blocks, 1 rsv_blocks, 0 caller ext4_da_write_begin+0x3d4/0x518 |
| 1024 | // Profile Saver-5504 [000] ...1 175002.726904: ext4_da_write_end: dev 259,32 ino 1311176 pos 17 len 4079 copied 4079 |
| 1025 | // Profile Saver-5504 [000] ...1 175002.726905: ext4_journal_start: dev 259,32 blocks, 2 rsv_blocks, 0 caller ext4_dirty_inode+0x30/0x68 |
| 1026 | // Profile Saver-5504 [000] ...1 175002.726906: ext4_mark_inode_dirty: dev 259,32 ino 1311176 caller ext4_dirty_inode+0x48/0x68 |
| 1027 | // Profile Saver-5504 [000] ...1 175002.726908: ext4_da_write_begin: dev 259,32 ino 1311176 pos 4096 len 2780 flags 0 |
| 1028 | // Profile Saver-5504 [000] ...1 175002.726916: ext4_journal_start: dev 259,32 blocks, 1 rsv_blocks, 0 caller ext4_da_write_begin+0x3d4/0x518 |
| 1029 | // Profile Saver-5504 [000] ...1 175002.726921: ext4_es_lookup_extent_enter: dev 259,32 ino 1311176 lblk 1 |
| 1030 | // Profile Saver-5504 [000] ...1 175002.726924: ext4_es_lookup_extent_exit: dev 259,32 ino 1311176 found 1 [1/4294967294) 576460752303423487 H0x10 |
| 1031 | // Profile Saver-5504 [000] ...2 175002.726931: ext4_da_reserve_space: dev 259,32 ino 1311176 mode 0100600 i_blocks 8 reserved_data_blocks 2 reserved_meta_blocks 0 |
| 1032 | // Profile Saver-5504 [000] ...1 175002.726933: ext4_es_insert_extent: dev 259,32 ino 1311176 es [1/1) mapped 576460752303423487 status D |
| 1033 | // Profile Saver-5504 [000] ...1 175002.726940: ext4_da_write_end: dev 259,32 ino 1311176 pos 4096 len 2780 copied 2780 |
| 1034 | // Profile Saver-5504 [000] ...1 175002.726941: ext4_journal_start: dev 259,32 blocks, 2 rsv_blocks, 0 caller ext4_dirty_inode+0x30/0x68 |
| 1035 | // Profile Saver-5504 [000] ...1 175002.726942: ext4_mark_inode_dirty: dev 259,32 ino 1311176 caller ext4_dirty_inode+0x48/0x68 |
| 1036 | // d.process.acor-27885 [000] ...1 175018.227675: ext4_journal_start: dev 259,32 blocks, 2 rsv_blocks, 0 caller ext4_dirty_inode+0x30/0x68 |
| 1037 | // d.process.acor-27885 [000] ...1 175018.227699: ext4_mark_inode_dirty: dev 259,32 ino 3278189 caller ext4_dirty_inode+0x48/0x68 |
| 1038 | // d.process.acor-27885 [000] ...1 175018.227839: ext4_sync_file_enter: dev 259,32 ino 3278183 parent 3277001 datasync 1 |
| 1039 | // d.process.acor-27885 [000] ...1 175018.227847: ext4_writepages: dev 259,32 ino 3278183 nr_to_write 9223372036854775807 pages_skipped 0 range_start 0 range_end 9223372036854775807 sync_mode 1 for_kupdate 0 range_cyclic 0 writeback_index 2 |
| 1040 | // d.process.acor-27885 [000] ...1 175018.227852: ext4_writepages_result: dev 259,32 ino 3278183 ret 0 pages_written 0 pages_skipped 0 sync_mode 1 writeback_index 2 |
| 1041 | // clang-format on |
Hector Dearman | bc8368e | 2018-01-25 17:34:11 +0000 | [diff] [blame] | 1042 | |
Primiano Tucci | 3cbb10a | 2018-04-10 17:52:40 +0100 | [diff] [blame] | 1043 | static ExamplePage g_full_page_sched_switch{ |
Hector Dearman | bc8368e | 2018-01-25 17:34:11 +0000 | [diff] [blame] | 1044 | "synthetic", |
| 1045 | R"( |
| 1046 | 00000000: 31f2 7622 1a00 0000 b40f 0000 0000 0000 1.v"............ |
| 1047 | 00000010: 1e00 0000 0000 0000 1000 0000 2f00 0103 ............/... |
| 1048 | 00000020: 140d 0000 4a69 7420 7468 7265 6164 2070 ....Jit thread p |
| 1049 | 00000030: 6f6f 6c00 140d 0000 8100 0000 0008 0000 ool............. |
| 1050 | 00000040: 0000 0000 4576 656e 7454 6872 6561 6400 ....EventThread. |
| 1051 | 00000050: 6572 0000 7002 0000 6100 0000 f057 0e00 er..p...a....W.. |
| 1052 | 00000060: 2f00 0103 7002 0000 4576 656e 7454 6872 /...p...EventThr |
| 1053 | 00000070: 6561 6400 6572 0000 7002 0000 6100 0000 ead.er..p...a... |
| 1054 | 00000080: 0100 0000 0000 0000 4a69 7420 7468 7265 ........Jit thre |
| 1055 | 00000090: 6164 2070 6f6f 6c00 140d 0000 8100 0000 ad pool......... |
Anna Zappone | 74b1f2a | 2018-02-16 15:51:49 +0000 | [diff] [blame] | 1056 | 000000a0: 50c2 0910 2f00 0103 140d 0000 4a69 7420 P.../.......Jit |
Hector Dearman | bc8368e | 2018-01-25 17:34:11 +0000 | [diff] [blame] | 1057 | 000000b0: 7468 7265 6164 2070 6f6f 6c00 140d 0000 thread pool..... |
| 1058 | 000000c0: 8100 0000 0100 0000 0000 0000 7377 6170 ............swap |
| 1059 | 000000d0: 7065 722f 3000 0000 0000 0000 0000 0000 per/0........... |
| 1060 | 000000e0: 7800 0000 901a c80e 2f00 0103 0000 0000 x......./....... |
| 1061 | 000000f0: 7377 6170 7065 722f 3000 0000 0000 0000 swapper/0....... |
| 1062 | 00000100: 0000 0000 7800 0000 0000 0000 0000 0000 ....x........... |
| 1063 | 00000110: 4469 7370 5379 6e63 0069 6e67 6572 0000 DispSync.inger.. |
| 1064 | 00000120: 6f02 0000 6100 0000 1064 1e00 2f00 0103 o...a....d../... |
| 1065 | 00000130: 6f02 0000 4469 7370 5379 6e63 0069 6e67 o...DispSync.ing |
| 1066 | 00000140: 6572 0000 6f02 0000 6100 0000 0100 0000 er..o...a....... |
| 1067 | 00000150: 0000 0000 7377 6170 7065 722f 3000 0000 ....swapper/0... |
| 1068 | 00000160: 0000 0000 0000 0000 7800 0000 9074 8600 ........x....t.. |
| 1069 | 00000170: 2f00 0103 0000 0000 7377 6170 7065 722f /.......swapper/ |
| 1070 | 00000180: 3000 0000 0000 0000 0000 0000 7800 0000 0...........x... |
| 1071 | 00000190: 0000 0000 0000 0000 4576 656e 7454 6872 ........EventThr |
| 1072 | 000001a0: 6561 6400 6572 0000 7002 0000 6100 0000 ead.er..p...a... |
| 1073 | 000001b0: d071 0b00 2f00 0103 7002 0000 4576 656e .q../...p...Even |
| 1074 | 000001c0: 7454 6872 6561 6400 6572 0000 7002 0000 tThread.er..p... |
| 1075 | 000001d0: 6100 0000 0100 0000 0000 0000 7377 6170 a...........swap |
| 1076 | 000001e0: 7065 722f 3000 0000 0000 0000 0000 0000 per/0........... |
| 1077 | 000001f0: 7800 0000 10cd 4504 2f00 0103 0000 0000 x.....E./....... |
| 1078 | 00000200: 7377 6170 7065 722f 3000 0000 0000 0000 swapper/0....... |
| 1079 | 00000210: 0000 0000 7800 0000 0000 0000 0000 0000 ....x........... |
| 1080 | 00000220: 7375 676f 763a 3000 0000 0000 0000 0000 sugov:0......... |
| 1081 | 00000230: 3802 0000 3100 0000 30d6 1300 2f00 0103 8...1...0.../... |
| 1082 | 00000240: 3802 0000 7375 676f 763a 3000 0000 0000 8...sugov:0..... |
| 1083 | 00000250: 0000 0000 3802 0000 3100 0000 0100 0000 ....8...1....... |
| 1084 | 00000260: 0000 0000 7377 6170 7065 722f 3000 0000 ....swapper/0... |
| 1085 | 00000270: 0000 0000 0000 0000 7800 0000 3049 a202 ........x...0I.. |
| 1086 | 00000280: 2f00 0103 0000 0000 7377 6170 7065 722f /.......swapper/ |
| 1087 | 00000290: 3000 0000 0000 0000 0000 0000 7800 0000 0...........x... |
| 1088 | 000002a0: 0000 0000 0000 0000 4469 7370 5379 6e63 ........DispSync |
| 1089 | 000002b0: 0069 6e67 6572 0000 6f02 0000 6100 0000 .inger..o...a... |
| 1090 | 000002c0: d07a 1000 2f00 0103 6f02 0000 4469 7370 .z../...o...Disp |
| 1091 | 000002d0: 5379 6e63 0069 6e67 6572 0000 6f02 0000 Sync.inger..o... |
| 1092 | 000002e0: 6100 0000 0100 0000 0000 0000 7377 6170 a...........swap |
| 1093 | 000002f0: 7065 722f 3000 0000 0000 0000 0000 0000 per/0........... |
| 1094 | 00000300: 7800 0000 d085 1100 2f00 0103 0000 0000 x......./....... |
| 1095 | 00000310: 7377 6170 7065 722f 3000 0000 0000 0000 swapper/0....... |
| 1096 | 00000320: 0000 0000 7800 0000 0000 0000 0000 0000 ....x........... |
| 1097 | 00000330: 7375 7266 6163 6566 6c69 6e67 6572 0000 surfaceflinger.. |
| 1098 | 00000340: 4b02 0000 6200 0000 907a f000 2f00 0103 K...b....z../... |
| 1099 | 00000350: 4b02 0000 7375 7266 6163 6566 6c69 6e67 K...surfacefling |
| 1100 | 00000360: 6572 0000 4b02 0000 6200 0000 0100 0000 er..K...b....... |
| 1101 | 00000370: 0000 0000 7377 6170 7065 722f 3000 0000 ....swapper/0... |
| 1102 | 00000380: 0000 0000 0000 0000 7800 0000 305a 6400 ........x...0Zd. |
| 1103 | 00000390: 2f00 0103 0000 0000 7377 6170 7065 722f /.......swapper/ |
| 1104 | 000003a0: 3000 0000 0000 0000 0000 0000 7800 0000 0...........x... |
| 1105 | 000003b0: 0000 0000 0000 0000 6d64 7373 5f66 6230 ........mdss_fb0 |
| 1106 | 000003c0: 0000 0000 0000 0000 5714 0000 5300 0000 ........W...S... |
| 1107 | 000003d0: 10b1 9e03 2f00 0103 5714 0000 6d64 7373 ..../...W...mdss |
| 1108 | 000003e0: 5f66 6230 0000 0000 0000 0000 5714 0000 _fb0........W... |
| 1109 | 000003f0: 5300 0000 0200 0000 0000 0000 6b73 6f66 S...........ksof |
| 1110 | 00000400: 7469 7271 642f 3000 0000 0000 0300 0000 tirqd/0......... |
| 1111 | 00000410: 7800 0000 90bb 9900 2f00 0103 0300 0000 x......./....... |
| 1112 | 00000420: 6b73 6f66 7469 7271 642f 3000 0000 0000 ksoftirqd/0..... |
| 1113 | 00000430: 0300 0000 7800 0000 0100 0000 0000 0000 ....x........... |
| 1114 | 00000440: 7377 6170 7065 722f 3000 0000 0000 0000 swapper/0....... |
| 1115 | 00000450: 0000 0000 7800 0000 701e 5305 2f00 0103 ....x...p.S./... |
| 1116 | 00000460: 0000 0000 7377 6170 7065 722f 3000 0000 ....swapper/0... |
| 1117 | 00000470: 0000 0000 0000 0000 7800 0000 0000 0000 ........x....... |
| 1118 | 00000480: 0000 0000 6b77 6f72 6b65 722f 7531 363a ....kworker/u16: |
| 1119 | 00000490: 3600 0000 6401 0000 7800 0000 90a1 2900 6...d...x.....). |
| 1120 | 000004a0: 2f00 0103 6401 0000 6b77 6f72 6b65 722f /...d...kworker/ |
| 1121 | 000004b0: 7531 363a 3600 0000 6401 0000 7800 0000 u16:6...d...x... |
| 1122 | 000004c0: 0200 0000 0000 0000 7377 6170 7065 722f ........swapper/ |
| 1123 | 000004d0: 3000 0000 0000 0000 0000 0000 7800 0000 0...........x... |
| 1124 | 000004e0: b0e5 4f04 2f00 0103 0000 0000 7377 6170 ..O./.......swap |
| 1125 | 000004f0: 7065 722f 3000 0000 0000 0000 0000 0000 per/0........... |
| 1126 | 00000500: 7800 0000 0000 0000 0000 0000 4269 6e64 x...........Bind |
| 1127 | 00000510: 6572 3a32 3136 385f 3135 0000 e614 0000 er:2168_15...... |
| 1128 | 00000520: 7800 0000 b0bd 7c00 2f00 0103 e614 0000 x.....|./....... |
| 1129 | 00000530: 4269 6e64 6572 3a32 3136 385f 3135 0000 Binder:2168_15.. |
| 1130 | 00000540: e614 0000 7800 0000 0100 0000 0000 0000 ....x........... |
| 1131 | 00000550: 7377 6170 7065 722f 3000 0000 0000 0000 swapper/0....... |
| 1132 | 00000560: 0000 0000 7800 0000 d0bd 7e01 2f00 0103 ....x.....~./... |
| 1133 | 00000570: 0000 0000 7377 6170 7065 722f 3000 0000 ....swapper/0... |
| 1134 | 00000580: 0000 0000 0000 0000 7800 0000 0000 0000 ........x....... |
| 1135 | 00000590: 0000 0000 6b77 6f72 6b65 722f 7531 363a ....kworker/u16: |
| 1136 | 000005a0: 3900 0000 e204 0000 7800 0000 7016 0800 9.......x...p... |
| 1137 | 000005b0: 2f00 0103 e204 0000 6b77 6f72 6b65 722f /.......kworker/ |
| 1138 | 000005c0: 7531 363a 3900 0000 e204 0000 7800 0000 u16:9.......x... |
| 1139 | 000005d0: 0100 0000 0000 0000 7377 6170 7065 722f ........swapper/ |
| 1140 | 000005e0: 3000 0000 0000 0000 0000 0000 7800 0000 0...........x... |
| 1141 | 000005f0: 1004 5200 2f00 0103 0000 0000 7377 6170 ..R./.......swap |
| 1142 | 00000600: 7065 722f 3000 0000 0000 0000 0000 0000 per/0........... |
| 1143 | 00000610: 7800 0000 0000 0000 0000 0000 6b77 6f72 x...........kwor |
| 1144 | 00000620: 6b65 722f 7531 363a 3900 0000 e204 0000 ker/u16:9....... |
| 1145 | 00000630: 7800 0000 d0db 0700 2f00 0103 e204 0000 x......./....... |
| 1146 | 00000640: 6b77 6f72 6b65 722f 7531 363a 3900 0000 kworker/u16:9... |
| 1147 | 00000650: e204 0000 7800 0000 0100 0000 0000 0000 ....x........... |
| 1148 | 00000660: 7377 6170 7065 722f 3000 0000 0000 0000 swapper/0....... |
| 1149 | 00000670: 0000 0000 7800 0000 b0a2 8c00 2f00 0103 ....x......./... |
| 1150 | 00000680: 0000 0000 7377 6170 7065 722f 3000 0000 ....swapper/0... |
| 1151 | 00000690: 0000 0000 0000 0000 7800 0000 0000 0000 ........x....... |
| 1152 | 000006a0: 0000 0000 6b77 6f72 6b65 722f 7531 363a ....kworker/u16: |
| 1153 | 000006b0: 3900 0000 e204 0000 7800 0000 d02b 0400 9.......x....+.. |
| 1154 | 000006c0: 2f00 0103 e204 0000 6b77 6f72 6b65 722f /.......kworker/ |
| 1155 | 000006d0: 7531 363a 3900 0000 e204 0000 7800 0000 u16:9.......x... |
| 1156 | 000006e0: 0100 0000 0000 0000 7377 6170 7065 722f ........swapper/ |
| 1157 | 000006f0: 3000 0000 0000 0000 0000 0000 7800 0000 0...........x... |
| 1158 | 00000700: d064 ef05 2f00 0103 0000 0000 7377 6170 .d../.......swap |
| 1159 | 00000710: 7065 722f 3000 0000 0000 0000 0000 0000 per/0........... |
| 1160 | 00000720: 7800 0000 0000 0000 0000 0000 4469 7370 x...........Disp |
| 1161 | 00000730: 5379 6e63 0069 6e67 6572 0000 6f02 0000 Sync.inger..o... |
| 1162 | 00000740: 6100 0000 f07d 1b00 2f00 0103 6f02 0000 a....}../...o... |
| 1163 | 00000750: 4469 7370 5379 6e63 0069 6e67 6572 0000 DispSync.inger.. |
| 1164 | 00000760: 6f02 0000 6100 0000 0100 0000 0000 0000 o...a........... |
| 1165 | 00000770: 6b73 6f66 7469 7271 642f 3000 0000 0000 ksoftirqd/0..... |
| 1166 | 00000780: 0300 0000 7800 0000 304c 2000 2f00 0103 ....x...0L ./... |
| 1167 | 00000790: 0300 0000 6b73 6f66 7469 7271 642f 3000 ....ksoftirqd/0. |
| 1168 | 000007a0: 0000 0000 0300 0000 7800 0000 0100 0000 ........x....... |
| 1169 | 000007b0: 0000 0000 6465 7832 6f61 7400 3935 5f33 ....dex2oat.95_3 |
| 1170 | 000007c0: 0000 0000 341f 0000 8200 0000 700b 0700 ....4.......p... |
| 1171 | 000007d0: 2f00 0103 341f 0000 6465 7832 6f61 7400 /...4...dex2oat. |
| 1172 | 000007e0: 3935 5f33 0000 0000 341f 0000 8200 0000 95_3....4....... |
| 1173 | 000007f0: 0000 0000 0000 0000 7375 676f 763a 3000 ........sugov:0. |
| 1174 | 00000800: 0000 0000 0000 0000 3802 0000 3100 0000 ........8...1... |
| 1175 | 00000810: 50b0 0600 2f00 0103 3802 0000 7375 676f P.../...8...sugo |
| 1176 | 00000820: 763a 3000 0000 0000 0000 0000 3802 0000 v:0.........8... |
| 1177 | 00000830: 3100 0000 0008 0000 0000 0000 6d69 6772 1...........migr |
| 1178 | 00000840: 6174 696f 6e2f 3000 0000 0000 0d00 0000 ation/0......... |
| 1179 | 00000850: 0000 0000 d09c 0600 2f00 0103 0d00 0000 ......../....... |
| 1180 | 00000860: 6d69 6772 6174 696f 6e2f 3000 0000 0000 migration/0..... |
| 1181 | 00000870: 0d00 0000 0000 0000 0100 0000 0000 0000 ................ |
| 1182 | 00000880: 7375 676f 763a 3000 0000 0000 0000 0000 sugov:0......... |
| 1183 | 00000890: 3802 0000 3100 0000 7061 1900 2f00 0103 8...1...pa../... |
| 1184 | 000008a0: 3802 0000 7375 676f 763a 3000 0000 0000 8...sugov:0..... |
| 1185 | 000008b0: 0000 0000 3802 0000 3100 0000 0100 0000 ....8...1....... |
| 1186 | 000008c0: 0000 0000 6465 7832 6f61 7400 3935 5f33 ....dex2oat.95_3 |
| 1187 | 000008d0: 0000 0000 341f 0000 8200 0000 f03c 5600 ....4........<V. |
| 1188 | 000008e0: 2f00 0103 341f 0000 6465 7832 6f61 7400 /...4...dex2oat. |
| 1189 | 000008f0: 3935 5f33 0000 0000 341f 0000 8200 0000 95_3....4....... |
| 1190 | 00000900: 0200 0000 0000 0000 7377 6170 7065 722f ........swapper/ |
| 1191 | 00000910: 3000 0000 0000 0000 0000 0000 7800 0000 0...........x... |
| 1192 | 00000920: 5013 c400 2f00 0103 0000 0000 7377 6170 P.../.......swap |
| 1193 | 00000930: 7065 722f 3000 0000 0000 0000 0000 0000 per/0........... |
| 1194 | 00000940: 7800 0000 0000 0000 0000 0000 616e 6472 x...........andr |
| 1195 | 00000950: 6f69 642e 6861 7264 7761 7200 d20a 0000 oid.hardwar..... |
| 1196 | 00000960: 7800 0000 30c9 1300 2f00 0103 d20a 0000 x...0.../....... |
| 1197 | 00000970: 616e 6472 6f69 642e 6861 7264 7761 7200 android.hardwar. |
| 1198 | 00000980: d20a 0000 7800 0000 0100 0000 0000 0000 ....x........... |
| 1199 | 00000990: 7377 6170 7065 722f 3000 0000 0000 0000 swapper/0....... |
| 1200 | 000009a0: 0000 0000 7800 0000 7097 c000 2f00 0103 ....x...p.../... |
| 1201 | 000009b0: 0000 0000 7377 6170 7065 722f 3000 0000 ....swapper/0... |
| 1202 | 000009c0: 0000 0000 0000 0000 7800 0000 0000 0000 ........x....... |
| 1203 | 000009d0: 0000 0000 616e 6472 6f69 642e 6861 7264 ....android.hard |
| 1204 | 000009e0: 7761 7200 d20a 0000 7800 0000 305c 0c00 war.....x...0\.. |
| 1205 | 000009f0: 2f00 0103 d20a 0000 616e 6472 6f69 642e /.......android. |
| 1206 | 00000a00: 6861 7264 7761 7200 d20a 0000 7800 0000 hardwar.....x... |
| 1207 | 00000a10: 0100 0000 0000 0000 7377 6170 7065 722f ........swapper/ |
| 1208 | 00000a20: 3000 0000 0000 0000 0000 0000 7800 0000 0...........x... |
| 1209 | 00000a30: d0aa 1401 2f00 0103 0000 0000 7377 6170 ..../.......swap |
| 1210 | 00000a40: 7065 722f 3000 0000 0000 0000 0000 0000 per/0........... |
| 1211 | 00000a50: 7800 0000 0000 0000 0000 0000 616e 6472 x...........andr |
| 1212 | 00000a60: 6f69 642e 6861 7264 7761 7200 d20a 0000 oid.hardwar..... |
| 1213 | 00000a70: 7800 0000 903b 0c00 2f00 0103 d20a 0000 x....;../....... |
| 1214 | 00000a80: 616e 6472 6f69 642e 6861 7264 7761 7200 android.hardwar. |
| 1215 | 00000a90: d20a 0000 7800 0000 0100 0000 0000 0000 ....x........... |
| 1216 | 00000aa0: 7377 6170 7065 722f 3000 0000 0000 0000 swapper/0....... |
| 1217 | 00000ab0: 0000 0000 7800 0000 f024 5401 2f00 0103 ....x....$T./... |
| 1218 | 00000ac0: 0000 0000 7377 6170 7065 722f 3000 0000 ....swapper/0... |
| 1219 | 00000ad0: 0000 0000 0000 0000 7800 0000 0000 0000 ........x....... |
| 1220 | 00000ae0: 0000 0000 616e 6472 6f69 642e 6861 7264 ....android.hard |
| 1221 | 00000af0: 7761 7200 d20a 0000 7800 0000 f0f3 0b00 war.....x....... |
| 1222 | 00000b00: 2f00 0103 d20a 0000 616e 6472 6f69 642e /.......android. |
| 1223 | 00000b10: 6861 7264 7761 7200 d20a 0000 7800 0000 hardwar.....x... |
| 1224 | 00000b20: 0100 0000 0000 0000 7377 6170 7065 722f ........swapper/ |
| 1225 | 00000b30: 3000 0000 0000 0000 0000 0000 7800 0000 0...........x... |
| 1226 | 00000b40: d0b5 bf02 2f00 0103 0000 0000 7377 6170 ..../.......swap |
| 1227 | 00000b50: 7065 722f 3000 0000 0000 0000 0000 0000 per/0........... |
| 1228 | 00000b60: 7800 0000 0000 0000 0000 0000 4469 7370 x...........Disp |
| 1229 | 00000b70: 5379 6e63 0069 6e67 6572 0000 6f02 0000 Sync.inger..o... |
| 1230 | 00000b80: 6100 0000 90cd 1400 2f00 0103 6f02 0000 a......./...o... |
| 1231 | 00000b90: 4469 7370 5379 6e63 0069 6e67 6572 0000 DispSync.inger.. |
| 1232 | 00000ba0: 6f02 0000 6100 0000 0100 0000 0000 0000 o...a........... |
| 1233 | 00000bb0: 7377 6170 7065 722f 3000 0000 0000 0000 swapper/0....... |
| 1234 | 00000bc0: 0000 0000 7800 0000 50a6 1100 2f00 0103 ....x...P.../... |
| 1235 | 00000bd0: 0000 0000 7377 6170 7065 722f 3000 0000 ....swapper/0... |
| 1236 | 00000be0: 0000 0000 0000 0000 7800 0000 0000 0000 ........x....... |
| 1237 | 00000bf0: 0000 0000 7375 7266 6163 6566 6c69 6e67 ....surfacefling |
| 1238 | 00000c00: 6572 0000 4b02 0000 6200 0000 b04c 4200 er..K...b....LB. |
| 1239 | 00000c10: 2f00 0103 4b02 0000 7375 7266 6163 6566 /...K...surfacef |
| 1240 | 00000c20: 6c69 6e67 6572 0000 4b02 0000 6200 0000 linger..K...b... |
| 1241 | 00000c30: 0100 0000 0000 0000 7377 6170 7065 722f ........swapper/ |
| 1242 | 00000c40: 3000 0000 0000 0000 0000 0000 7800 0000 0...........x... |
| 1243 | 00000c50: b025 060a 2f00 0103 0000 0000 7377 6170 .%../.......swap |
| 1244 | 00000c60: 7065 722f 3000 0000 0000 0000 0000 0000 per/0........... |
| 1245 | 00000c70: 7800 0000 0000 0000 0000 0000 6b77 6f72 x...........kwor |
| 1246 | 00000c80: 6b65 722f 7531 363a 3600 0000 6401 0000 ker/u16:6...d... |
| 1247 | 00000c90: 7800 0000 d0b6 0600 2f00 0103 6401 0000 x......./...d... |
| 1248 | 00000ca0: 6b77 6f72 6b65 722f 7531 363a 3600 0000 kworker/u16:6... |
| 1249 | 00000cb0: 6401 0000 7800 0000 0100 0000 0000 0000 d...x........... |
| 1250 | 00000cc0: 7377 6170 7065 722f 3000 0000 0000 0000 swapper/0....... |
| 1251 | 00000cd0: 0000 0000 7800 0000 f0a0 5800 2f00 0103 ....x.....X./... |
| 1252 | 00000ce0: 0000 0000 7377 6170 7065 722f 3000 0000 ....swapper/0... |
| 1253 | 00000cf0: 0000 0000 0000 0000 7800 0000 0000 0000 ........x....... |
| 1254 | 00000d00: 0000 0000 6b77 6f72 6b65 722f 7531 363a ....kworker/u16: |
| 1255 | 00000d10: 3600 0000 6401 0000 7800 0000 f07a 1300 6...d...x....z.. |
| 1256 | 00000d20: 2f00 0103 6401 0000 6b77 6f72 6b65 722f /...d...kworker/ |
| 1257 | 00000d30: 7531 363a 3600 0000 6401 0000 7800 0000 u16:6...d...x... |
| 1258 | 00000d40: 0100 0000 0000 0000 7377 6170 7065 722f ........swapper/ |
| 1259 | 00000d50: 3000 0000 0000 0000 0000 0000 7800 0000 0...........x... |
| 1260 | 00000d60: b080 b101 2f00 0103 0000 0000 7377 6170 ..../.......swap |
| 1261 | 00000d70: 7065 722f 3000 0000 0000 0000 0000 0000 per/0........... |
| 1262 | 00000d80: 7800 0000 0000 0000 0000 0000 6b77 6f72 x...........kwor |
| 1263 | 00000d90: 6b65 722f 7531 363a 3600 0000 6401 0000 ker/u16:6...d... |
| 1264 | 00000da0: 7800 0000 103c 1200 2f00 0103 6401 0000 x....<../...d... |
| 1265 | 00000db0: 6b77 6f72 6b65 722f 7531 363a 3600 0000 kworker/u16:6... |
| 1266 | 00000dc0: 6401 0000 7800 0000 0100 0000 0000 0000 d...x........... |
| 1267 | 00000dd0: 7377 6170 7065 722f 3000 0000 0000 0000 swapper/0....... |
| 1268 | 00000de0: 0000 0000 7800 0000 50ea 3800 2f00 0103 ....x...P.8./... |
| 1269 | 00000df0: 0000 0000 7377 6170 7065 722f 3000 0000 ....swapper/0... |
| 1270 | 00000e00: 0000 0000 0000 0000 7800 0000 0000 0000 ........x....... |
| 1271 | 00000e10: 0000 0000 6b77 6f72 6b65 722f 7531 363a ....kworker/u16: |
| 1272 | 00000e20: 3600 0000 6401 0000 7800 0000 5032 0400 6...d...x...P2.. |
| 1273 | 00000e30: 2f00 0103 6401 0000 6b77 6f72 6b65 722f /...d...kworker/ |
| 1274 | 00000e40: 7531 363a 3600 0000 6401 0000 7800 0000 u16:6...d...x... |
| 1275 | 00000e50: 0100 0000 0000 0000 7377 6170 7065 722f ........swapper/ |
| 1276 | 00000e60: 3000 0000 0000 0000 0000 0000 7800 0000 0...........x... |
| 1277 | 00000e70: 70f5 9000 2f00 0103 0000 0000 7377 6170 p.../.......swap |
| 1278 | 00000e80: 7065 722f 3000 0000 0000 0000 0000 0000 per/0........... |
| 1279 | 00000e90: 7800 0000 0000 0000 0000 0000 6b77 6f72 x...........kwor |
| 1280 | 00000ea0: 6b65 722f 7531 363a 3600 0000 6401 0000 ker/u16:6...d... |
| 1281 | 00000eb0: 7800 0000 10d7 0300 2f00 0103 6401 0000 x......./...d... |
| 1282 | 00000ec0: 6b77 6f72 6b65 722f 7531 363a 3600 0000 kworker/u16:6... |
| 1283 | 00000ed0: 6401 0000 7800 0000 0100 0000 0000 0000 d...x........... |
| 1284 | 00000ee0: 7377 6170 7065 722f 3000 0000 0000 0000 swapper/0....... |
| 1285 | 00000ef0: 0000 0000 7800 0000 907c 0900 2f00 0103 ....x....|../... |
| 1286 | 00000f00: 0000 0000 7377 6170 7065 722f 3000 0000 ....swapper/0... |
| 1287 | 00000f10: 0000 0000 0000 0000 7800 0000 0000 0000 ........x....... |
| 1288 | 00000f20: 0000 0000 6b77 6f72 6b65 722f 7531 363a ....kworker/u16: |
| 1289 | 00000f30: 3600 0000 6401 0000 7800 0000 7082 0300 6...d...x...p... |
| 1290 | 00000f40: 2f00 0103 6401 0000 6b77 6f72 6b65 722f /...d...kworker/ |
| 1291 | 00000f50: 7531 363a 3600 0000 6401 0000 7800 0000 u16:6...d...x... |
| 1292 | 00000f60: 0100 0000 0000 0000 7377 6170 7065 722f ........swapper/ |
| 1293 | 00000f70: 3000 0000 0000 0000 0000 0000 7800 0000 0...........x... |
| 1294 | 00000f80: f0ec 2100 2f00 0103 0000 0000 7377 6170 ..!./.......swap |
| 1295 | 00000f90: 7065 722f 3000 0000 0000 0000 0000 0000 per/0........... |
| 1296 | 00000fa0: 7800 0000 0000 0000 0000 0000 6b77 6f72 x...........kwor |
| 1297 | 00000fb0: 6b65 722f 7531 363a 3600 0000 6401 0000 ker/u16:6...d... |
| 1298 | 00000fc0: 7800 0000 0000 0000 0000 0000 0000 0000 x............... |
| 1299 | 00000fd0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ |
| 1300 | 00000fe0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ |
| 1301 | 00000ff0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ |
| 1302 | )", |
| 1303 | }; |
| 1304 | |
| 1305 | TEST(CpuReaderTest, ParseFullPageSchedSwitch) { |
| 1306 | const ExamplePage* test_case = &g_full_page_sched_switch; |
| 1307 | |
| 1308 | BundleProvider bundle_provider(base::kPageSize); |
| 1309 | ProtoTranslationTable* table = GetTable(test_case->name); |
| 1310 | auto page = PageFromXxd(test_case->data); |
| 1311 | |
Hector Dearman | 7391c0f | 2018-02-02 14:20:09 +0000 | [diff] [blame] | 1312 | EventFilter filter(*table, {"sched_switch"}); |
Hector Dearman | bc8368e | 2018-01-25 17:34:11 +0000 | [diff] [blame] | 1313 | |
Hector Dearman | c848803 | 2018-03-02 13:12:01 +0000 | [diff] [blame] | 1314 | FtraceMetadata metadata{}; |
Hector Dearman | 1f14b62 | 2018-02-27 11:17:37 +0000 | [diff] [blame] | 1315 | ASSERT_TRUE(CpuReader::ParsePage(page.get(), &filter, |
Hector Dearman | c848803 | 2018-03-02 13:12:01 +0000 | [diff] [blame] | 1316 | bundle_provider.writer(), table, &metadata)); |
Hector Dearman | bc8368e | 2018-01-25 17:34:11 +0000 | [diff] [blame] | 1317 | |
| 1318 | auto bundle = bundle_provider.ParseProto(); |
| 1319 | ASSERT_TRUE(bundle); |
Hector Dearman | c848803 | 2018-03-02 13:12:01 +0000 | [diff] [blame] | 1320 | EXPECT_EQ(metadata.overwrite_count, 0ul); |
Hector Dearman | bc8368e | 2018-01-25 17:34:11 +0000 | [diff] [blame] | 1321 | EXPECT_EQ(bundle->event().size(), 59); |
| 1322 | } |
| 1323 | |
Hector Dearman | 639651c | 2018-03-09 19:00:40 +0000 | [diff] [blame] | 1324 | // clang-format off |
Hector Dearman | 1f14b62 | 2018-02-27 11:17:37 +0000 | [diff] [blame] | 1325 | // # tracer: nop |
| 1326 | // # |
| 1327 | // # entries-in-buffer/entries-written: 1041/238740 #P:8 |
| 1328 | // # |
| 1329 | // # _-----=> irqs-off |
| 1330 | // # / _----=> need-resched |
| 1331 | // # | / _---=> hardirq/softirq |
| 1332 | // # || / _--=> preempt-depth |
| 1333 | // # ||| / delay |
| 1334 | // # TASK-PID CPU# |||| TIMESTAMP FUNCTION |
| 1335 | // # | | | |||| | | |
Hector Dearman | 639651c | 2018-03-09 19:00:40 +0000 | [diff] [blame] | 1336 | // android.bg-1668 [000] ...1 174991.234105: ext4_journal_start: dev 259,32 blocks, 2 rsv_blocks, 0 caller ext4_dirty_inode+0x30/0x68 |
| 1337 | // android.bg-1668 [000] ...1 174991.234108: ext4_mark_inode_dirty: dev 259,32 ino 2883605 caller ext4_dirty_inode+0x48/0x68 |
| 1338 | // android.bg-1668 [000] ...1 174991.234118: ext4_da_write_begin: dev 259,32 ino 2883605 pos 20480 len 4096 flags 0 |
| 1339 | // android.bg-1668 [000] ...1 174991.234126: ext4_journal_start: dev 259,32 blocks, 1 rsv_blocks, 0 caller ext4_da_write_begin+0x3d4/0x518 |
| 1340 | // android.bg-1668 [000] ...1 174991.234133: ext4_es_lookup_extent_enter: dev 259,32 ino 2883605 lblk 5 |
| 1341 | // android.bg-1668 [000] ...1 174991.234135: ext4_es_lookup_extent_exit: dev 259,32 ino 2883605 found 1 [5/4294967290) 576460752303423487 H0x10 |
| 1342 | // android.bg-1668 [000] ...2 174991.234140: ext4_da_reserve_space: dev 259,32 ino 2883605 mode 0100600 i_blocks 8 reserved_data_blocks 6 reserved_meta_blocks 0 |
| 1343 | // android.bg-1668 [000] ...1 174991.234142: ext4_es_insert_extent: dev 259,32 ino 2883605 es [5/1) mapped 576460752303423487 status D |
| 1344 | // android.bg-1668 [000] ...1 174991.234153: ext4_da_write_end: dev 259,32 ino 2883605 pos 20480 len 4096 copied 4096 |
| 1345 | // android.bg-1668 [000] ...1 174991.234158: ext4_journal_start: dev 259,32 blocks, 2 rsv_blocks, 0 caller ext4_dirty_inode+0x30/0x68 |
| 1346 | // android.bg-1668 [000] ...1 174991.234160: ext4_mark_inode_dirty: dev 259,32 ino 2883605 caller ext4_dirty_inode+0x48/0x68 |
| 1347 | // android.bg-1668 [000] ...1 174991.234170: ext4_da_write_begin: dev 259,32 ino 2883605 pos 24576 len 2968 flags 0 |
| 1348 | // android.bg-1668 [000] ...1 174991.234178: ext4_journal_start: dev 259,32 blocks, 1 rsv_blocks, 0 caller ext4_da_write_begin+0x3d4/0x518 |
| 1349 | // android.bg-1668 [000] ...1 174991.234184: ext4_es_lookup_extent_enter: dev 259,32 ino 2883605 lblk 6 |
| 1350 | // android.bg-1668 [000] ...1 174991.234187: ext4_es_lookup_extent_exit: dev 259,32 ino 2883605 found 1 [6/4294967289) 576460752303423487 H0x10 |
| 1351 | // android.bg-1668 [000] ...2 174991.234191: ext4_da_reserve_space: dev 259,32 ino 2883605 mode 0100600 i_blocks 8 reserved_data_blocks 7 reserved_meta_blocks 0 |
| 1352 | // android.bg-1668 [000] ...1 174991.234193: ext4_es_insert_extent: dev 259,32 ino 2883605 es [6/1) mapped 576460752303423487 status D |
| 1353 | // android.bg-1668 [000] ...1 174991.234203: ext4_da_write_end: dev 259,32 ino 2883605 pos 24576 len 2968 copied 2968 |
| 1354 | // android.bg-1668 [000] ...1 174991.234209: ext4_journal_start: dev 259,32 blocks, 2 rsv_blocks, 0 caller ext4_dirty_inode+0x30/0x68 |
| 1355 | // android.bg-1668 [000] ...1 174991.234211: ext4_mark_inode_dirty: dev 259,32 ino 2883605 caller ext4_dirty_inode+0x48/0x68 |
| 1356 | // android.bg-1668 [000] ...1 174991.234262: ext4_sync_file_enter: dev 259,32 ino 2883605 parent 2883592 datasync 0 |
| 1357 | // android.bg-1668 [000] ...1 174991.234270: ext4_writepages: dev 259,32 ino 2883605 nr_to_write 9223372036854775807 pages_skipped 0 range_start 0 range_end 9223372036854775807 sync_mode 1 for_kupdate 0 range_cyclic 0 writeback_index 0 |
| 1358 | // android.bg-1668 [000] ...1 174991.234287: ext4_journal_start: dev 259,32 blocks, 10 rsv_blocks, 0 caller ext4_writepages+0x6a4/0x119c |
| 1359 | // android.bg-1668 [000] ...1 174991.234294: ext4_da_write_pages: dev 259,32 ino 2883605 first_page 0 nr_to_write 9223372036854775807 sync_mode 1 |
| 1360 | // android.bg-1668 [000] ...1 174991.234319: ext4_da_write_pages_extent: dev 259,32 ino 2883605 lblk 0 len 7 flags 0x200 |
| 1361 | // android.bg-1668 [000] ...1 174991.234322: ext4_es_lookup_extent_enter: dev 259,32 ino 2883605 lblk 0 |
| 1362 | // android.bg-1668 [000] ...1 174991.234324: ext4_es_lookup_extent_exit: dev 259,32 ino 2883605 found 1 [0/7) 576460752303423487 D0x10 |
| 1363 | // android.bg-1668 [000] ...1 174991.234328: ext4_ext_map_blocks_enter: dev 259,32 ino 2883605 lblk 0 len 7 flags CREATE|DELALLOC|METADATA_NOFAIL |
| 1364 | // android.bg-1668 [000] ...1 174991.234341: ext4_request_blocks: dev 259,32 ino 2883605 flags HINT_DATA|DELALLOC_RESV|USE_RESV len 7 lblk 0 goal 11567104 lleft 0 lright 0 pleft 0 pright 0 |
| 1365 | // android.bg-1668 [000] ...1 174991.234394: ext4_mballoc_prealloc: dev 259,32 inode 2883605 orig 353/0/7@0 result 65/25551/7@0 |
| 1366 | // android.bg-1668 [000] ...1 174991.234400: ext4_allocate_blocks: dev 259,32 ino 2883605 flags HINT_DATA|DELALLOC_RESV|USE_RESV len 7 block 2155471 lblk 0 goal 11567104 lleft 0 lright 0 pleft 0 pright 0 |
| 1367 | // android.bg-1668 [000] ...1 174991.234409: ext4_mark_inode_dirty: dev 259,32 ino 2883605 caller __ext4_ext_dirty+0x104/0x170 |
| 1368 | // android.bg-1668 [000] ...1 174991.234420: ext4_get_reserved_cluster_alloc: dev 259,32 ino 2883605 lblk 0 len 7 |
| 1369 | // android.bg-1668 [000] ...2 174991.234426: ext4_da_update_reserve_space: dev 259,32 ino 2883605 mode 0100600 i_blocks 8 used_blocks 7 reserved_data_blocks 7 reserved_meta_blocks 0 allocated_meta_blocks 0 quota_claim 1 |
| 1370 | // android.bg-1668 [000] ...1 174991.234434: ext4_journal_start: dev 259,32 blocks, 1 rsv_blocks, 0 caller ext4_mark_dquot_dirty+0x80/0xd4 |
| 1371 | // android.bg-1668 [000] ...1 174991.234441: ext4_es_lookup_extent_enter: dev 259,32 ino 3 lblk 1 |
| 1372 | // android.bg-1668 [000] ...1 174991.234445: ext4_es_lookup_extent_exit: dev 259,32 ino 3 found 1 [0/2) 9255 W0x10 |
| 1373 | // android.bg-1668 [000] ...1 174991.234456: ext4_journal_start: dev 259,32 blocks, 1 rsv_blocks, 0 caller ext4_mark_dquot_dirty+0x80/0xd4 |
| 1374 | // android.bg-1668 [000] ...1 174991.234460: ext4_es_lookup_extent_enter: dev 259,32 ino 4 lblk 1 |
| 1375 | // android.bg-1668 [000] ...1 174991.234463: ext4_es_lookup_extent_exit: dev 259,32 ino 4 found 1 [0/2) 9257 W0x10 |
| 1376 | // android.bg-1668 [000] ...1 174991.234471: ext4_journal_start: dev 259,32 blocks, 2 rsv_blocks, 0 caller ext4_dirty_inode+0x30/0x68 |
| 1377 | // android.bg-1668 [000] ...1 174991.234474: ext4_mark_inode_dirty: dev 259,32 ino 2883605 caller ext4_dirty_inode+0x48/0x68 |
| 1378 | // android.bg-1668 [000] ...1 174991.234481: ext4_ext_map_blocks_exit: dev 259,32 ino 2883605 flags CREATE|DELALLOC|METADATA_NOFAIL lblk 0 pblk 2155471 len 7 mflags NM ret 7 |
| 1379 | // android.bg-1668 [000] ...1 174991.234484: ext4_es_insert_extent: dev 259,32 ino 2883605 es [0/7) mapped 2155471 status W |
| 1380 | // android.bg-1668 [000] ...1 174991.234547: ext4_mark_inode_dirty: dev 259,32 ino 2883605 caller ext4_writepages+0xdc0/0x119c |
| 1381 | // android.bg-1668 [000] ...1 174991.234604: ext4_journal_start: dev 259,32 blocks, 10 rsv_blocks, 0 caller ext4_writepages+0x6a4/0x119c |
| 1382 | // android.bg-1668 [000] ...1 174991.234609: ext4_da_write_pages: dev 259,32 ino 2883605 first_page 7 nr_to_write 9223372036854775800 sync_mode 1 |
| 1383 | // android.bg-1668 [000] ...1 174991.234876: ext4_writepages_result: dev 259,32 ino 2883605 ret 0 pages_written 7 pages_skipped 0 sync_mode 1 writeback_index 7 |
| 1384 | // Profile Saver-5504 [000] ...1 175002.711928: ext4_discard_preallocations: dev 259,32 ino 1311176 |
| 1385 | // Profile Saver-5504 [000] ...1 175002.714165: ext4_begin_ordered_truncate: dev 259,32 ino 1311176 new_size 0 |
| 1386 | // Profile Saver-5504 [000] ...1 175002.714172: ext4_journal_start: dev 259,32 blocks, 3 rsv_blocks, 0 caller ext4_setattr+0x5b4/0x788 |
| 1387 | // Profile Saver-5504 [000] ...1 175002.714218: ext4_mark_inode_dirty: dev 259,32 ino 1311176 caller ext4_setattr+0x65c/0x788 |
| 1388 | // Profile Saver-5504 [000] ...1 175002.714277: ext4_invalidatepage: dev 259,32 ino 1311176 page_index 0 offset 0 length 4096 |
| 1389 | // Profile Saver-5504 [000] ...1 175002.714281: ext4_releasepage: dev 259,32 ino 1311176 page_index 0 |
| 1390 | // Profile Saver-5504 [000] ...1 175002.714295: ext4_invalidatepage: dev 259,32 ino 1311176 page_index 1 offset 0 length 4096 |
| 1391 | // Profile Saver-5504 [000] ...1 175002.714296: ext4_releasepage: dev 259,32 ino 1311176 page_index 1 |
| 1392 | // Profile Saver-5504 [000] ...1 175002.714315: ext4_truncate_enter: dev 259,32 ino 1311176 blocks 24 |
| 1393 | // Profile Saver-5504 [000] ...1 175002.714318: ext4_journal_start: dev 259,32 blocks, 10 rsv_blocks, 0 caller ext4_truncate+0x258/0x4b8 |
| 1394 | // Profile Saver-5504 [000] ...1 175002.714322: ext4_discard_preallocations: dev 259,32 ino 1311176 |
| 1395 | // Profile Saver-5504 [000] ...1 175002.714324: ext4_mark_inode_dirty: dev 259,32 ino 1311176 caller ext4_ext_truncate+0x24/0xc8 |
| 1396 | // Profile Saver-5504 [000] ...1 175002.714328: ext4_es_remove_extent: dev 259,32 ino 1311176 es [0/4294967295) |
| 1397 | // Profile Saver-5504 [000] ...1 175002.714335: ext4_journal_start: dev 259,32 blocks, 1 rsv_blocks, 0 caller ext4_ext_remove_space+0x60/0x1180 |
| 1398 | // Profile Saver-5504 [000] ...1 175002.714338: ext4_ext_remove_space: dev 259,32 ino 1311176 since 0 end 4294967294 depth 0 |
| 1399 | // Profile Saver-5504 [000] ...1 175002.714347: ext4_ext_rm_leaf: dev 259,32 ino 1311176 start_lblk 0 last_extent [0(5276994), 2]partial_cluster 0 |
| 1400 | // Profile Saver-5504 [000] ...1 175002.714351: ext4_remove_blocks: dev 259,32 ino 1311176 extent [0(5276994), 2]from 0 to 1 partial_cluster 0 |
| 1401 | // Profile Saver-5504 [000] ...1 175002.714354: ext4_free_blocks: dev 259,32 ino 1311176 mode 0100600 block 5276994 count 2 flags 1ST_CLUSTER |
| 1402 | // Profile Saver-5504 [000] ...1 175002.714365: ext4_mballoc_free: dev 259,32 inode 1311176 extent 161/1346/2 |
| 1403 | // Profile Saver-5504 [000] ...1 175002.714382: ext4_journal_start: dev 259,32 blocks, 1 rsv_blocks, 0 caller ext4_mark_dquot_dirty+0x80/0xd4 |
| 1404 | // Profile Saver-5504 [000] ...1 175002.714391: ext4_es_lookup_extent_enter: dev 259,32 ino 3 lblk 4 |
| 1405 | // Profile Saver-5504 [000] ...1 175002.714394: ext4_es_lookup_extent_exit: dev 259,32 ino 3 found 1 [4/1) 557094 W0x10 |
| 1406 | // Profile Saver-5504 [000] ...1 175002.714402: ext4_journal_start: dev 259,32 blocks, 1 rsv_blocks, 0 caller ext4_mark_dquot_dirty+0x80/0xd4 |
| 1407 | // Profile Saver-5504 [000] ...1 175002.714404: ext4_es_lookup_extent_enter: dev 259,32 ino 4 lblk 8 |
| 1408 | // Profile Saver-5504 [000] ...1 175002.714406: ext4_es_lookup_extent_exit: dev 259,32 ino 4 found 1 [8/3) 7376914 W0x10 |
| 1409 | // Profile Saver-5504 [000] ...1 175002.714413: ext4_journal_start: dev 259,32 blocks, 2 rsv_blocks, 0 caller ext4_dirty_inode+0x30/0x68 |
| 1410 | // Profile Saver-5504 [000] ...1 175002.714414: ext4_mark_inode_dirty: dev 259,32 ino 1311176 caller ext4_dirty_inode+0x48/0x68 |
| 1411 | // Profile Saver-5504 [000] ...1 175002.714420: ext4_mark_inode_dirty: dev 259,32 ino 1311176 caller __ext4_ext_dirty+0x104/0x170 |
| 1412 | // Profile Saver-5504 [000] ...1 175002.714423: ext4_ext_remove_space_done: dev 259,32 ino 1311176 since 0 end 4294967294 depth 0 partial 0 remaining_entries 0 |
| 1413 | // Profile Saver-5504 [000] ...1 175002.714425: ext4_mark_inode_dirty: dev 259,32 ino 1311176 caller __ext4_ext_dirty+0x104/0x170 |
| 1414 | // Profile Saver-5504 [000] ...1 175002.714433: ext4_mark_inode_dirty: dev 259,32 ino 1311176 caller ext4_truncate+0x3c4/0x4b8 |
| 1415 | // Profile Saver-5504 [000] ...1 175002.714436: ext4_truncate_exit: dev 259,32 ino 1311176 blocks 8 |
| 1416 | // Profile Saver-5504 [000] ...1 175002.714437: ext4_journal_start: dev 259,32 blocks, 2 rsv_blocks, 0 caller ext4_dirty_inode+0x30/0x68 |
| 1417 | // Profile Saver-5504 [000] ...1 175002.714438: ext4_mark_inode_dirty: dev 259,32 ino 1311176 caller ext4_dirty_inode+0x48/0x68 |
| 1418 | // Profile Saver-5504 [000] ...1 175002.714462: ext4_da_write_begin: dev 259,32 ino 1311176 pos 0 len 4 flags 0 |
| 1419 | // Profile Saver-5504 [000] ...1 175002.714472: ext4_journal_start: dev 259,32 blocks, 1 rsv_blocks, 0 caller ext4_da_write_begin+0x3d4/0x518 |
| 1420 | // Profile Saver-5504 [000] ...1 175002.714477: ext4_es_lookup_extent_enter: dev 259,32 ino 1311176 lblk 0 |
| 1421 | // Profile Saver-5504 [000] ...1 175002.714477: ext4_es_lookup_extent_exit: dev 259,32 ino 1311176 found 0 [0/0) 0 |
| 1422 | // Profile Saver-5504 [000] ...1 175002.714480: ext4_ext_map_blocks_enter: dev 259,32 ino 1311176 lblk 0 len 1 flags |
| 1423 | // Profile Saver-5504 [000] ...1 175002.714485: ext4_es_find_delayed_extent_range_enter: dev 259,32 ino 1311176 lblk 0 |
| 1424 | // Profile Saver-5504 [000] ...1 175002.714488: ext4_es_find_delayed_extent_range_exit: dev 259,32 ino 1311176 es [0/0) mapped 0 status |
| 1425 | // Profile Saver-5504 [000] ...1 175002.714490: ext4_es_insert_extent: dev 259,32 ino 1311176 es [0/4294967295) mapped 576460752303423487 status H |
| 1426 | // Profile Saver-5504 [000] ...1 175002.714495: ext4_ext_map_blocks_exit: dev 259,32 ino 1311176 flags lblk 0 pblk 4294967296 len 1 mflags ret 0 |
| 1427 | // Profile Saver-5504 [000] ...2 175002.714501: ext4_da_reserve_space: dev 259,32 ino 1311176 mode 0100600 i_blocks 8 reserved_data_blocks 1 reserved_meta_blocks 0 |
| 1428 | // Profile Saver-5504 [000] ...1 175002.714505: ext4_es_insert_extent: dev 259,32 ino 1311176 es [0/1) mapped 576460752303423487 status D |
| 1429 | // Profile Saver-5504 [000] ...1 175002.714513: ext4_da_write_end: dev 259,32 ino 1311176 pos 0 len 4 copied 4 |
| 1430 | // Profile Saver-5504 [000] ...1 175002.714519: ext4_journal_start: dev 259,32 blocks, 2 rsv_blocks, 0 caller ext4_dirty_inode+0x30/0x68 |
| 1431 | // Profile Saver-5504 [000] ...1 175002.714520: ext4_mark_inode_dirty: dev 259,32 ino 1311176 caller ext4_dirty_inode+0x48/0x68 |
| 1432 | // Profile Saver-5504 [000] ...1 175002.714527: ext4_da_write_begin: dev 259,32 ino 1311176 pos 4 len 4 flags 0 |
| 1433 | // Profile Saver-5504 [000] ...1 175002.714529: ext4_journal_start: dev 259,32 blocks, 1 rsv_blocks, 0 caller ext4_da_write_begin+0x3d4/0x518 |
| 1434 | // Profile Saver-5504 [000] ...1 175002.714531: ext4_da_write_end: dev 259,32 ino 1311176 pos 4 len 4 copied 4 |
| 1435 | // Profile Saver-5504 [000] ...1 175002.714532: ext4_journal_start: dev 259,32 blocks, 2 rsv_blocks, 0 caller ext4_dirty_inode+0x30/0x68 |
| 1436 | // Profile Saver-5504 [000] ...1 175002.714532: ext4_mark_inode_dirty: dev 259,32 ino 1311176 caller ext4_dirty_inode+0x48/0x68 |
| 1437 | // Profile Saver-5504 [000] ...1 175002.715313: ext4_journal_start: dev 259,32 blocks, 2 rsv_blocks, 0 caller ext4_dirty_inode+0x30/0x68 |
| 1438 | // Profile Saver-5504 [000] ...1 175002.715322: ext4_mark_inode_dirty: dev 259,32 ino 1311176 caller ext4_dirty_inode+0x48/0x68 |
| 1439 | // Profile Saver-5504 [000] ...1 175002.723849: ext4_da_write_begin: dev 259,32 ino 1311176 pos 8 len 5 flags 0 |
| 1440 | // Profile Saver-5504 [000] ...1 175002.723862: ext4_journal_start: dev 259,32 blocks, 1 rsv_blocks, 0 caller ext4_da_write_begin+0x3d4/0x518 |
| 1441 | // Profile Saver-5504 [000] ...1 175002.723873: ext4_da_write_end: dev 259,32 ino 1311176 pos 8 len 5 copied 5 |
| 1442 | // Profile Saver-5504 [000] ...1 175002.723877: ext4_journal_start: dev 259,32 blocks, 2 rsv_blocks, 0 caller ext4_dirty_inode+0x30/0x68 |
| 1443 | // Profile Saver-5504 [000] ...1 175002.723879: ext4_mark_inode_dirty: dev 259,32 ino 1311176 caller ext4_dirty_inode+0x48/0x68 |
| 1444 | // Profile Saver-5504 [000] ...1 175002.726857: ext4_journal_start: dev 259,32 blocks, 2 rsv_blocks, 0 caller ext4_dirty_inode+0x30/0x68 |
| 1445 | // Profile Saver-5504 [000] ...1 175002.726867: ext4_mark_inode_dirty: dev 259,32 ino 1311176 caller ext4_dirty_inode+0x48/0x68 |
| 1446 | // Profile Saver-5504 [000] ...1 175002.726881: ext4_da_write_begin: dev 259,32 ino 1311176 pos 13 len 4 flags 0 |
| 1447 | // Profile Saver-5504 [000] ...1 175002.726883: ext4_journal_start: dev 259,32 blocks, 1 rsv_blocks, 0 caller ext4_da_write_begin+0x3d4/0x518 |
| 1448 | // Profile Saver-5504 [000] ...1 175002.726890: ext4_da_write_end: dev 259,32 ino 1311176 pos 13 len 4 copied 4 |
| 1449 | // Profile Saver-5504 [000] ...1 175002.726892: ext4_journal_start: dev 259,32 blocks, 2 rsv_blocks, 0 caller ext4_dirty_inode+0x30/0x68 |
| 1450 | // Profile Saver-5504 [000] ...1 175002.726892: ext4_mark_inode_dirty: dev 259,32 ino 1311176 caller ext4_dirty_inode+0x48/0x68 |
| 1451 | // Profile Saver-5504 [000] ...1 175002.726900: ext4_da_write_begin: dev 259,32 ino 1311176 pos 17 len 4079 flags 0 |
| 1452 | // Profile Saver-5504 [000] ...1 175002.726901: ext4_journal_start: dev 259,32 blocks, 1 rsv_blocks, 0 caller ext4_da_write_begin+0x3d4/0x518 |
| 1453 | // Profile Saver-5504 [000] ...1 175002.726904: ext4_da_write_end: dev 259,32 ino 1311176 pos 17 len 4079 copied 4079 |
| 1454 | // Profile Saver-5504 [000] ...1 175002.726905: ext4_journal_start: dev 259,32 blocks, 2 rsv_blocks, 0 caller ext4_dirty_inode+0x30/0x68 |
| 1455 | // Profile Saver-5504 [000] ...1 175002.726906: ext4_mark_inode_dirty: dev 259,32 ino 1311176 caller ext4_dirty_inode+0x48/0x68 |
| 1456 | // Profile Saver-5504 [000] ...1 175002.726908: ext4_da_write_begin: dev 259,32 ino 1311176 pos 4096 len 2780 flags 0 |
| 1457 | // Profile Saver-5504 [000] ...1 175002.726916: ext4_journal_start: dev 259,32 blocks, 1 rsv_blocks, 0 caller ext4_da_write_begin+0x3d4/0x518 |
| 1458 | // Profile Saver-5504 [000] ...1 175002.726921: ext4_es_lookup_extent_enter: dev 259,32 ino 1311176 lblk 1 |
| 1459 | // Profile Saver-5504 [000] ...1 175002.726924: ext4_es_lookup_extent_exit: dev 259,32 ino 1311176 found 1 [1/4294967294) 576460752303423487 H0x10 |
| 1460 | // Profile Saver-5504 [000] ...2 175002.726931: ext4_da_reserve_space: dev 259,32 ino 1311176 mode 0100600 i_blocks 8 reserved_data_blocks 2 reserved_meta_blocks 0 |
| 1461 | // Profile Saver-5504 [000] ...1 175002.726933: ext4_es_insert_extent: dev 259,32 ino 1311176 es [1/1) mapped 576460752303423487 status D |
| 1462 | // Profile Saver-5504 [000] ...1 175002.726940: ext4_da_write_end: dev 259,32 ino 1311176 pos 4096 len 2780 copied 2780 |
| 1463 | // Profile Saver-5504 [000] ...1 175002.726941: ext4_journal_start: dev 259,32 blocks, 2 rsv_blocks, 0 caller ext4_dirty_inode+0x30/0x68 |
| 1464 | // Profile Saver-5504 [000] ...1 175002.726942: ext4_mark_inode_dirty: dev 259,32 ino 1311176 caller ext4_dirty_inode+0x48/0x68 |
| 1465 | // d.process.acor-27885 [000] ...1 175018.227675: ext4_journal_start: dev 259,32 blocks, 2 rsv_blocks, 0 caller ext4_dirty_inode+0x30/0x68 |
| 1466 | // d.process.acor-27885 [000] ...1 175018.227699: ext4_mark_inode_dirty: dev 259,32 ino 3278189 caller ext4_dirty_inode+0x48/0x68 |
| 1467 | // d.process.acor-27885 [000] ...1 175018.227839: ext4_sync_file_enter: dev 259,32 ino 3278183 parent 3277001 datasync 1 |
| 1468 | // d.process.acor-27885 [000] ...1 175018.227847: ext4_writepages: dev 259,32 ino 3278183 nr_to_write 9223372036854775807 pages_skipped 0 range_start 0 range_end 9223372036854775807 sync_mode 1 for_kupdate 0 range_cyclic 0 writeback_index 2 |
| 1469 | // d.process.acor-27885 [000] ...1 175018.227852: ext4_writepages_result: dev 259,32 ino 3278183 ret 0 pages_written 0 pages_skipped 0 sync_mode 1 writeback_index 2 |
| 1470 | // clang-format on |
Hector Dearman | 1f14b62 | 2018-02-27 11:17:37 +0000 | [diff] [blame] | 1471 | |
Primiano Tucci | 3cbb10a | 2018-04-10 17:52:40 +0100 | [diff] [blame] | 1472 | static ExamplePage g_full_page_ext4{ |
Hector Dearman | 1f14b62 | 2018-02-27 11:17:37 +0000 | [diff] [blame] | 1473 | "synthetic", |
| 1474 | R"( |
| 1475 | 00000000: 50fe 5852 279f 0000 c80f 00c0 ffff ffff P.XR'........... |
| 1476 | 00000010: 0800 0000 5701 0001 8406 0000 2000 3010 ....W....... .0. |
| 1477 | 00000020: 566b 0000 8829 e86a 91ff ffff 0200 0000 Vk...).j........ |
| 1478 | 00000030: 0000 0000 2873 0100 1b01 0001 8406 0000 ....(s.......... |
| 1479 | 00000040: 2000 3010 9200 0000 1500 2c00 0000 0000 .0.......,..... |
| 1480 | 00000050: a029 e86a 91ff ffff 0ac8 0400 1e01 0001 .).j............ |
| 1481 | 00000060: 8406 0000 2000 3010 2866 0100 1500 2c00 .... .0.(f....,. |
| 1482 | 00000070: 0000 0000 0050 0000 0000 0000 0010 0000 .....P.......... |
| 1483 | 00000080: 0000 0000 a804 0400 5701 0001 8406 0000 ........W....... |
| 1484 | 00000090: 2000 3010 91ff ffff 586f e86a 91ff ffff .0.....Xo.j.... |
| 1485 | 000000a0: 0100 0000 0000 0000 c83a 0300 6c01 0001 .........:..l... |
| 1486 | 000000b0: 8406 0000 2000 3010 0000 0000 1500 2c00 .... .0.......,. |
| 1487 | 000000c0: 0000 0000 0500 0000 5701 0001 ac6c 0100 ........W....l.. |
| 1488 | 000000d0: 6d01 0001 8406 0000 2000 3010 91ff ffff m....... .0..... |
| 1489 | 000000e0: 1500 2c00 0000 0000 0500 0000 faff ffff ..,............. |
| 1490 | 000000f0: ffff ffff ffff ff07 184e 0000 0100 0000 .........N...... |
| 1491 | 00000100: ec08 0200 3f01 0002 8406 0000 2000 3010 ....?....... .0. |
| 1492 | 00000110: 0000 0000 1500 2c00 0000 0000 0800 0000 ......,......... |
| 1493 | 00000120: 0000 0000 0600 0000 0000 0000 8081 0000 ................ |
| 1494 | 00000130: 0000 0000 ec24 0100 6701 0001 8406 0000 .....$..g....... |
| 1495 | 00000140: 2000 3010 0000 0000 1500 2c00 0000 0000 .0.......,..... |
| 1496 | 00000150: 0500 0000 0100 0000 ffff ffff ffff ff07 ................ |
| 1497 | 00000160: 0400 0000 7b04 3200 2a30 0500 2101 0001 ....{.2.*0..!... |
| 1498 | 00000170: 8406 0000 2000 3010 0000 0000 1500 2c00 .... .0.......,. |
| 1499 | 00000180: 0000 0000 0050 0000 0000 0000 0010 0000 .....P.......... |
| 1500 | 00000190: 0010 0000 288b 0200 5701 0001 8406 0000 ....(...W....... |
| 1501 | 000001a0: 2000 3010 0000 0000 8829 e86a 91ff ffff .0......).j.... |
| 1502 | 000001b0: 0200 0000 0000 0000 0832 0100 1b01 0001 .........2...... |
| 1503 | 000001c0: 8406 0000 2000 3010 566b 0000 1500 2c00 .... .0.Vk....,. |
| 1504 | 000001d0: 0000 0000 a029 e86a 91ff ffff eaa0 0400 .....).j........ |
| 1505 | 000001e0: 1e01 0001 8406 0000 2000 3010 280b 0400 ........ .0.(... |
| 1506 | 000001f0: 1500 2c00 0000 0000 0060 0000 0000 0000 ..,......`...... |
| 1507 | 00000200: 980b 0000 0000 0000 88d0 0300 5701 0001 ............W... |
| 1508 | 00000210: 8406 0000 2000 3010 566b 0000 586f e86a .... .0.Vk..Xo.j |
| 1509 | 00000220: 91ff ffff 0100 0000 0000 0000 c813 0300 ................ |
| 1510 | 00000230: 6c01 0001 8406 0000 2000 3010 566b 0000 l....... .0.Vk.. |
| 1511 | 00000240: 1500 2c00 0000 0000 0600 0000 0000 0000 ..,............. |
| 1512 | 00000250: ac5f 0100 6d01 0001 8406 0000 2000 3010 ._..m....... .0. |
| 1513 | 00000260: 1100 3010 1500 2c00 0000 0000 0600 0000 ..0...,......... |
| 1514 | 00000270: f9ff ffff ffff ffff ffff ff07 185a ea6a .............Z.j |
| 1515 | 00000280: 0100 0000 4c02 0200 3f01 0002 8406 0000 ....L...?....... |
| 1516 | 00000290: 2000 3010 566b 0000 1500 2c00 0000 0000 .0.Vk....,..... |
| 1517 | 000002a0: 0800 0000 0000 0000 0700 0000 0000 0000 ................ |
| 1518 | 000002b0: 8081 0000 6d01 0001 0c0b 0100 6701 0001 ....m.......g... |
| 1519 | 000002c0: 8406 0000 2000 3010 0000 0000 1500 2c00 .... .0.......,. |
| 1520 | 000002d0: 0000 0000 0600 0000 0100 0000 ffff ffff ................ |
| 1521 | 000002e0: ffff ff07 049a 0100 5701 0001 aa1c 0500 ........W....... |
| 1522 | 000002f0: 2101 0001 8406 0000 2000 3010 91ff ffff !....... .0..... |
| 1523 | 00000300: 1500 2c00 0000 0000 0060 0000 0000 0000 ..,......`...... |
| 1524 | 00000310: 980b 0000 980b 0000 889e 0200 5701 0001 ............W... |
| 1525 | 00000320: 8406 0000 2000 3010 91ff ffff 8829 e86a .... .0......).j |
| 1526 | 00000330: 91ff ffff 0200 0000 0000 0000 8838 0100 .............8.. |
| 1527 | 00000340: 1b01 0001 8406 0000 2000 3010 91ff ffff ........ .0..... |
| 1528 | 00000350: 1500 2c00 0000 0000 a029 e86a 91ff ffff ..,......).j.... |
| 1529 | 00000360: 2ab8 1800 3501 0001 8406 0000 2000 3010 *...5....... .0. |
| 1530 | 00000370: feff ffff 1500 2c00 0000 0000 0800 2c00 ......,.......,. |
| 1531 | 00000380: 0000 0000 0000 0000 2000 3010 32fe 0300 ........ .0.2... |
| 1532 | 00000390: 2201 0001 8406 0000 2000 3010 0000 0000 "....... .0..... |
| 1533 | 000003a0: 1500 2c00 0000 0000 ffff ffff ffff ff7f ..,............. |
| 1534 | 000003b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ |
| 1535 | 000003c0: ffff ffff ffff ff7f 0000 0000 0000 0000 ................ |
| 1536 | 000003d0: 0100 0000 0000 0000 887e 0800 5701 0001 .........~..W... |
| 1537 | 000003e0: 8406 0000 2000 3010 7b04 3200 7c3f e86a .... .0.{.2.|?.j |
| 1538 | 000003f0: 91ff ffff 0a00 0000 0000 0000 ec2d 0300 .............-.. |
| 1539 | 00000400: 2301 0001 8406 0000 2000 3010 7b04 3200 #....... .0.{.2. |
| 1540 | 00000410: 1500 2c00 0000 0000 0000 0000 0000 0000 ..,............. |
| 1541 | 00000420: ffff ffff ffff ff7f 0100 0000 3c01 0001 ............<... |
| 1542 | 00000430: 0a42 0c00 2401 0001 8406 0000 2000 3010 .B..$....... .0. |
| 1543 | 00000440: 0800 0000 1500 2c00 0000 0000 0000 0000 ......,......... |
| 1544 | 00000450: 0000 0000 0700 0000 0002 0000 885f 0100 ............._.. |
| 1545 | 00000460: 6c01 0001 8406 0000 2000 3010 0100 0000 l....... .0..... |
| 1546 | 00000470: 1500 2c00 0000 0000 0000 0000 566b 0000 ..,.........Vk.. |
| 1547 | 00000480: 0c25 0100 6d01 0001 8406 0000 2000 3010 .%..m....... .0. |
| 1548 | 00000490: 0400 0000 1500 2c00 0000 0000 0000 0000 ......,......... |
| 1549 | 000004a0: 0700 0000 ffff ffff ffff ff07 1400 0000 ................ |
| 1550 | 000004b0: 0100 0000 caee 0100 5101 0001 8406 0000 ........Q....... |
| 1551 | 000004c0: 2000 3010 1100 0000 1500 2c00 0000 0000 .0.......,..... |
| 1552 | 000004d0: 0000 0000 0700 0000 2500 0000 2000 3010 ........%... .0. |
| 1553 | 000004e0: 323b 0600 3201 0001 8406 0000 2000 3010 2;..2....... .0. |
| 1554 | 000004f0: c86e 0000 1500 2c00 0000 0000 0700 0000 .n....,......... |
| 1555 | 00000500: 0000 0000 0000 0000 0000 0000 0080 b000 ................ |
| 1556 | 00000510: 0000 0000 0000 0000 0000 0000 0000 0000 ................ |
| 1557 | 00000520: 0000 0000 2024 0000 0400 0000 ae0a 1a00 .... $.......... |
| 1558 | 00000530: 3a01 0001 8406 0000 2000 3010 0000 0000 :....... .0..... |
| 1559 | 00000540: 1500 2c00 0000 0000 0000 0000 0000 0000 ..,............. |
| 1560 | 00000550: 6101 0000 0700 0000 0000 0000 cf63 0000 a............c.. |
| 1561 | 00000560: 4100 0000 0700 0000 b4c5 0200 3301 0001 A...........3... |
| 1562 | 00000570: 8406 0000 2000 3010 2000 3010 1500 2c00 .... .0. .0...,. |
| 1563 | 00000580: 0000 0000 cfe3 2000 0000 0000 0700 0000 ...... ......... |
| 1564 | 00000590: 0000 0000 0000 0000 0000 0000 0080 b000 ................ |
| 1565 | 000005a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ |
| 1566 | 000005b0: 0000 0000 2024 0000 6c01 0001 4859 0400 .... $..l...HY.. |
| 1567 | 000005c0: 1b01 0001 8406 0000 2000 3010 0000 0000 ........ .0..... |
| 1568 | 000005d0: 1500 2c00 0000 0000 9c99 ea6a 91ff ffff ..,........j.... |
| 1569 | 000005e0: c850 0500 6001 0001 8406 0000 2000 3010 .P..`....... .0. |
| 1570 | 000005f0: 0000 0000 1500 2c00 0000 0000 0000 0000 ......,......... |
| 1571 | 00000600: 0700 0000 2ee6 0200 3e01 0002 8406 0000 ........>....... |
| 1572 | 00000610: 2000 3010 566b 0000 1500 2c00 0000 0000 .0.Vk....,..... |
| 1573 | 00000620: 0800 0000 0000 0000 0700 0000 0700 0000 ................ |
| 1574 | 00000630: 0000 0000 0000 0000 0100 0000 8081 3010 ..............0. |
| 1575 | 00000640: a804 0400 5701 0001 8406 0000 2000 3010 ....W....... .0. |
| 1576 | 00000650: cb07 3200 885a ea6a 91ff ffff 0100 0000 ..2..Z.j........ |
| 1577 | 00000660: 0000 0000 8875 0300 6c01 0001 8406 0000 .....u..l....... |
| 1578 | 00000670: 2000 3010 0300 0000 0300 0000 0000 0000 .0............. |
| 1579 | 00000680: 0100 0000 0100 0000 ccd4 0100 6d01 0001 ............m... |
| 1580 | 00000690: 8406 0000 2000 3010 cb07 3200 0300 0000 .... .0...2..... |
| 1581 | 000006a0: 0000 0000 0000 0000 0200 0000 2724 0000 ............'$.. |
| 1582 | 000006b0: 0000 0000 1100 3010 0100 0000 a850 0500 ......0......P.. |
| 1583 | 000006c0: 5701 0001 8406 0000 2000 3010 0000 0000 W....... .0..... |
| 1584 | 000006d0: 885a ea6a 91ff ffff 0100 0000 0000 0000 .Z.j............ |
| 1585 | 000006e0: 680f 0200 6c01 0001 8406 0000 2000 3010 h...l....... .0. |
| 1586 | 000006f0: 0000 0000 0400 0000 0000 0000 0100 0000 ................ |
| 1587 | 00000700: 6d01 0001 ac79 0100 6d01 0001 8406 0000 m....y..m....... |
| 1588 | 00000710: 2000 3010 0000 0000 0400 0000 0000 0000 .0............. |
| 1589 | 00000720: 0000 0000 0200 0000 2924 0000 0000 0000 ........)$...... |
| 1590 | 00000730: 1143 0200 0100 0000 2818 0400 5701 0001 .C......(...W... |
| 1591 | 00000740: 8406 0000 2000 3010 0000 0000 8829 e86a .... .0......).j |
| 1592 | 00000750: 91ff ffff 0200 0000 0000 0000 8838 0100 .............8.. |
| 1593 | 00000760: 1b01 0001 8406 0000 2000 3010 0400 0000 ........ .0..... |
| 1594 | 00000770: 1500 2c00 0000 0000 a029 e86a 91ff ffff ..,......).j.... |
| 1595 | 00000780: 0e89 0300 5301 0001 8406 0000 2000 3010 ....S....... .0. |
| 1596 | 00000790: e128 0000 1500 2c00 0000 0000 2500 0000 .(....,.....%... |
| 1597 | 000007a0: 0000 0000 cfe3 2000 0000 0000 0000 0000 ...... ......... |
| 1598 | 000007b0: 0700 0000 6000 0000 0700 0000 aca0 0100 ....`........... |
| 1599 | 000007c0: 6701 0001 8406 0000 2000 3010 e128 0000 g....... .0..(.. |
| 1600 | 000007d0: 1500 2c00 0000 0000 0000 0000 0700 0000 ..,............. |
| 1601 | 000007e0: cfe3 2000 0000 0000 01a2 0800 0000 0000 .. ............. |
| 1602 | 000007f0: 28b2 1e00 1b01 0001 8406 0000 2000 3010 (........... .0. |
| 1603 | 00000800: e128 0000 1500 2c00 0000 0000 9846 e86a .(....,......F.j |
| 1604 | 00000810: 91ff ffff 68d2 1b00 5701 0001 8406 0000 ....h...W....... |
| 1605 | 00000820: 2000 3010 e128 0000 7c3f e86a 91ff ffff .0..(..|?.j.... |
| 1606 | 00000830: 0a00 0000 0000 0000 0c57 0200 2301 0001 .........W..#... |
| 1607 | 00000840: 8406 0000 2000 3010 006c 0000 1500 2c00 .... .0..l....,. |
| 1608 | 00000850: 0000 0000 0700 0000 0000 0000 f8ff ffff ................ |
| 1609 | 00000860: ffff ff7f 0100 0000 0000 0000 6e69 8200 ............ni.. |
| 1610 | 00000870: 2501 0001 8406 0000 2000 3010 ca6e 0000 %....... .0..n.. |
| 1611 | 00000880: 1500 2c00 0000 0000 0000 0000 0700 0000 ..,............. |
| 1612 | 00000890: 0000 0000 0000 0000 0700 0000 0000 0000 ................ |
| 1613 | 000008a0: 0100 0000 0200 3010 3e13 bd82 5500 0000 ......0.>...U... |
| 1614 | 000008b0: 0600 0000 3001 0001 8015 0000 2000 3010 ....0....... .0. |
| 1615 | 000008c0: 0000 0000 c801 1400 0000 0000 8860 4404 .............`D. |
| 1616 | 000008d0: 1c01 0001 8015 0000 2000 3010 2000 0000 ........ .0. ... |
| 1617 | 000008e0: c801 1400 0000 0000 0000 0000 0000 0000 ................ |
| 1618 | 000008f0: 88a9 0300 5701 0001 8015 0000 2000 3010 ....W....... .0. |
| 1619 | 00000900: 0400 0000 1c1e e86a 91ff ffff 0300 0000 .......j........ |
| 1620 | 00000910: 0000 0000 a85a 1600 1b01 0001 8015 0000 .....Z.......... |
| 1621 | 00000920: 2000 3010 2000 3010 c801 1400 0000 0000 .0. .0......... |
| 1622 | 00000930: c41e e86a 91ff ffff ca95 1c00 2901 0001 ...j........)... |
| 1623 | 00000940: 8015 0000 2000 3010 2000 3010 c801 1400 .... .0. .0..... |
| 1624 | 00000950: 0000 0000 0000 0000 0000 0000 0000 0000 ................ |
| 1625 | 00000960: 0010 0000 c8fb 0100 2801 0001 8015 0000 ........(....... |
| 1626 | 00000970: 2000 3010 5101 0001 c801 1400 0000 0000 .0.Q........... |
| 1627 | 00000980: 0000 0000 0000 0000 6af1 0600 2901 0001 ........j...)... |
| 1628 | 00000990: 8015 0000 2000 3010 0000 0000 c801 1400 .... .0......... |
| 1629 | 000009a0: 0000 0000 0100 0000 0000 0000 0000 0000 ................ |
| 1630 | 000009b0: 0010 0000 488f 0000 2801 0001 8015 0000 ....H...(....... |
| 1631 | 000009c0: 2000 3010 0200 ffff c801 1400 0000 0000 .0............. |
| 1632 | 000009d0: 0100 0000 0000 0000 483b 0900 4d01 0001 ........H;..M... |
| 1633 | 000009e0: 8015 0000 2000 3010 0000 0000 c801 1400 .... .0......... |
| 1634 | 000009f0: 0000 0000 1800 0000 0000 0000 8852 0100 .............R.. |
| 1635 | 00000a00: 5701 0001 8015 0000 2000 3010 e128 0000 W....... .0..(.. |
| 1636 | 00000a10: 9ce9 e76a 91ff ffff 0a00 0000 0000 0000 ...j............ |
| 1637 | 00000a20: e615 0200 3001 0001 8015 0000 2000 3010 ....0....... .0. |
| 1638 | 00000a30: 0155 0000 c801 1400 0000 0000 68d0 0000 .U..........h... |
| 1639 | 00000a40: 1b01 0001 8015 0000 2000 3010 6606 3200 ........ .0.f.2. |
| 1640 | 00000a50: c801 1400 0000 0000 acfa ea6a 91ff ffff ...........j.... |
| 1641 | 00000a60: 6a0f 0200 6901 0001 8015 0000 2000 3010 j...i....... .0. |
| 1642 | 00000a70: 7106 3200 c801 1400 0000 0000 0000 0000 q.2............. |
| 1643 | 00000a80: 0000 0000 ffff ffff 0000 0000 e895 0300 ................ |
| 1644 | 00000a90: 5701 0001 8015 0000 2000 3010 0300 0000 W....... .0..... |
| 1645 | 00000aa0: acbe ea6a 91ff ffff 0100 0000 0000 0000 ...j............ |
| 1646 | 00000ab0: 8a38 0100 6501 0001 8015 0000 2000 3010 .8..e....... .0. |
| 1647 | 00000ac0: c41e e86a c801 1400 0000 0000 0000 0000 ...j............ |
| 1648 | 00000ad0: feff ffff 0000 0000 0000 0000 ee86 0400 ................ |
| 1649 | 00000ae0: 6301 0001 8015 0000 2000 3010 0000 0000 c....... .0..... |
| 1650 | 00000af0: c801 1400 0000 0000 0000 0000 0000 0000 ................ |
| 1651 | 00000b00: 0000 0000 0000 0000 4285 5000 0000 0000 ........B.P..... |
| 1652 | 00000b10: 0200 0000 0000 0000 8e36 0200 6201 0001 .........6..b... |
| 1653 | 00000b20: 8015 0000 2000 3010 7d55 0000 c801 1400 .... .0.}U...... |
| 1654 | 00000b30: 0000 0000 0000 0000 0100 0000 0000 0000 ................ |
| 1655 | 00000b40: 0000 0000 4285 5000 0000 0000 0000 0000 ....B.P......... |
| 1656 | 00000b50: 0200 3010 8c5f 0100 3401 0001 8015 0000 ..0.._..4....... |
| 1657 | 00000b60: 2000 3010 0000 0000 c801 1400 0000 0000 .0............. |
| 1658 | 00000b70: 4285 5000 0000 0000 0200 0000 0000 0000 B.P............. |
| 1659 | 00000b80: 1000 0000 8081 0000 aa43 0500 3c01 0001 .........C..<... |
| 1660 | 00000b90: 8015 0000 2000 3010 2801 0001 c801 1400 .... .0.(....... |
| 1661 | 00000ba0: 0000 0000 4205 0000 a100 0000 0200 0000 ....B........... |
| 1662 | 00000bb0: 0200 0000 8871 0800 5701 0001 8015 0000 .....q..W....... |
| 1663 | 00000bc0: 2000 3010 2000 3010 885a ea6a 91ff ffff .0. .0..Z.j.... |
| 1664 | 00000bd0: 0100 0000 0000 0000 4825 0400 6c01 0001 ........H%..l... |
| 1665 | 00000be0: 8015 0000 2000 3010 2801 0001 0300 0000 .... .0.(....... |
| 1666 | 00000bf0: 0000 0000 0400 0000 7106 3200 0c73 0100 ........q.2..s.. |
| 1667 | 00000c00: 6d01 0001 8015 0000 2000 3010 2901 0001 m....... .0.)... |
| 1668 | 00000c10: 0300 0000 0000 0000 0400 0000 0100 0000 ................ |
| 1669 | 00000c20: 2680 0800 0000 0000 1100 0000 0100 0000 &............... |
| 1670 | 00000c30: c845 0400 5701 0001 8015 0000 2000 3010 .E..W....... .0. |
| 1671 | 00000c40: 2000 3010 885a ea6a 91ff ffff 0100 0000 .0..Z.j........ |
| 1672 | 00000c50: 0000 0000 e8c9 0000 6c01 0001 8015 0000 ........l....... |
| 1673 | 00000c60: 2000 3010 2000 3010 0400 0000 0000 0000 .0. .0......... |
| 1674 | 00000c70: 0800 0000 0500 0000 6cdd 0000 6d01 0001 ........l...m... |
| 1675 | 00000c80: 8015 0000 2000 3010 2801 0001 0400 0000 .... .0.(....... |
| 1676 | 00000c90: 0000 0000 0800 0000 0300 0000 1290 7000 ..............p. |
| 1677 | 00000ca0: 0000 0000 1100 0000 0100 0000 6875 0300 ............hu.. |
| 1678 | 00000cb0: 5701 0001 8015 0000 2000 3010 7106 3200 W....... .0.q.2. |
| 1679 | 00000cc0: 8829 e86a 91ff ffff 0200 0000 0000 0000 .).j............ |
| 1680 | 00000cd0: a847 0000 1b01 0001 8015 0000 2000 3010 .G.......... .0. |
| 1681 | 00000ce0: 9ce9 e76a c801 1400 0000 0000 a029 e86a ...j.........).j |
| 1682 | 00000cf0: 91ff ffff e83a 0300 1b01 0001 8015 0000 .....:.......... |
| 1683 | 00000d00: 2000 3010 7106 3200 c801 1400 0000 0000 .0.q.2......... |
| 1684 | 00000d10: 9c99 ea6a 91ff ffff ae93 0100 6601 0001 ...j........f... |
| 1685 | 00000d20: 8015 0000 2000 3010 acfa ea6a c801 1400 .... .0....j.... |
| 1686 | 00000d30: 0000 0000 0000 0000 feff ffff 0000 0000 ................ |
| 1687 | 00000d40: 2000 3010 0000 0000 0000 0000 0000 0000 .0............. |
| 1688 | 00000d50: 0000 0000 48b6 0000 1b01 0001 8015 0000 ....H........... |
| 1689 | 00000d60: 2000 3010 e128 0000 c801 1400 0000 0000 .0..(.......... |
| 1690 | 00000d70: 9c99 ea6a 91ff ffff a8ea 0300 1b01 0001 ...j............ |
| 1691 | 00000d80: 8015 0000 2000 3010 e128 0000 c801 1400 .... .0..(...... |
| 1692 | 00000d90: 0000 0000 08eb e76a 91ff ffff 885f 0100 .......j....._.. |
| 1693 | 00000da0: 4e01 0001 8015 0000 2000 3010 2efe 0300 N....... .0..... |
| 1694 | 00000db0: c801 1400 0000 0000 0800 0000 0000 0000 ................ |
| 1695 | 00000dc0: e8bc 0000 5701 0001 8015 0000 2000 3010 ....W....... .0. |
| 1696 | 00000dd0: 0000 0000 8829 e86a 91ff ffff 0200 0000 .....).j........ |
| 1697 | 00000de0: 0000 0000 c895 0000 1b01 0001 8015 0000 ................ |
| 1698 | 00000df0: 2000 3010 2000 3010 c801 1400 0000 0000 .0. .0......... |
| 1699 | 00000e00: a029 e86a 91ff ffff cab2 0b00 1e01 0001 .).j............ |
| 1700 | 00000e10: 8015 0000 2000 3010 0000 0000 c801 1400 .... .0......... |
| 1701 | 00000e20: 0000 0000 0000 0000 0000 0000 0400 0000 ................ |
| 1702 | 00000e30: 0000 0000 689a 0400 5701 0001 8015 0000 ....h...W....... |
| 1703 | 00000e40: 2000 3010 0000 0000 586f e86a 91ff ffff .0.....Xo.j.... |
| 1704 | 00000e50: 0100 0000 0000 0000 8884 0200 6c01 0001 ............l... |
| 1705 | 00000e60: 8015 0000 2000 3010 8829 e86a c801 1400 .... .0..).j.... |
| 1706 | 00000e70: 0000 0000 0000 0000 4100 0000 ac47 0000 ........A....G.. |
| 1707 | 00000e80: 6d01 0001 8015 0000 2000 3010 e128 0000 m....... .0..(.. |
| 1708 | 00000e90: c801 1400 0000 0000 0000 0000 0000 0000 ................ |
| 1709 | 00000ea0: 0000 0000 0000 0000 001c 0200 0000 0000 ................ |
| 1710 | 00000eb0: 2a66 0100 5101 0001 8015 0000 2000 3010 *f..Q....... .0. |
| 1711 | 00000ec0: 0000 0000 c801 1400 0000 0000 0000 0000 ................ |
| 1712 | 00000ed0: 0100 0000 0000 0000 2000 3010 087e 0200 ........ .0..~.. |
| 1713 | 00000ee0: 6a01 0001 8015 0000 2000 3010 0100 0000 j....... .0..... |
| 1714 | 00000ef0: c801 1400 0000 0000 0000 0000 0100 0000 ................ |
| 1715 | 00000f00: 8c11 0100 6b01 0001 8015 0000 2000 3010 ....k....... .0. |
| 1716 | 00000f10: 1b01 0001 c801 1400 0000 0000 0000 0000 ................ |
| 1717 | 00000f20: 0000 0000 0000 0000 0000 0000 0028 0000 .............(.. |
| 1718 | 00000f30: 2000 3010 8c5f 0100 6701 0001 8015 0000 .0.._..g....... |
| 1719 | 00000f40: 2000 3010 0000 0000 c801 1400 0000 0000 .0............. |
| 1720 | 00000f50: 0000 0000 ffff ffff ffff ffff ffff ff07 ................ |
| 1721 | 00000f60: 0800 0000 0700 0000 6e02 0200 5301 0001 ........n...S... |
| 1722 | 00000f70: 8015 0000 2000 3010 0100 0000 c801 1400 .... .0......... |
| 1723 | 00000f80: 0000 0000 0000 0000 2000 3010 0000 0000 ........ .0..... |
| 1724 | 00000f90: 0100 0000 0000 0000 0100 0000 0000 0000 ................ |
| 1725 | 00000fa0: 0000 0000 cc3a 0300 3f01 0002 8015 0000 .....:..?....... |
| 1726 | 00000fb0: 2000 3010 7106 3200 c801 1400 0000 0000 .0.q.2......... |
| 1727 | 00000fc0: 0800 0000 0000 0000 0100 0000 0000 0000 ................ |
| 1728 | 00000fd0: 8081 3010 3d00 0000 f542 0000 0000 0000 ..0.=....B...... |
| 1729 | 00000fe0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ |
| 1730 | 00000ff0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ |
| 1731 | )", |
| 1732 | }; |
| 1733 | |
| 1734 | TEST(CpuReaderTest, ParseExt4WithOverwrite) { |
| 1735 | const ExamplePage* test_case = &g_full_page_ext4; |
| 1736 | |
| 1737 | BundleProvider bundle_provider(base::kPageSize); |
| 1738 | ProtoTranslationTable* table = GetTable(test_case->name); |
| 1739 | auto page = PageFromXxd(test_case->data); |
| 1740 | |
| 1741 | EventFilter filter(*table, {"sched_switch"}); |
| 1742 | |
Hector Dearman | c848803 | 2018-03-02 13:12:01 +0000 | [diff] [blame] | 1743 | FtraceMetadata metadata{}; |
Hector Dearman | 1f14b62 | 2018-02-27 11:17:37 +0000 | [diff] [blame] | 1744 | ASSERT_TRUE(CpuReader::ParsePage(page.get(), &filter, |
Hector Dearman | c848803 | 2018-03-02 13:12:01 +0000 | [diff] [blame] | 1745 | bundle_provider.writer(), table, &metadata)); |
Hector Dearman | 1f14b62 | 2018-02-27 11:17:37 +0000 | [diff] [blame] | 1746 | |
| 1747 | auto bundle = bundle_provider.ParseProto(); |
| 1748 | ASSERT_TRUE(bundle); |
Hector Dearman | c848803 | 2018-03-02 13:12:01 +0000 | [diff] [blame] | 1749 | EXPECT_EQ(metadata.overwrite_count, 192ul); |
Hector Dearman | 1f14b62 | 2018-02-27 11:17:37 +0000 | [diff] [blame] | 1750 | } |
| 1751 | |
Primiano Tucci | 4f9b6d7 | 2017-12-05 20:59:16 +0000 | [diff] [blame] | 1752 | } // namespace perfetto |