Home
last modified time | relevance | path

Searched refs:attr (Results 1 – 25 of 117) sorted by relevance

12345

/system/extras/simpleperf/
Devent_attr.cpp79 perf_event_attr attr; in CreateDefaultPerfEventAttr() local
80 memset(&attr, 0, sizeof(attr)); in CreateDefaultPerfEventAttr()
81 attr.size = sizeof(perf_event_attr); in CreateDefaultPerfEventAttr()
82 attr.type = event_type.type; in CreateDefaultPerfEventAttr()
83 attr.config = event_type.config; in CreateDefaultPerfEventAttr()
84 attr.disabled = 0; in CreateDefaultPerfEventAttr()
87 attr.read_format = in CreateDefaultPerfEventAttr()
89 attr.sample_type |= PERF_SAMPLE_IP | PERF_SAMPLE_TID | PERF_SAMPLE_TIME | PERF_SAMPLE_PERIOD | in CreateDefaultPerfEventAttr()
92 if (attr.type == PERF_TYPE_TRACEPOINT) { in CreateDefaultPerfEventAttr()
95 attr.sample_type |= PERF_SAMPLE_RAW; in CreateDefaultPerfEventAttr()
[all …]
Devent_attr.h30 const perf_event_attr* attr; member
35 void DumpPerfEventAttr(const perf_event_attr& attr, size_t indent = 0);
39 bool IsTimestampSupported(const perf_event_attr& attr);
40 bool IsCpuSupported(const perf_event_attr& attr);
43 std::string GetEventNameByAttr(const perf_event_attr& attr);
DRecordReadThread_test.cpp80 RecordParser parser(*reader->AttrSection()[0].attr); in TEST()
117 MockEventFd(const perf_event_attr& attr, int cpu, char* buffer, size_t buffer_size, in MockEventFd()
119 : EventFd(attr, -1, "", 0, cpu) { in MockEventFd()
147 const perf_event_attr& attr, size_t record_count, size_t stack_size, size_t dyn_stack_size) { in CreateFakeRecords() argument
150 SampleRecord* r = new SampleRecord(attr, i, i + 1, i + 2, i + 3, i + 4, i + 5, i + 6, {}, in CreateFakeRecords()
174 perf_event_attr attr = CreateFakeEventAttr(); in TEST() local
175 std::vector<std::unique_ptr<Record>> records = CreateFakeRecords(attr, 10, 0, 0); in TEST()
190 MockEventFd event_fd(attr, 0, buffer.data(), buffer.size(), false); in TEST()
196 RecordParser parser(attr); in TEST()
212 std::vector<EventFd*> CreateFakeEventFds(const perf_event_attr& attr, size_t event_fd_count) { in CreateFakeEventFds() argument
[all …]
Drecord_file_test.cpp40 perf_event_attr attr = CreateDefaultPerfEventAttr(event_type_modifier->event_type); in AddEventType() local
41 attr.sample_id_all = 1; in AddEventType()
42 attrs_.push_back(std::unique_ptr<perf_event_attr>(new perf_event_attr(attr))); in AddEventType()
44 attr_id.attr = attrs_.back().get(); in AddEventType()
64 MmapRecord mmap_record(*(attr_ids_[0].attr), true, 1, 1, 0x1000, 0x2000, in TEST_F()
86 ASSERT_EQ(0, memcmp(attrs[0].attr, attr_ids_[0].attr, sizeof(perf_event_attr))); in TEST_F()
121 ASSERT_EQ(0, memcmp(attrs[i].attr, attr_ids_[i].attr, sizeof(perf_event_attr))); in TEST_F()
Dcpu_hotplug_test.cpp239 perf_event_attr attr = CreateDefaultPerfEventAttr(event_type_modifier->event_type); in TEST() local
240 attr.disabled = 0; in TEST()
241 attr.enable_on_exec = 0; in TEST()
261 EventFd::OpenEventFile(attr, -1, test_cpu, nullptr, event_type_modifier->name, false); in TEST()
296 perf_event_attr attr = CreateDefaultPerfEventAttr(event_type_modifier->event_type); in TEST() local
297 attr.disabled = 1; in TEST()
298 attr.enable_on_exec = 0; in TEST()
318 EventFd::OpenEventFile(attr, -1, test_cpu, nullptr, event_type_modifier->name, false); in TEST()
380 perf_event_attr attr = CreateDefaultPerfEventAttr(event_type_modifier->event_type); in TEST() local
382 attr.disabled = 0; in TEST()
[all …]
Devent_selection_set.cpp45 perf_event_attr attr = CreateDefaultPerfEventAttr(*type); in IsBranchSamplingSupported() local
46 attr.sample_type |= PERF_SAMPLE_BRANCH_STACK; in IsBranchSamplingSupported()
47 attr.branch_sample_type = PERF_SAMPLE_BRANCH_ANY; in IsBranchSamplingSupported()
48 return IsEventAttrSupported(attr, type->name); in IsBranchSamplingSupported()
56 perf_event_attr attr = CreateDefaultPerfEventAttr(*type); in IsDwarfCallChainSamplingSupported() local
57 attr.sample_type |= in IsDwarfCallChainSamplingSupported()
59 attr.exclude_callchain_user = 1; in IsDwarfCallChainSamplingSupported()
60 attr.sample_regs_user = GetSupportedRegMask(GetBuildArch()); in IsDwarfCallChainSamplingSupported()
61 attr.sample_stack_user = 8192; in IsDwarfCallChainSamplingSupported()
62 return IsEventAttrSupported(attr, type->name); in IsDwarfCallChainSamplingSupported()
[all …]
Drecord.h197 size_t CreateContent(const perf_event_attr& attr, uint64_t event_id);
200 void ReadFromBinaryFormat(const perf_event_attr& attr, const char* p,
281 MmapRecord(const perf_event_attr& attr, char* p);
283 MmapRecord(const perf_event_attr& attr, bool in_kernel, uint32_t pid,
309 Mmap2Record(const perf_event_attr& attr, char* p);
310 Mmap2Record(const perf_event_attr& attr, bool in_kernel, uint32_t pid, uint32_t tid,
328 CommRecord(const perf_event_attr& attr, char* p);
330 CommRecord(const perf_event_attr& attr, uint32_t pid, uint32_t tid,
347 ExitOrForkRecord(const perf_event_attr& attr, char* p);
356 ExitRecord(const perf_event_attr& attr, char* p) in ExitRecord()
[all …]
Dcmd_kmem.cpp269 perf_event_attr attr; member
560 EventAttrWithName attr; in ReadEventAttrsFromRecordFile() local
561 attr.attr = *attr_with_id.attr; in ReadEventAttrsFromRecordFile()
562 attr.event_ids = attr_with_id.ids; in ReadEventAttrsFromRecordFile()
563 attr.name = GetEventNameByAttr(attr.attr); in ReadEventAttrsFromRecordFile()
564 event_attrs_.push_back(attr); in ReadEventAttrsFromRecordFile()
624 for (auto& attr : event_attrs_) { in ProcessTracingData() local
625 if (attr.attr.type == PERF_TYPE_TRACEPOINT) { in ProcessTracingData()
626 uint64_t trace_event_id = attr.attr.config; in ProcessTracingData()
627 attr.name = tracing.GetTracingEventNameHavingId(trace_event_id); in ProcessTracingData()
[all …]
Devent_fd.h41 static std::unique_ptr<EventFd> OpenEventFile(const perf_event_attr& attr, pid_t tid, int cpu,
57 const perf_event_attr& attr() const { return attr_; } in attr() function
110 EventFd(const perf_event_attr& attr, int perf_event_fd, in EventFd() argument
112 : attr_(attr), in EventFd()
154 bool IsEventAttrSupported(const perf_event_attr& attr, const std::string& event_name);
/system/core/libappfuse/tests/
DFuseAppLoopTest.cc155 EXPECT_EQ(10u, response_.entry_out.attr.ino); in TEST_F()
156 EXPECT_EQ(kTestFileSize, response_.entry_out.attr.size); in TEST_F()
157 EXPECT_EQ(0u, response_.entry_out.attr.blocks); in TEST_F()
158 EXPECT_EQ(0u, response_.entry_out.attr.atime); in TEST_F()
159 EXPECT_EQ(0u, response_.entry_out.attr.mtime); in TEST_F()
160 EXPECT_EQ(0u, response_.entry_out.attr.ctime); in TEST_F()
161 EXPECT_EQ(0u, response_.entry_out.attr.atimensec); in TEST_F()
162 EXPECT_EQ(0u, response_.entry_out.attr.mtimensec); in TEST_F()
163 EXPECT_EQ(0u, response_.entry_out.attr.ctimensec); in TEST_F()
164 EXPECT_EQ(S_IFREG | 0777u, response_.entry_out.attr.mode); in TEST_F()
[all …]
/system/bt/bta/test/gatt/
Ddatabase_test.cc90 StoredAttribute attr; in TEST() local
93 memset(&attr, 0, sizeof(attr)); in TEST()
95 attr = { in TEST()
114 EXPECT_EQ(memcmp(binary_form, &attr, len), 0); in TEST()
120 StoredAttribute attr; in TEST() local
123 memset(&attr, 0, sizeof(attr)); in TEST()
125 attr = { in TEST()
148 EXPECT_EQ(memcmp(binary_form, &attr, len), 0); in TEST()
154 StoredAttribute attr; in TEST() local
157 memset(&attr, 0, sizeof(attr)); in TEST()
[all …]
/system/bt/bta/gatt/
Ddatabase.cc128 const auto& attr = *it; in Deserialize() local
129 if (attr.type != PRIMARY_SERVICE && attr.type != SECONDARY_SERVICE) break; in Deserialize()
131 .handle = attr.handle, in Deserialize()
132 .uuid = attr.value.service.uuid, in Deserialize()
133 .is_primary = (attr.type == PRIMARY_SERVICE), in Deserialize()
134 .end_handle = attr.value.service.end_handle, in Deserialize()
140 const auto& attr = *it; in Deserialize() local
145 current_service_it->end_handle < attr.handle) { in Deserialize()
150 !HandleInRange(*current_service_it, attr.handle)) { in Deserialize()
152 << loghex(attr.handle); in Deserialize()
[all …]
/system/core/init/
Dservice_utils.cpp235 Result<void> SetProcessAttributes(const ProcessAttributes& attr) { in SetProcessAttributes() argument
236 if (attr.ioprio_class != IoSchedClass_NONE) { in SetProcessAttributes()
237 if (android_set_ioprio(getpid(), attr.ioprio_class, attr.ioprio_pri)) { in SetProcessAttributes()
238 PLOG(ERROR) << "failed to set pid " << getpid() << " ioprio=" << attr.ioprio_class in SetProcessAttributes()
239 << "," << attr.ioprio_pri; in SetProcessAttributes()
243 if (!attr.console.empty()) { in SetProcessAttributes()
245 OpenConsole(attr.console); in SetProcessAttributes()
250 SetupStdio(attr.stdio_to_kmsg); in SetProcessAttributes()
253 for (const auto& rlimit : attr.rlimits) { in SetProcessAttributes()
260 if (attr.gid) { in SetProcessAttributes()
[all …]
/system/bt/stack/gatt/
Dgatt_db.cc66 tGATT_ATTR& attr = allocate_attr_in_db(db, uuid, GATT_PERM_READ); in gatts_init_service_db() local
67 attr.p_value.reset((tGATT_ATTR_VALUE*)(new Uuid)); in gatts_init_service_db()
68 attr.p_value->uuid = service_uuid; in gatts_init_service_db()
81 static tGATT_STATUS gatts_check_attr_readability(const tGATT_ATTR& attr, in gatts_check_attr_readability() argument
87 tGATT_PERM perm = attr.permission; in gatts_check_attr_readability()
124 if (read_long && attr.uuid.Is16Bit()) { in gatts_check_attr_readability()
125 switch (attr.uuid.As16Bit()) { in gatts_check_attr_readability()
264 for (tGATT_ATTR& attr : p_db->attr_list) { in gatts_db_read_attr_value_by_type()
265 if (attr.handle >= s_handle && type == attr.uuid) { in gatts_db_read_attr_value_by_type()
271 UINT16_TO_STREAM(p, attr.handle); in gatts_db_read_attr_value_by_type()
[all …]
/system/netd/server/
DNFLogListener.cpp65 nfattr attr; in cfgCmdPfUnbind() member
73 msg.attr.nfa_len = sizeof(msg.attr) + sizeof(msg.cmd); in cfgCmdPfUnbind()
74 msg.attr.nfa_type = NFULA_CFG_CMD; in cfgCmdPfUnbind()
86 nfattr attr; in cfgMode() member
95 msg.attr.nfa_len = sizeof(msg.attr) + sizeof(msg.mode); in cfgMode()
96 msg.attr.nfa_type = NFULA_CFG_MODE; in cfgMode()
107 nfattr attr; in cfgCmdBind() member
116 msg.attr.nfa_len = sizeof(msg.attr) + sizeof(msg.cmd); in cfgCmdBind()
117 msg.attr.nfa_type = NFULA_CFG_CMD; in cfgCmdBind()
127 nfattr attr; in cfgCmdUnbind() member
[all …]
DOffloadUtils.cpp165 nlattr attr; in doTcQdiscClsact() member
184 .attr = in doTcQdiscClsact()
277 nlattr attr; in tcFilterAddDevBpf() member
281 nlattr attr; in tcFilterAddDevBpf() member
283 nlattr attr; in tcFilterAddDevBpf() member
287 nlattr attr; in tcFilterAddDevBpf() member
291 nlattr attr; in tcFilterAddDevBpf() member
313 .attr = in tcFilterAddDevBpf()
322 .attr = in tcFilterAddDevBpf()
329 .attr = in tcFilterAddDevBpf()
[all …]
/system/extras/iotop/
Dtaskstats.cpp66 static pid_t ParseAggregateTaskStats(nlattr* attr, int attr_size, in ParseAggregateTaskStats() argument
69 nla_for_each_attr(attr, attr, attr_size, attr_size) { in ParseAggregateTaskStats()
70 switch (nla_type(attr)) { in ParseAggregateTaskStats()
73 received_pid = nla_get_u32(attr); in ParseAggregateTaskStats()
78 len = std::min(len, nla_len(attr)); in ParseAggregateTaskStats()
79 nla_memcpy(stats, attr, len); in ParseAggregateTaskStats()
94 nlattr* attr = genlmsg_attrdata(gnlh, 0); in ParseTaskStats() local
97 nla_for_each_attr(attr, attr, remaining, remaining) { in ParseTaskStats()
98 switch (nla_type(attr)) { in ParseTaskStats()
102 nlattr* nested_attr = static_cast<nlattr*>(nla_data(attr)); in ParseTaskStats()
[all …]
/system/netd/libnetdutils/include/netdutils/
DThreadUtil.h29 scoped_pthread_attr() { pthread_attr_init(&attr); } in scoped_pthread_attr()
30 ~scoped_pthread_attr() { pthread_attr_destroy(&attr); } in ~scoped_pthread_attr()
32 int detach() { return -pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); } in detach()
34 pthread_attr_t attr; member
71 rval = pthread_create(&thread, &scoped_attr.attr, &runAndDelete<T>, obj); in threadLaunch()
/system/core/libutils/include/utils/
DCondition.h100 pthread_condattr_t attr; in Condition() local
101 pthread_condattr_init(&attr); in Condition()
103 pthread_condattr_setclock(&attr, CLOCK_MONOTONIC); in Condition()
107 pthread_condattr_setpshared(&attr, PTHREAD_PROCESS_SHARED); in Condition()
110 pthread_cond_init(&mCond, &attr); in Condition()
111 pthread_condattr_destroy(&attr); in Condition()
DRWLock.h92 pthread_rwlockattr_t attr; in RWLock() local
93 pthread_rwlockattr_init(&attr); in RWLock()
94 pthread_rwlockattr_setpshared(&attr, PTHREAD_PROCESS_SHARED); in RWLock()
95 pthread_rwlock_init(&mRWLock, &attr); in RWLock()
96 pthread_rwlockattr_destroy(&attr); in RWLock()
/system/extras/taskstats/
Dtaskstats.c51 void parse_aggregate_task_stats(struct nlattr* attr, int attr_size, in parse_aggregate_task_stats() argument
53 nla_for_each_attr(attr, attr, attr_size, attr_size) { in parse_aggregate_task_stats()
54 switch (attr->nla_type) { in parse_aggregate_task_stats()
56 stats->pid = nla_get_u32(attr); in parse_aggregate_task_stats()
59 stats->tgid = nla_get_u32(attr); in parse_aggregate_task_stats()
62 nla_memcpy(&stats->stats, attr, sizeof(stats->stats)); in parse_aggregate_task_stats()
73 struct nlattr* attr = genlmsg_attrdata(gnlh, 0); in parse_task_stats() local
76 nla_for_each_attr(attr, attr, remaining, remaining) { in parse_task_stats()
77 switch (attr->nla_type) { in parse_task_stats()
80 parse_aggregate_task_stats(nla_data(attr), nla_len(attr), in parse_task_stats()
/system/chre/platform/slpi/see/
Dplatform_sensor.cc132 SeeAttributes attr; member
460 const sns_std_suid& suid, const SeeAttributes& attr, in addSensor() argument
464 strlcpy(sensorName, attr.vendor, sizeof(sensorName)); in addSensor()
466 strlcat(sensorName, attr.name, sizeof(sensorName)); in addSensor()
472 (attr.maxSampleRate == 0.0f) ? 10 : attr.maxSampleRate; in addSensor()
486 lastEventSize, attr.passiveRequest); in addSensor()
546 SeeAttributes attr; in getSuidAndAttrs() local
547 if (!seeHelper.getAttributesSync(suid, &attr)) { in getSuidAndAttrs()
554 attr.vendor, attr.name, attr.hwId, attr.maxSampleRate, in getSuidAndAttrs()
555 attr.streamType, attr.passiveRequest); in getSuidAndAttrs()
[all …]
/system/tools/xsdc/tests/resources/attr_group_simple/api/
Dcurrent.txt2 package attr.group.simple {
18 …method public static attr.group.simple.Student read(java.io.InputStream) throws javax.xml.datatype…
26 …method public static void write(attr.group.simple.XmlWriter, attr.group.simple.Student) throws jav…
/system/core/libbacktrace/
DThreadEntry.cpp37 pthread_condattr_t attr; in ThreadEntry() local
38 pthread_condattr_init(&attr); in ThreadEntry()
39 pthread_condattr_setclock(&attr, CLOCK_MONOTONIC); in ThreadEntry()
40 pthread_cond_init(&wait_cond_, &attr); in ThreadEntry()
/system/bt/stack/avrc/
Davrc_utils.cc129 bool AVRC_IsValidPlayerAttr(uint8_t attr) { in AVRC_IsValidPlayerAttr() argument
132 if ((attr >= AVRC_PLAYER_SETTING_EQUALIZER && in AVRC_IsValidPlayerAttr()
133 attr <= AVRC_PLAYER_SETTING_SCAN) || in AVRC_IsValidPlayerAttr()
134 (attr >= AVRC_PLAYER_SETTING_LOW_MENU_EXT)) { in AVRC_IsValidPlayerAttr()

12345