/system/extras/simpleperf/ |
D | record_lib_test.cpp | 39 TEST(counter, add_event) { in TEST() argument 56 for (auto& counter : counters) { in TEST() local 57 ASSERT_GE(counter.value, 0u); in TEST() 58 ASSERT_GE(counter.time_enabled_in_ns, 0u); in TEST() 59 ASSERT_GE(counter.time_running_in_ns, 0u); in TEST() 60 ASSERT_LE(counter.time_running_in_ns, counter.time_enabled_in_ns); in TEST() 64 TEST(counter, different_targets) { in TEST() argument 90 TEST(counter, start_stop_multiple_times) { in TEST() argument 119 TEST(counter, no_change_after_stop) { in TEST() argument
|
D | event_fd.cpp | 106 PerfCounter counter; in Id() local 107 if (InnerReadCounter(&counter)) { in Id() 108 id_ = counter.id; in Id() 134 bool EventFd::InnerReadCounter(PerfCounter* counter) const { in InnerReadCounter() 135 CHECK(counter != nullptr); in InnerReadCounter() 136 if (!android::base::ReadFully(perf_event_fd_, counter, sizeof(*counter))) { in InnerReadCounter() 143 bool EventFd::ReadCounter(PerfCounter* counter) { in ReadCounter() argument 144 if (!InnerReadCounter(counter)) { in ReadCounter() 151 counter->value - last_counter_value_); in ReadCounter() 154 counter->value - last_counter_value_); in ReadCounter() [all …]
|
D | record_lib_interface.cpp | 163 Counter counter; in InitAccumulatedCounters() local 164 counter.event = name; in InitAccumulatedCounters() 165 counter.value = 0; in InitAccumulatedCounters() 166 counter.time_enabled_in_ns = 0; in InitAccumulatedCounters() 167 counter.time_running_in_ns = 0; in InitAccumulatedCounters() 168 accumulated_counters_.push_back(counter); in InitAccumulatedCounters() 191 sum.value += c.counter.value; in ReadRawCounters() 192 sum.time_enabled_in_ns += c.counter.time_enabled; in ReadRawCounters() 193 sum.time_running_in_ns += c.counter.time_running; in ReadRawCounters()
|
D | cmd_stat_test.cpp | 358 PerfCounter counter; in TEST() local 359 counter.value = 1; in TEST() 360 counter.time_enabled = 2; in TEST() 361 counter.time_running = 3; in TEST() 363 a.FromCounter(counter); in TEST() 375 b.ToCounter(counter); in TEST() 376 ASSERT_EQ(counter.value, 2); in TEST() 377 ASSERT_EQ(counter.time_enabled, 4); in TEST() 378 ASSERT_EQ(counter.time_running, 6); in TEST() 411 CounterInfo& counter = info.counters.back(); in AddCounter() local [all …]
|
D | cmd_stat_impl.h | 41 void FromCounter(const PerfCounter& counter) { in FromCounter() 42 value = counter.value; in FromCounter() 43 time_enabled = counter.time_enabled; in FromCounter() 44 time_running = counter.time_running; in FromCounter() 47 void ToCounter(PerfCounter& counter) const { in ToCounter() 48 counter.value = value; in ToCounter() 49 counter.time_enabled = time_enabled; in ToCounter() 50 counter.time_running = time_running; in ToCounter() 216 for (const auto& counter : info.counters) { in AddCountersForOneEventType() local 219 key |= counter.tid; in AddCountersForOneEventType() [all …]
|
D | cmd_stat.cpp | 775 PerfCounter counter; in CheckHardwareCountersOnCpu() local 776 if (!event_fd->ReadCounter(&counter)) { in CheckHardwareCountersOnCpu() 779 if (counter.time_enabled == 0 || counter.time_enabled > counter.time_running) { in CheckHardwareCountersOnCpu() 873 PerfCounter& counter = counters_per_event[j].counter; in AdjustToIntervalOnlyValues() local 875 new_sum.FromCounter(counter); in AdjustToIntervalOnlyValues() 877 delta.ToCounter(counter); in AdjustToIntervalOnlyValues() 899 counter_info.counter.value, counter_info.counter.time_enabled, in ShowCounters() 900 counter_info.counter.time_running, counter_info.counter.id); in ShowCounters() 906 counter_info.counter.value, counter_info.counter.time_enabled, in ShowCounters() 907 counter_info.counter.time_running, counter_info.counter.id); in ShowCounters()
|
D | test_util.cpp | 113 PerfCounter counter; in HasNonZeroInstructionEventCount() local 114 if (event_fd->ReadCounter(&counter)) { in HasNonZeroInstructionEventCount() 115 return counter.value != 0; in HasNonZeroInstructionEventCount()
|
D | cmd_list.cpp | 79 PerfCounter counter; in IsEventTypeSupported() local 80 if (!event_fd->ReadCounter(&counter)) { in IsEventTypeSupported() 84 return (counter.value != 0u) ? EventTypeStatus::SUPPORTED : EventTypeStatus::MAY_NOT_SUPPORTED; in IsEventTypeSupported()
|
D | event_fd.h | 66 bool ReadCounter(PerfCounter* counter); 128 bool InnerReadCounter(PerfCounter* counter) const;
|
D | event_selection_set.cpp | 762 static bool ReadCounter(EventFd* event_fd, CounterInfo* counter) { in ReadCounter() argument 763 if (!event_fd->ReadCounter(&counter->counter)) { in ReadCounter() 766 counter->tid = event_fd->ThreadId(); in ReadCounter() 767 counter->cpu = event_fd->Cpu(); in ReadCounter() 781 CounterInfo counter; in ReadCounters() local 782 if (!ReadCounter(event_fd.get(), &counter)) { in ReadCounters() 785 counters_info.counters.push_back(counter); in ReadCounters()
|
/system/core/trusty/coverage/ |
D | coverage_test.cpp | 60 auto counter = record_->TotalEdgeCounts(); in TEST_F() local 61 ASSERT_EQ(counter, 0); in TEST_F() 86 auto counter = record_->TotalEdgeCounts(); in TEST_F() local 88 ASSERT_GE(counter, high_watermark); in TEST_F() 89 high_watermark = counter; in TEST_F()
|
D | coverage.cpp | 261 uint64_t counter = 0; in TotalEdgeCounts() local 269 counter += *x; in TotalEdgeCounts() 272 return counter; in TotalEdgeCounts()
|
/system/keymaster/km_openssl/ |
D | iso18033kdf.cpp | 41 UniquePtr<uint8_t[]> counter(new (std::nothrow) uint8_t[4]); in GenerateKey() local 43 if (!counter.get() || !digest_result.get()) return false; in GenerateKey() 57 !Uint32ToBigEndianByteArray(block + start_counter_, counter.get()) || in GenerateKey() 58 !EVP_DigestUpdate(&ctx, counter.get(), 4)) in GenerateKey()
|
/system/extras/simpleperf/demo/SimpleperfExampleJava/app/src/main/java/simpleperf/example/java/ |
D | SleepActivity.java | 18 volatile int counter = 0; in createRunSleepThread() 25 counter = callFunction(counter); in createRunSleepThread()
|
/system/extras/simpleperf/demo/SimpleperfExampleKotlin/app/src/main/java/simpleperf/example/kotlin/ |
D | SleepActivity.kt | 15 var counter = 0 in createRunSleepThread() variable 23 counter = callFunction(counter) in createRunSleepThread()
|
/system/core/storaged/ |
D | storaged_diskstats.cpp | 80 stats->counter = 1; in init_disk_stats_other() 183 inc->counter = 1; in get_inc_disk_stats() 198 if (dst->counter + src->counter) { in add_disk_stats() 200 ((dst->io_avg * dst->counter) + (src->io_avg * src->counter)) / in add_disk_stats() 201 (dst->counter + src->counter); in add_disk_stats() 203 dst->counter += src->counter; in add_disk_stats()
|
/system/security/fsverity_init/ |
D | fsverity_init.cpp | 69 int counter = 0; in LoadKeyFromDirectory() local 72 std::string keyname = keyname_prefix + std::to_string(counter); in LoadKeyFromDirectory() 73 counter++; in LoadKeyFromDirectory()
|
/system/librustutils/ |
D | system_properties_fuzzer.rs | 50 Property::Unique => COUNTER.with(|counter| { in fmt() 51 let val = *counter.borrow(); in fmt() 52 *counter.borrow_mut() += 1; in fmt()
|
/system/security/keystore2/src/ |
D | apc.rs | 135 counter: u32, field 143 let back_off = match self.counter { in get_remaining_back_off() 151 .checked_mul(1u32 << (self.counter - 6)) in get_remaining_back_off() 167 Self { counter: 0u32, timestamp: Instant::now() } in default() 248 rate_info.counter += 1; in result()
|
/system/core/libsync/tests/ |
D | sync_test.cpp | 517 int counter = 0; in TEST() local 532 ASSERT_EQ(counter, i * 2 + threadId); in TEST() 533 counter++; in TEST() 546 ASSERT_EQ(counter, iterations * 2); in TEST() 553 int counter = 0; in TEST_P() local 579 counter++; in TEST_P() 610 ASSERT_EQ(counter, GetParam()*i); in TEST_P()
|
/system/tools/hidl/test/lazy_test/ |
D | hidl_lazy_test.cpp | 231 eventfd_t counter; in TEST_F() local 232 rc = TEMP_FAILURE_RETRY(eventfd_read(uniqueEventFd.get(), &counter)); in TEST_F() 234 ASSERT_EQ(counter, 1); in TEST_F()
|
/system/core/healthd/ |
D | charger_test.cpp | 72 int energyCounter(int64_t* counter) { in energyCounter() argument 73 *counter = 0xEC12345; in energyCounter()
|
/system/chre/util/tests/ |
D | segmented_queue_test.cc | 389 int8_t counter = 0; in TEST() local 398 [](uint8_t item, void *counter) { in TEST() argument 399 *static_cast<int8_t *>(counter) -= item; in TEST() 401 &counter)); in TEST() 403 EXPECT_EQ(counter, -6); // item 0, 2, 4 is removed. in TEST()
|
/system/keymaster/legacy_support/ |
D | keymaster1_legacy_support.cpp | 52 PushbackCounter counter; in digest_set_is_full() local 54 std::back_inserter(counter)); in digest_set_is_full() 55 return counter.count == full_digest_list.size(); in digest_set_is_full()
|
/system/tools/aidl/tests/lazy_test/ |
D | main.cpp | 237 eventfd_t counter; in TEST_F() local 238 rc = TEMP_FAILURE_RETRY(eventfd_read(parcelEventFd.get(), &counter)); in TEST_F() 240 ASSERT_EQ(counter, 1); in TEST_F()
|