• Home
  • Raw
  • Download

Lines Matching refs:p

64 void MoveToBinaryFormat(const RecordHeader& data, char*& p) {  in MoveToBinaryFormat()  argument
65 data.MoveToBinaryFormat(p); in MoveToBinaryFormat()
79 void SampleId::ReadFromBinaryFormat(const perf_event_attr& attr, const char* p, in ReadFromBinaryFormat() argument
85 MoveFromBinaryFormat(tid_data, p); in ReadFromBinaryFormat()
88 MoveFromBinaryFormat(time_data, p); in ReadFromBinaryFormat()
91 MoveFromBinaryFormat(id_data, p); in ReadFromBinaryFormat()
94 MoveFromBinaryFormat(stream_id_data, p); in ReadFromBinaryFormat()
97 MoveFromBinaryFormat(cpu_data, p); in ReadFromBinaryFormat()
100 MoveFromBinaryFormat(id_data, p); in ReadFromBinaryFormat()
103 CHECK_LE(p, end); in ReadFromBinaryFormat()
104 if (p < end) { in ReadFromBinaryFormat()
105 LOG(DEBUG) << "Record SampleId part has " << end - p << " bytes left\n"; in ReadFromBinaryFormat()
109 void SampleId::WriteToBinaryFormat(char*& p) const { in WriteToBinaryFormat()
112 MoveToBinaryFormat(tid_data, p); in WriteToBinaryFormat()
115 MoveToBinaryFormat(time_data, p); in WriteToBinaryFormat()
118 MoveToBinaryFormat(id_data, p); in WriteToBinaryFormat()
121 MoveToBinaryFormat(stream_id_data, p); in WriteToBinaryFormat()
124 MoveToBinaryFormat(cpu_data, p); in WriteToBinaryFormat()
205 MmapRecord::MmapRecord(const perf_event_attr& attr, char* p) : Record(p) { in MmapRecord() argument
206 const char* end = p + size(); in MmapRecord()
207 p += header_size(); in MmapRecord()
208 data = reinterpret_cast<const MmapRecordDataType*>(p); in MmapRecord()
209 p += sizeof(*data); in MmapRecord()
210 filename = p; in MmapRecord()
211 p += Align(strlen(filename) + 1, 8); in MmapRecord()
212 CHECK_LE(p, end); in MmapRecord()
213 sample_id.ReadFromBinaryFormat(attr, p, end); in MmapRecord()
238 char* p = new_binary; in SetDataAndFilename() local
239 MoveToBinaryFormat(header, p); in SetDataAndFilename()
240 this->data = reinterpret_cast<MmapRecordDataType*>(p); in SetDataAndFilename()
241 MoveToBinaryFormat(data, p); in SetDataAndFilename()
242 this->filename = p; in SetDataAndFilename()
243 strcpy(p, filename.c_str()); in SetDataAndFilename()
244 p += Align(filename.size() + 1, 8); in SetDataAndFilename()
245 sample_id.WriteToBinaryFormat(p); in SetDataAndFilename()
257 Mmap2Record::Mmap2Record(const perf_event_attr& attr, char* p) : Record(p) { in Mmap2Record() argument
258 const char* end = p + size(); in Mmap2Record()
259 p += header_size(); in Mmap2Record()
260 data = reinterpret_cast<const Mmap2RecordDataType*>(p); in Mmap2Record()
261 p += sizeof(*data); in Mmap2Record()
262 filename = p; in Mmap2Record()
263 p += Align(strlen(filename) + 1, 8); in Mmap2Record()
264 CHECK_LE(p, end); in Mmap2Record()
265 sample_id.ReadFromBinaryFormat(attr, p, end); in Mmap2Record()
273 char* p = new_binary; in SetDataAndFilename() local
274 MoveToBinaryFormat(header, p); in SetDataAndFilename()
275 this->data = reinterpret_cast<Mmap2RecordDataType*>(p); in SetDataAndFilename()
276 MoveToBinaryFormat(data, p); in SetDataAndFilename()
277 this->filename = p; in SetDataAndFilename()
278 strcpy(p, filename.c_str()); in SetDataAndFilename()
279 p += Align(filename.size() + 1, 8); in SetDataAndFilename()
280 sample_id.WriteToBinaryFormat(p); in SetDataAndFilename()
296 CommRecord::CommRecord(const perf_event_attr& attr, char* p) : Record(p) { in CommRecord() argument
297 const char* end = p + size(); in CommRecord()
298 p += header_size(); in CommRecord()
299 data = reinterpret_cast<const CommRecordDataType*>(p); in CommRecord()
300 p += sizeof(*data); in CommRecord()
301 comm = p; in CommRecord()
302 p += Align(strlen(p) + 1, 8); in CommRecord()
303 CHECK_LE(p, end); in CommRecord()
304 sample_id.ReadFromBinaryFormat(attr, p, end); in CommRecord()
318 char* p = new_binary; in CommRecord() local
319 MoveToBinaryFormat(header, p); in CommRecord()
320 this->data = reinterpret_cast<CommRecordDataType*>(p); in CommRecord()
321 MoveToBinaryFormat(data, p); in CommRecord()
322 this->comm = p; in CommRecord()
323 strcpy(p, comm.c_str()); in CommRecord()
324 p += Align(comm.size() + 1, 8); in CommRecord()
325 sample_id.WriteToBinaryFormat(p); in CommRecord()
334 ExitOrForkRecord::ExitOrForkRecord(const perf_event_attr& attr, char* p) in ExitOrForkRecord() argument
335 : Record(p) { in ExitOrForkRecord()
336 const char* end = p + size(); in ExitOrForkRecord()
337 p += header_size(); in ExitOrForkRecord()
338 data = reinterpret_cast<const ExitOrForkRecordDataType*>(p); in ExitOrForkRecord()
339 p += sizeof(*data); in ExitOrForkRecord()
340 CHECK_LE(p, end); in ExitOrForkRecord()
341 sample_id.ReadFromBinaryFormat(attr, p, end); in ExitOrForkRecord()
361 char* p = new_binary; in ForkRecord() local
362 MoveToBinaryFormat(header, p); in ForkRecord()
363 this->data = reinterpret_cast<ExitOrForkRecordDataType*>(p); in ForkRecord()
364 MoveToBinaryFormat(data, p); in ForkRecord()
365 sample_id.WriteToBinaryFormat(p); in ForkRecord()
369 LostRecord::LostRecord(const perf_event_attr& attr, char* p) : Record(p) { in LostRecord() argument
370 const char* end = p + size(); in LostRecord()
371 p += header_size(); in LostRecord()
372 MoveFromBinaryFormat(id, p); in LostRecord()
373 MoveFromBinaryFormat(lost, p); in LostRecord()
374 CHECK_LE(p, end); in LostRecord()
375 sample_id.ReadFromBinaryFormat(attr, p, end); in LostRecord()
382 SampleRecord::SampleRecord(const perf_event_attr& attr, char* p) : Record(p) { in SampleRecord() argument
383 const char* end = p + size(); in SampleRecord()
384 p += header_size(); in SampleRecord()
390 MoveFromBinaryFormat(id_data, p); in SampleRecord()
393 MoveFromBinaryFormat(ip_data, p); in SampleRecord()
396 MoveFromBinaryFormat(tid_data, p); in SampleRecord()
399 MoveFromBinaryFormat(time_data, p); in SampleRecord()
402 MoveFromBinaryFormat(addr_data, p); in SampleRecord()
405 MoveFromBinaryFormat(id_data, p); in SampleRecord()
408 MoveFromBinaryFormat(stream_id_data, p); in SampleRecord()
411 MoveFromBinaryFormat(cpu_data, p); in SampleRecord()
414 MoveFromBinaryFormat(period_data, p); in SampleRecord()
417 MoveFromBinaryFormat(callchain_data.ip_nr, p); in SampleRecord()
418 callchain_data.ips = reinterpret_cast<uint64_t*>(p); in SampleRecord()
419 p += callchain_data.ip_nr * sizeof(uint64_t); in SampleRecord()
422 MoveFromBinaryFormat(raw_data.size, p); in SampleRecord()
423 raw_data.data = p; in SampleRecord()
424 p += raw_data.size; in SampleRecord()
427 MoveFromBinaryFormat(branch_stack_data.stack_nr, p); in SampleRecord()
428 branch_stack_data.stack = reinterpret_cast<BranchStackItemType*>(p); in SampleRecord()
429 p += branch_stack_data.stack_nr * sizeof(BranchStackItemType); in SampleRecord()
432 MoveFromBinaryFormat(regs_user_data.abi, p); in SampleRecord()
444 regs_user_data.regs = reinterpret_cast<uint64_t*>(p); in SampleRecord()
445 p += bit_nr * sizeof(uint64_t); in SampleRecord()
449 MoveFromBinaryFormat(stack_user_data.size, p); in SampleRecord()
453 stack_user_data.data = p; in SampleRecord()
454 p += stack_user_data.size; in SampleRecord()
455 MoveFromBinaryFormat(stack_user_data.dyn_size, p); in SampleRecord()
459 CHECK_LE(p, end); in SampleRecord()
460 if (p < end) { in SampleRecord()
461 LOG(DEBUG) << "Record has " << end - p << " bytes left\n"; in SampleRecord()
521 char* p = new_binary; in SampleRecord() local
522 MoveToBinaryFormat(header, p); in SampleRecord()
524 MoveToBinaryFormat(ip_data, p); in SampleRecord()
527 MoveToBinaryFormat(tid_data, p); in SampleRecord()
530 MoveToBinaryFormat(time_data, p); in SampleRecord()
533 MoveToBinaryFormat(id_data, p); in SampleRecord()
536 MoveToBinaryFormat(cpu_data, p); in SampleRecord()
539 MoveToBinaryFormat(period_data, p); in SampleRecord()
542 MoveToBinaryFormat(callchain_data.ip_nr, p); in SampleRecord()
543 callchain_data.ips = reinterpret_cast<uint64_t*>(p); in SampleRecord()
544 MoveToBinaryFormat(ips.data(), ips.size(), p); in SampleRecord()
547 MoveToBinaryFormat(regs_user_data.abi, p); in SampleRecord()
550 MoveToBinaryFormat(stack_user_data.size, p); in SampleRecord()
552 CHECK_EQ(p, new_binary + size); in SampleRecord()
565 char* p = binary_; in ReplaceRegAndStackWithCallChain() local
566 MoveToBinaryFormat(header, p); in ReplaceRegAndStackWithCallChain()
567 p = (stack_user_data.data + stack_user_data.size + sizeof(uint64_t)) - in ReplaceRegAndStackWithCallChain()
571 p -= sizeof(uint64_t); in ReplaceRegAndStackWithCallChain()
572 *reinterpret_cast<uint64_t*>(p) = stack_user_data.size; in ReplaceRegAndStackWithCallChain()
573 p -= sizeof(uint64_t); in ReplaceRegAndStackWithCallChain()
574 *reinterpret_cast<uint64_t*>(p) = regs_user_data.abi; in ReplaceRegAndStackWithCallChain()
576 p -= branch_stack_data.stack_nr * sizeof(BranchStackItemType); in ReplaceRegAndStackWithCallChain()
577 memmove(p, branch_stack_data.stack, in ReplaceRegAndStackWithCallChain()
579 p -= sizeof(uint64_t); in ReplaceRegAndStackWithCallChain()
580 *reinterpret_cast<uint64_t*>(p) = branch_stack_data.stack_nr; in ReplaceRegAndStackWithCallChain()
583 p -= raw_data.size; in ReplaceRegAndStackWithCallChain()
584 memmove(p, raw_data.data, raw_data.size); in ReplaceRegAndStackWithCallChain()
585 p -= sizeof(uint32_t); in ReplaceRegAndStackWithCallChain()
586 *reinterpret_cast<uint32_t*>(p) = raw_data.size; in ReplaceRegAndStackWithCallChain()
588 p -= ips.size() * sizeof(uint64_t); in ReplaceRegAndStackWithCallChain()
589 memcpy(p, ips.data(), ips.size() * sizeof(uint64_t)); in ReplaceRegAndStackWithCallChain()
590 p -= sizeof(uint64_t); in ReplaceRegAndStackWithCallChain()
591 *reinterpret_cast<uint64_t*>(p) = PERF_CONTEXT_USER; in ReplaceRegAndStackWithCallChain()
592 p -= sizeof(uint64_t) * (callchain_data.ip_nr); in ReplaceRegAndStackWithCallChain()
593 callchain_data.ips = reinterpret_cast<uint64_t*>(p); in ReplaceRegAndStackWithCallChain()
595 p -= sizeof(uint64_t); in ReplaceRegAndStackWithCallChain()
596 *reinterpret_cast<uint64_t*>(p) = callchain_data.ip_nr; in ReplaceRegAndStackWithCallChain()
655 char* p = new_binary; in UpdateUserCallChain() local
657 MoveToBinaryFormat(header, p); in UpdateUserCallChain()
659 MoveToBinaryFormat(id_data, p); in UpdateUserCallChain()
662 MoveToBinaryFormat(ip_data, p); in UpdateUserCallChain()
665 MoveToBinaryFormat(tid_data, p); in UpdateUserCallChain()
668 MoveToBinaryFormat(time_data, p); in UpdateUserCallChain()
671 MoveToBinaryFormat(addr_data, p); in UpdateUserCallChain()
674 MoveToBinaryFormat(id_data, p); in UpdateUserCallChain()
677 MoveToBinaryFormat(stream_id_data, p); in UpdateUserCallChain()
680 MoveToBinaryFormat(cpu_data, p); in UpdateUserCallChain()
683 MoveToBinaryFormat(period_data, p); in UpdateUserCallChain()
687 MoveToBinaryFormat(callchain_data.ip_nr, p); in UpdateUserCallChain()
688 callchain_data.ips = reinterpret_cast<uint64_t*>(p); in UpdateUserCallChain()
689 MoveToBinaryFormat(kernel_ips.data(), kernel_ips.size(), p); in UpdateUserCallChain()
690 MoveToBinaryFormat(user_ips.data(), user_ips.size(), p); in UpdateUserCallChain()
693 MoveToBinaryFormat(raw_data.size, p); in UpdateUserCallChain()
694 MoveToBinaryFormat(raw_data.data, raw_data.size, p); in UpdateUserCallChain()
695 raw_data.data = p - raw_data.size; in UpdateUserCallChain()
698 MoveToBinaryFormat(branch_stack_data.stack_nr, p); in UpdateUserCallChain()
699 char* old_p = p; in UpdateUserCallChain()
700 MoveToBinaryFormat(branch_stack_data.stack, branch_stack_data.stack_nr, p); in UpdateUserCallChain()
704 MoveToBinaryFormat(regs_user_data.abi, p); in UpdateUserCallChain()
708 MoveToBinaryFormat(stack_user_data.size, p); in UpdateUserCallChain()
711 CHECK_EQ(p, new_binary + new_size) << "sample_type = " << std::hex << sample_type; in UpdateUserCallChain()
725 char* p = stack_user_data.data - sizeof(stack_user_data.size); in RemoveInvalidStackData() local
726 MoveToBinaryFormat(stack_user_data.size, p); in RemoveInvalidStackData()
727 p += valid_stack_size; in RemoveInvalidStackData()
730 MoveToBinaryFormat(stack_user_data.dyn_size, p); in RemoveInvalidStackData()
733 header.size = p - binary_; in RemoveInvalidStackData()
734 p = binary_; in RemoveInvalidStackData()
735 header.MoveToBinaryFormat(p); in RemoveInvalidStackData()
804 const uint64_t* p = reinterpret_cast<const uint64_t*>(stack_user_data.data); in DumpData() local
805 const uint64_t* end = p + (stack_user_data.size / sizeof(uint64_t)); in DumpData()
806 while (p < end) { in DumpData()
808 for (size_t i = 0; i < 4 && p < end; ++i, ++p) { in DumpData()
809 printf(" %016" PRIx64, *p); in DumpData()
847 BuildIdRecord::BuildIdRecord(char* p) : Record(p) { in BuildIdRecord() argument
848 const char* end = p + size(); in BuildIdRecord()
849 p += header_size(); in BuildIdRecord()
850 MoveFromBinaryFormat(pid, p); in BuildIdRecord()
851 build_id = BuildId(p, BUILD_ID_SIZE); in BuildIdRecord()
852 p += Align(build_id.Size(), 8); in BuildIdRecord()
853 filename = p; in BuildIdRecord()
854 p += Align(strlen(filename) + 1, 64); in BuildIdRecord()
855 CHECK_EQ(p, end); in BuildIdRecord()
873 char* p = new_binary; in BuildIdRecord() local
874 MoveToBinaryFormat(header, p); in BuildIdRecord()
875 MoveToBinaryFormat(pid, p); in BuildIdRecord()
876 memcpy(p, build_id.Data(), build_id.Size()); in BuildIdRecord()
877 p += Align(build_id.Size(), 8); in BuildIdRecord()
878 this->filename = p; in BuildIdRecord()
879 strcpy(p, filename.c_str()); in BuildIdRecord()
883 KernelSymbolRecord::KernelSymbolRecord(char* p) : Record(p) { in KernelSymbolRecord() argument
884 const char* end = p + size(); in KernelSymbolRecord()
885 p += header_size(); in KernelSymbolRecord()
886 MoveFromBinaryFormat(kallsyms_size, p); in KernelSymbolRecord()
887 kallsyms = p; in KernelSymbolRecord()
888 p += Align(kallsyms_size, 8); in KernelSymbolRecord()
889 CHECK_EQ(p, end); in KernelSymbolRecord()
902 char* p = new_binary; in KernelSymbolRecord() local
903 MoveToBinaryFormat(header, p); in KernelSymbolRecord()
904 MoveToBinaryFormat(kallsyms_size, p); in KernelSymbolRecord()
905 this->kallsyms = p; in KernelSymbolRecord()
906 memcpy(p, kallsyms.data(), kallsyms_size); in KernelSymbolRecord()
910 DsoRecord::DsoRecord(char* p) : Record(p) { in DsoRecord() argument
911 const char* end = p + size(); in DsoRecord()
912 p += header_size(); in DsoRecord()
913 MoveFromBinaryFormat(dso_type, p); in DsoRecord()
914 MoveFromBinaryFormat(dso_id, p); in DsoRecord()
915 MoveFromBinaryFormat(min_vaddr, p); in DsoRecord()
916 dso_name = p; in DsoRecord()
917 p += Align(strlen(dso_name) + 1, 8); in DsoRecord()
918 CHECK_EQ(p, end); in DsoRecord()
929 char* p = new_binary; in DsoRecord() local
930 MoveToBinaryFormat(header, p); in DsoRecord()
931 MoveToBinaryFormat(dso_type, p); in DsoRecord()
932 MoveToBinaryFormat(dso_id, p); in DsoRecord()
933 MoveToBinaryFormat(min_vaddr, p); in DsoRecord()
934 this->dso_name = p; in DsoRecord()
935 strcpy(p, dso_name.c_str()); in DsoRecord()
947 SymbolRecord::SymbolRecord(char* p) : Record(p) { in SymbolRecord() argument
948 const char* end = p + size(); in SymbolRecord()
949 p += header_size(); in SymbolRecord()
950 MoveFromBinaryFormat(addr, p); in SymbolRecord()
951 MoveFromBinaryFormat(len, p); in SymbolRecord()
952 MoveFromBinaryFormat(dso_id, p); in SymbolRecord()
953 name = p; in SymbolRecord()
954 p += Align(strlen(name) + 1, 8); in SymbolRecord()
955 CHECK_EQ(p, end); in SymbolRecord()
966 char* p = new_binary; in SymbolRecord() local
967 MoveToBinaryFormat(header, p); in SymbolRecord()
968 MoveToBinaryFormat(addr, p); in SymbolRecord()
969 MoveToBinaryFormat(len, p); in SymbolRecord()
970 MoveToBinaryFormat(dso_id, p); in SymbolRecord()
971 this->name = p; in SymbolRecord()
972 strcpy(p, name.c_str()); in SymbolRecord()
983 TracingDataRecord::TracingDataRecord(char* p) : Record(p) { in TracingDataRecord() argument
984 const char* end = p + size(); in TracingDataRecord()
985 p += header_size(); in TracingDataRecord()
986 MoveFromBinaryFormat(data_size, p); in TracingDataRecord()
987 data = p; in TracingDataRecord()
988 p += Align(data_size, 64); in TracingDataRecord()
989 CHECK_EQ(p, end); in TracingDataRecord()
997 char* p = new_binary; in TracingDataRecord() local
998 MoveToBinaryFormat(header, p); in TracingDataRecord()
999 MoveToBinaryFormat(data_size, p); in TracingDataRecord()
1000 data = p; in TracingDataRecord()
1001 memcpy(p, tracing_data.data(), data_size); in TracingDataRecord()
1010 EventIdRecord::EventIdRecord(char* p) : Record(p) { in EventIdRecord() argument
1011 const char* end = p + size(); in EventIdRecord()
1012 p += header_size(); in EventIdRecord()
1013 MoveFromBinaryFormat(count, p); in EventIdRecord()
1014 data = reinterpret_cast<const EventIdData*>(p); in EventIdRecord()
1015 p += sizeof(data[0]) * count; in EventIdRecord()
1016 CHECK_EQ(p, end); in EventIdRecord()
1023 char* p = new_binary; in EventIdRecord() local
1024 MoveToBinaryFormat(header, p); in EventIdRecord()
1026 MoveToBinaryFormat(count, p); in EventIdRecord()
1027 this->data = reinterpret_cast<EventIdData*>(p); in EventIdRecord()
1028 memcpy(p, data.data(), sizeof(uint64_t) * data.size()); in EventIdRecord()
1042 CallChainRecord::CallChainRecord(char* p) : Record(p) { in CallChainRecord() argument
1043 const char* end = p + size(); in CallChainRecord()
1044 p += header_size(); in CallChainRecord()
1045 MoveFromBinaryFormat(pid, p); in CallChainRecord()
1046 MoveFromBinaryFormat(tid, p); in CallChainRecord()
1047 MoveFromBinaryFormat(chain_type, p); in CallChainRecord()
1048 MoveFromBinaryFormat(time, p); in CallChainRecord()
1049 MoveFromBinaryFormat(ip_nr, p); in CallChainRecord()
1050 ips = reinterpret_cast<uint64_t*>(p); in CallChainRecord()
1051 p += ip_nr * sizeof(uint64_t); in CallChainRecord()
1052 sps = reinterpret_cast<uint64_t*>(p); in CallChainRecord()
1053 p += ip_nr * sizeof(uint64_t); in CallChainRecord()
1054 CHECK_EQ(p, end); in CallChainRecord()
1069 char* p = new_binary; in CallChainRecord() local
1070 MoveToBinaryFormat(header, p); in CallChainRecord()
1071 MoveToBinaryFormat(this->pid, p); in CallChainRecord()
1072 MoveToBinaryFormat(this->tid, p); in CallChainRecord()
1073 MoveToBinaryFormat(this->chain_type, p); in CallChainRecord()
1074 MoveToBinaryFormat(this->time, p); in CallChainRecord()
1075 MoveToBinaryFormat(this->ip_nr, p); in CallChainRecord()
1076 this->ips = reinterpret_cast<uint64_t*>(p); in CallChainRecord()
1077 MoveToBinaryFormat(ips.data(), ips.size(), p); in CallChainRecord()
1078 this->sps = reinterpret_cast<uint64_t*>(p); in CallChainRecord()
1079 MoveToBinaryFormat(sps.data(), sps.size(), p); in CallChainRecord()
1101 UnwindingResultRecord::UnwindingResultRecord(char* p) : Record(p) { in UnwindingResultRecord() argument
1102 const char* end = p + size(); in UnwindingResultRecord()
1103 p += header_size(); in UnwindingResultRecord()
1104 MoveFromBinaryFormat(time, p); in UnwindingResultRecord()
1105 MoveFromBinaryFormat(unwinding_result.used_time, p); in UnwindingResultRecord()
1107 MoveFromBinaryFormat(stop_reason, p); in UnwindingResultRecord()
1109 MoveFromBinaryFormat(unwinding_result.stop_info, p); in UnwindingResultRecord()
1110 MoveFromBinaryFormat(unwinding_result.stack_start, p); in UnwindingResultRecord()
1111 MoveFromBinaryFormat(unwinding_result.stack_end, p); in UnwindingResultRecord()
1112 CHECK_EQ(p, end); in UnwindingResultRecord()
1122 char* p = new_binary; in UnwindingResultRecord() local
1123 MoveToBinaryFormat(header, p); in UnwindingResultRecord()
1124 MoveToBinaryFormat(this->time, p); in UnwindingResultRecord()
1125 MoveToBinaryFormat(unwinding_result.used_time, p); in UnwindingResultRecord()
1127 MoveToBinaryFormat(stop_reason, p); in UnwindingResultRecord()
1128 MoveToBinaryFormat(unwinding_result.stop_info, p); in UnwindingResultRecord()
1129 MoveToBinaryFormat(unwinding_result.stack_start, p); in UnwindingResultRecord()
1130 MoveToBinaryFormat(unwinding_result.stack_end, p); in UnwindingResultRecord()
1159 UnknownRecord::UnknownRecord(char* p) : Record(p) { in UnknownRecord() argument
1160 p += header_size(); in UnknownRecord()
1161 data = p; in UnknownRecord()
1166 std::unique_ptr<Record> ReadRecordFromBuffer(const perf_event_attr& attr, uint32_t type, char* p) { in ReadRecordFromBuffer() argument
1169 return std::unique_ptr<Record>(new MmapRecord(attr, p)); in ReadRecordFromBuffer()
1171 return std::unique_ptr<Record>(new Mmap2Record(attr, p)); in ReadRecordFromBuffer()
1173 return std::unique_ptr<Record>(new CommRecord(attr, p)); in ReadRecordFromBuffer()
1175 return std::unique_ptr<Record>(new ExitRecord(attr, p)); in ReadRecordFromBuffer()
1177 return std::unique_ptr<Record>(new ForkRecord(attr, p)); in ReadRecordFromBuffer()
1179 return std::unique_ptr<Record>(new LostRecord(attr, p)); in ReadRecordFromBuffer()
1181 return std::unique_ptr<Record>(new SampleRecord(attr, p)); in ReadRecordFromBuffer()
1183 return std::unique_ptr<Record>(new TracingDataRecord(p)); in ReadRecordFromBuffer()
1185 return std::unique_ptr<Record>(new KernelSymbolRecord(p)); in ReadRecordFromBuffer()
1187 return std::unique_ptr<Record>(new DsoRecord(p)); in ReadRecordFromBuffer()
1189 return std::unique_ptr<Record>(new SymbolRecord(p)); in ReadRecordFromBuffer()
1191 return std::unique_ptr<Record>(new EventIdRecord(p)); in ReadRecordFromBuffer()
1193 return std::unique_ptr<Record>(new CallChainRecord(p)); in ReadRecordFromBuffer()
1195 return std::unique_ptr<Record>(new UnwindingResultRecord(p)); in ReadRecordFromBuffer()
1197 return std::unique_ptr<Record>(new UnknownRecord(p)); in ReadRecordFromBuffer()
1202 uint32_t type, char* p) { in ReadRecordFromOwnedBuffer() argument
1203 std::unique_ptr<Record> record = ReadRecordFromBuffer(attr, type, p); in ReadRecordFromOwnedBuffer()
1207 delete[] p; in ReadRecordFromOwnedBuffer()
1215 char* p = buf; in ReadRecordsFromBuffer() local
1217 while (p < end) { in ReadRecordsFromBuffer()
1218 RecordHeader header(p); in ReadRecordsFromBuffer()
1219 CHECK_LE(p + header.size, end); in ReadRecordsFromBuffer()
1221 result.push_back(ReadRecordFromBuffer(attr, header.type, p)); in ReadRecordsFromBuffer()
1222 p += header.size; in ReadRecordsFromBuffer()
1227 std::unique_ptr<Record> ReadRecordFromBuffer(const perf_event_attr& attr, char* p) { in ReadRecordFromBuffer() argument
1228 auto header = reinterpret_cast<const perf_event_header*>(p); in ReadRecordFromBuffer()
1229 return ReadRecordFromBuffer(attr, header->type, p); in ReadRecordFromBuffer()