Lines Matching refs:attr
139 HLOGW("attr size %" PRId64 " doesn't match expected size %zu", header_.attrSize,
144 CHECK_TRUE(attrCount == 0, false, 1, "no attr in file");
154 perf_file_attr attr {};
155 size_t attrSize = header_.attrSize - sizeof(attr.ids);
164 attr.attr = *(reinterpret_cast<perf_event_attr *>(&buf[0]));
165 attr.ids = *(reinterpret_cast<perf_file_section *>(&buf[attrSize]));
166 vecAttr_.push_back(attr);
169 // read ids for attr
175 // map ids to attr index
184 bool PerfFileReader::ReadIdsForAttr(const perf_file_attr &attr, std::vector<uint64_t> *ids)
186 if (attr.ids.size > 0) {
187 size_t count = attr.ids.size / sizeof(uint64_t);
188 if (fseek(fp_, attr.ids.offset, SEEK_SET) != 0) {
194 CHECK_TRUE(!Read(ids->data(), attr.ids.size), false, 0, "");
204 result[i].attr = vecAttr_[i].attr;
234 return &(vecAttr_[0].attr);
247 const perf_event_attr *attr = GetDefaultAttr();
248 CHECK_TRUE(attr == nullptr, false, 1, "attr is null");
279 static_cast<perf_event_type>(header->type), data, *attr);