/system/extras/simpleperf/ |
D | event_attr.cpp | 75 perf_event_attr attr; in CreateDefaultPerfEventAttr() local 76 memset(&attr, 0, sizeof(attr)); in CreateDefaultPerfEventAttr() 77 attr.size = sizeof(perf_event_attr); in CreateDefaultPerfEventAttr() 78 attr.type = event_type.type; in CreateDefaultPerfEventAttr() 79 attr.config = event_type.config; in CreateDefaultPerfEventAttr() 80 attr.mmap = 1; in CreateDefaultPerfEventAttr() 81 attr.comm = 1; in CreateDefaultPerfEventAttr() 82 attr.disabled = 1; in CreateDefaultPerfEventAttr() 85 attr.read_format = in CreateDefaultPerfEventAttr() 87 attr.sample_type |= PERF_SAMPLE_IP | PERF_SAMPLE_TID | PERF_SAMPLE_TIME | PERF_SAMPLE_PERIOD; in CreateDefaultPerfEventAttr() [all …]
|
D | record.cpp | 66 size_t SampleId::CreateContent(const perf_event_attr& attr) { in CreateContent() argument 67 sample_id_all = attr.sample_id_all; in CreateContent() 68 sample_type = attr.sample_type; in CreateContent() 91 void SampleId::ReadFromBinaryFormat(const perf_event_attr& attr, const char* p, const char* end) { in ReadFromBinaryFormat() argument 92 sample_id_all = attr.sample_id_all; in ReadFromBinaryFormat() 93 sample_type = attr.sample_type; in ReadFromBinaryFormat() 173 MmapRecord::MmapRecord(const perf_event_attr& attr, const perf_event_header* pheader) in MmapRecord() argument 181 sample_id.ReadFromBinaryFormat(attr, p, end); in MmapRecord() 201 CommRecord::CommRecord(const perf_event_attr& attr, const perf_event_header* pheader) in CommRecord() argument 209 sample_id.ReadFromBinaryFormat(attr, p, end); in CommRecord() [all …]
|
D | record.h | 87 size_t CreateContent(const perf_event_attr& attr); 90 void ReadFromBinaryFormat(const perf_event_attr& attr, const char* p, const char* end); 132 MmapRecord(const perf_event_attr& attr, const perf_event_header* pheader); 148 CommRecord(const perf_event_attr& attr, const perf_event_header* pheader); 162 ExitRecord(const perf_event_attr& attr, const perf_event_header* pheader); 180 SampleRecord(const perf_event_attr& attr, const perf_event_header* pheader); 202 std::unique_ptr<const Record> ReadRecordFromBuffer(const perf_event_attr& attr, 204 MmapRecord CreateMmapRecord(const perf_event_attr& attr, bool in_kernel, uint32_t pid, uint32_t tid, 207 CommRecord CreateCommRecord(const perf_event_attr& attr, uint32_t pid, uint32_t tid,
|
D | event_fd.cpp | 35 static int perf_event_open(perf_event_attr* attr, pid_t pid, int cpu, int group_fd, in perf_event_open() argument 37 return syscall(__NR_perf_event_open, attr, pid, cpu, group_fd, flags); in perf_event_open() 40 std::unique_ptr<EventFd> EventFd::OpenEventFileForProcess(const perf_event_attr& attr, pid_t pid) { in OpenEventFileForProcess() argument 41 return OpenEventFile(attr, pid, -1); in OpenEventFileForProcess() 44 std::unique_ptr<EventFd> EventFd::OpenEventFileForCpu(const perf_event_attr& attr, int cpu) { in OpenEventFileForCpu() argument 45 return OpenEventFile(attr, -1, cpu); in OpenEventFileForCpu() 48 std::unique_ptr<EventFd> EventFd::OpenEventFile(const perf_event_attr& attr, pid_t pid, int cpu) { in OpenEventFile() argument 49 perf_event_attr perf_attr = attr; in OpenEventFile()
|
D | record_file.cpp | 89 FileAttr attr; in WriteAttrSection() local 90 attr.attr = event_attr; in WriteAttrSection() 91 attr.ids.offset = id_section_offset; in WriteAttrSection() 92 attr.ids.size = ids.size() * sizeof(uint64_t); in WriteAttrSection() 98 if (!Write(&attr, sizeof(attr))) { in WriteAttrSection() 108 attr_section_size_ = sizeof(attr); in WriteAttrSection() 383 const FileAttr* attr = reinterpret_cast<const FileAttr*>(mmap_addr_ + header->attrs.offset); in AttrSection() local 385 result.push_back(attr++); in AttrSection() 390 std::vector<uint64_t> RecordFileReader::IdsForAttr(const FileAttr* attr) { in IdsForAttr() argument 392 size_t id_count = attr->ids.size / sizeof(uint64_t); in IdsForAttr() [all …]
|
D | event_selection_set.cpp | 46 perf_event_attr& attr = selection.event_attr; in SetSampleFreq() local 47 attr.freq = 1; in SetSampleFreq() 48 attr.sample_freq = sample_freq; in SetSampleFreq() 54 perf_event_attr& attr = selection.event_attr; in SetSamplePeriod() local 55 attr.freq = 0; in SetSamplePeriod() 56 attr.sample_period = sample_period; in SetSamplePeriod()
|
D | cmd_dumprecord.cpp | 144 auto& attr = attrs[i]; in DumpAttrSection() local 146 DumpPerfEventAttr(attr->attr, 1); in DumpAttrSection() 147 printf(" ids[file_section]: offset %" PRId64 ", size %" PRId64 "\n", attr->ids.offset, in DumpAttrSection() 148 attr->ids.size); in DumpAttrSection() 149 std::vector<uint64_t> ids = record_file_reader_->IdsForAttr(attr); in DumpAttrSection()
|
D | event_fd.h | 40 static std::unique_ptr<EventFd> OpenEventFileForProcess(const perf_event_attr& attr, pid_t pid); 41 static std::unique_ptr<EventFd> OpenEventFileForCpu(const perf_event_attr& attr, int cpu); 42 static std::unique_ptr<EventFd> OpenEventFile(const perf_event_attr& attr, pid_t pid, int cpu);
|
/system/extras/tests/bionic/libc/common/ |
D | test_pthread_mutex.c | 111 static void do_test_mutex_1(pthread_mutexattr_t *attr) in do_test_mutex_1() argument 116 TZERO(pthread_mutex_init(lock, attr)); in do_test_mutex_1() 122 static void set_mutexattr_type(pthread_mutexattr_t *attr, int type) in set_mutexattr_type() argument 125 TZERO(pthread_mutexattr_settype(attr, type)); in set_mutexattr_type() 127 TZERO(pthread_mutexattr_gettype(attr, &newtype)); in set_mutexattr_type() 135 pthread_mutexattr_t attr[1]; in do_test_1() local 141 TZERO(pthread_mutexattr_init(attr)); in do_test_1() 143 set_mutexattr_type(attr, PTHREAD_MUTEX_NORMAL); in do_test_1() 144 do_test_mutex_1(attr); in do_test_1() 146 set_mutexattr_type(attr, PTHREAD_MUTEX_RECURSIVE); in do_test_1() [all …]
|
D | test_pthread_rwlock.c | 110 static void do_test_rwlock_rd1(pthread_rwlockattr_t *attr) in do_test_rwlock_rd1() argument 115 TZERO(pthread_rwlock_init(lock, attr)); in do_test_rwlock_rd1() 121 static void do_test_rwlock_wr1(pthread_rwlockattr_t *attr) in do_test_rwlock_wr1() argument 126 TZERO(pthread_rwlock_init(lock, attr)); in do_test_rwlock_wr1() 132 static void set_rwlockattr_shared(pthread_rwlockattr_t *attr, int shared) in set_rwlockattr_shared() argument 135 TZERO(pthread_rwlockattr_setpshared(attr, shared)); in set_rwlockattr_shared() 137 TZERO(pthread_rwlockattr_getpshared(attr, &newshared)); in set_rwlockattr_shared() 145 pthread_rwlockattr_t attr[1]; in do_test_1() local 152 TZERO(pthread_rwlockattr_init(attr)); in do_test_1() 154 set_rwlockattr_shared(attr, PTHREAD_PROCESS_PRIVATE); in do_test_1() [all …]
|
/system/extras/taskstats/ |
D | taskstats.c | 73 struct nlattr* attr = genlmsg_attrdata(gnlh, 0); in parse_family_id() local 77 if (attr->nla_type == CTRL_ATTR_FAMILY_ID) { in parse_family_id() 78 *((int*)arg) = nla_get_u16(attr); in parse_family_id() 81 } while ((attr = nla_next(attr, &remaining))); in parse_family_id() 106 void parse_aggregate_task_stats(struct nlattr* attr, int attr_size, in parse_aggregate_task_stats() argument 109 switch (attr->nla_type) { in parse_aggregate_task_stats() 111 stats->pid = nla_get_u32(attr); in parse_aggregate_task_stats() 114 stats->tgid = nla_get_u32(attr); in parse_aggregate_task_stats() 117 nla_memcpy(&stats->stats, attr, sizeof(stats->stats)); in parse_aggregate_task_stats() 122 } while ((attr = nla_next(attr, &attr_size))); in parse_aggregate_task_stats() [all …]
|
/system/core/include/utils/ |
D | RWLock.h | 92 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()
|
D | Mutex.h | 110 pthread_mutexattr_t attr; in Mutex() local 111 pthread_mutexattr_init(&attr); in Mutex() 112 pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED); in Mutex() 113 pthread_mutex_init(&mMutex, &attr); in Mutex() 114 pthread_mutexattr_destroy(&attr); in Mutex()
|
D | Condition.h | 93 pthread_condattr_t attr; in Condition() local 94 pthread_condattr_init(&attr); in Condition() 95 pthread_condattr_setpshared(&attr, PTHREAD_PROCESS_SHARED); in Condition() 96 pthread_cond_init(&mCond, &attr); in Condition() 97 pthread_condattr_destroy(&attr); in Condition()
|
/system/bt/gki/ulinux/ |
D | gki_ulinux.c | 37 pthread_mutexattr_t attr; in init() local 38 pthread_mutexattr_init(&attr); in init() 39 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP); in init() 40 pthread_mutex_init(&gki_cb.lock, &attr); in init()
|
/system/extras/perfprofd/quipper/ |
D | perf_reader.cc | 133 perf_event_attr attr; in CheckNoPerfEventAttrPadding() local 134 CHECK_EQ(sizeof(attr), in CheckNoPerfEventAttrPadding() 135 (reinterpret_cast<u64>(&attr.__reserved_2) - in CheckNoPerfEventAttrPadding() 136 reinterpret_cast<u64>(&attr)) + in CheckNoPerfEventAttrPadding() 137 sizeof(attr.__reserved_2)); in CheckNoPerfEventAttrPadding() 888 PerfFileAttr attr; in ReadAttr() local 889 if (!ReadEventAttr(data, offset, &attr.attr)) in ReadAttr() 900 size_t num_ids = ids.size / sizeof(decltype(attr.ids)::value_type); in ReadAttr() 903 if (!ReadUniqueIDs(data, num_ids, &ids_offset, &attr.ids)) in ReadAttr() 905 attrs_.push_back(attr); in ReadAttr() [all …]
|
/system/core/debuggerd/ |
D | crasher.c | 77 pthread_attr_t attr; in ctest() local 78 pthread_attr_init(&attr); in ctest() 79 pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); in ctest() 80 pthread_create(&thr, &attr, noisy, (void*) 'A'); in ctest() 81 pthread_create(&thr, &attr, noisy, (void*) 'B'); in ctest() 82 pthread_create(&thr, &attr, noisy, (void*) 'C'); in ctest()
|
/system/core/libbacktrace/ |
D | ThreadEntry.cpp | 37 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()
|
D | backtrace_test.cpp | 424 pthread_attr_t attr; in TEST() local 425 pthread_attr_init(&attr); in TEST() 426 pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); in TEST() 429 ASSERT_TRUE(pthread_create(&thread, &attr, PtraceThreadLevelRun, nullptr) == 0); in TEST() 495 pthread_attr_t attr; in TEST() local 496 pthread_attr_init(&attr); in TEST() 497 pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); in TEST() 501 ASSERT_TRUE(pthread_create(&thread, &attr, ThreadLevelRun, &thread_data) == 0); in TEST() 544 pthread_attr_t attr; in TEST() local 545 pthread_attr_init(&attr); in TEST() [all …]
|
/system/bt/stack/avrc/ |
D | avrc_utils.c | 137 BOOLEAN AVRC_IsValidPlayerAttr(UINT8 attr) in AVRC_IsValidPlayerAttr() argument 141 if ( (attr >= AVRC_PLAYER_SETTING_EQUALIZER && attr <= AVRC_PLAYER_SETTING_SCAN) || in AVRC_IsValidPlayerAttr() 142 (attr >= AVRC_PLAYER_SETTING_LOW_MENU_EXT) ) in AVRC_IsValidPlayerAttr()
|
/system/core/logd/ |
D | LogTimes.cpp | 50 pthread_attr_t attr; in startReader_Locked() local 54 if (!pthread_attr_init(&attr)) { in startReader_Locked() 55 if (!pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED)) { in startReader_Locked() 56 if (!pthread_create(&mThread, &attr, in startReader_Locked() 58 pthread_attr_destroy(&attr); in startReader_Locked() 62 pthread_attr_destroy(&attr); in startReader_Locked()
|
D | main.cpp | 376 pthread_attr_t attr; in main() local 377 if (!pthread_attr_init(&attr)) { in main() 381 pthread_attr_setschedparam(&attr, ¶m); in main() 382 pthread_attr_setschedpolicy(&attr, SCHED_BATCH); in main() 383 if (!pthread_attr_setdetachstate(&attr, in main() 387 if (pthread_create(&thread, &attr, reinit_thread_start, NULL)) { in main() 391 pthread_attr_destroy(&attr); in main()
|
/system/extras/perfprofd/quipper/original-kernel-headers/tools/perf/ |
D | perf.h | 155 void test_attr__open(struct perf_event_attr *attr, pid_t pid, int cpu, 159 sys_perf_event_open(struct perf_event_attr *attr, in sys_perf_event_open() argument 165 fd = syscall(__NR_perf_event_open, attr, pid, cpu, in sys_perf_event_open() 169 test_attr__open(attr, pid, cpu, fd, group_fd, flags); in sys_perf_event_open()
|
/system/core/init/ |
D | ueventd.cpp | 100 char *attr = 0; in set_device_permission() local 120 attr = args[1]; in set_device_permission() 171 add_dev_perms(name, attr, perm, uid, gid, prefix, wildcard); in set_device_permission()
|
/system/bt/btif/co/ |
D | bta_gattc_co.c | 117 tBTA_GATTC_NV_ATTR attr[BTA_GATTC_NV_LOAD_MAX]; in bta_gattc_co_cache_load() local 122 num_attr = fread(attr, sizeof(tBTA_GATTC_NV_ATTR), BTA_GATTC_NV_LOAD_MAX, sCacheFD); in bta_gattc_co_cache_load() 128 bta_gattc_ci_cache_load(server_bda, evt, num_attr, attr, status, conn_id); in bta_gattc_co_cache_load()
|