Home
last modified time | relevance | path

Searched refs:counter (Results 1 – 25 of 41) sorted by relevance

12

/system/chre/platform/linux/tests/
Dtask_manager_test.cc38 uint32_t counter = 0; in TEST() local
44 auto incrementFunc = [&mutex, &condVar, &counter]() { in TEST()
47 ++counter; in TEST()
60 condVar.wait(lock, [&counter]() { return counter >= numTasks; }); in TEST()
62 EXPECT_EQ(counter, numTasks); in TEST()
66 uint32_t counter = 0; in TEST() local
72 auto incrementFunc = [&mutex, &condVar, &counter]() { in TEST()
75 ++counter; in TEST()
94 lock, [&counter]() { return counter >= numTasks + taskRepeatTimesMax; }); in TEST()
97 EXPECT_GE(counter, numTasks + taskRepeatTimesMax); in TEST()
[all …]
/system/extras/simpleperf/
Drecord_lib_test.cpp41 TEST(counter, add_event) { in TEST() argument
58 for (auto& counter : counters) { in TEST() local
59 ASSERT_GE(counter.value, 0u); in TEST()
60 ASSERT_GE(counter.time_enabled_in_ns, 0u); in TEST()
61 ASSERT_GE(counter.time_running_in_ns, 0u); in TEST()
62 ASSERT_LE(counter.time_running_in_ns, counter.time_enabled_in_ns); in TEST()
67 TEST(counter, different_targets) { in TEST() argument
94 TEST(counter, start_stop_multiple_times) { in TEST() argument
124 TEST(counter, no_change_after_stop) { in TEST() argument
Devent_fd.cpp106 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 …]
Drecord_lib_interface.cpp163 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()
Dcmd_stat_impl.h41 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()
195 for (const auto& counter : info.counters) { in AddCountersForOneEventType() local
198 key |= counter.tid; in AddCountersForOneEventType()
[all …]
Dcmd_stat_test.cpp392 PerfCounter counter; in TEST() local
393 counter.value = 1; in TEST()
394 counter.time_enabled = 2; in TEST()
395 counter.time_running = 3; in TEST()
397 a.FromCounter(counter); in TEST()
409 b.ToCounter(counter); in TEST()
410 ASSERT_EQ(counter.value, 2); in TEST()
411 ASSERT_EQ(counter.time_enabled, 4); in TEST()
412 ASSERT_EQ(counter.time_running, 6); in TEST()
498 CounterInfo& counter = info.counters.back(); in AddCounter() local
[all …]
Dcmd_stat.cpp820 PerfCounter counter; in CheckHardwareCountersOnCpu() local
821 if (!event_fd->ReadCounter(&counter)) { in CheckHardwareCountersOnCpu()
824 if (counter.time_enabled == 0 || counter.time_enabled > counter.time_running) { in CheckHardwareCountersOnCpu()
918 PerfCounter& counter = counters_per_event[j].counter; in AdjustToIntervalOnlyValues() local
920 new_sum.FromCounter(counter); in AdjustToIntervalOnlyValues()
922 delta.ToCounter(counter); in AdjustToIntervalOnlyValues()
944 counter_info.counter.value, counter_info.counter.time_enabled, in ShowCounters()
945 counter_info.counter.time_running, counter_info.counter.id); in ShowCounters()
951 counter_info.counter.value, counter_info.counter.time_enabled, in ShowCounters()
952 counter_info.counter.time_running, counter_info.counter.id); in ShowCounters()
Dtest_util.cpp113 PerfCounter counter; in HasNonZeroInstructionEventCount() local
114 if (event_fd->ReadCounter(&counter)) { in HasNonZeroInstructionEventCount()
115 return counter.value != 0; in HasNonZeroInstructionEventCount()
Devent_fd.h66 bool ReadCounter(PerfCounter* counter);
128 bool InnerReadCounter(PerfCounter* counter) const;
Devent_selection_set.cpp813 static bool ReadCounter(EventFd* event_fd, CounterInfo* counter) { in ReadCounter() argument
814 if (!event_fd->ReadCounter(&counter->counter)) { in ReadCounter()
817 counter->tid = event_fd->ThreadId(); in ReadCounter()
818 counter->cpu = event_fd->Cpu(); in ReadCounter()
832 CounterInfo counter; in ReadCounters() local
833 if (!ReadCounter(event_fd.get(), &counter)) { in ReadCounters()
836 counters_info.counters.push_back(counter); in ReadCounters()
/system/core/trusty/coverage/
Dcoverage_test.cpp60 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()
Dcoverage.cpp257 uint64_t counter = 0; in TotalEdgeCounts() local
265 counter += *x; in TotalEdgeCounts()
268 return counter; in TotalEdgeCounts()
/system/keymaster/km_openssl/
Diso18033kdf.cpp41 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/
DSleepActivity.java18 volatile int counter = 0; in createRunSleepThread()
25 counter = callFunction(counter); in createRunSleepThread()
/system/extras/simpleperf/demo/SimpleperfExampleKotlin/app/src/main/java/simpleperf/example/kotlin/
DSleepActivity.kt15 var counter = 0 in createRunSleepThread() variable
23 counter = callFunction(counter) in createRunSleepThread()
/system/core/storaged/
Dstoraged_diskstats.cpp80 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/
Dfsverity_init.cpp66 int counter = 0; in LoadKeyFromDirectory() local
69 std::string keyname = keyname_prefix + std::to_string(counter); in LoadKeyFromDirectory()
70 counter++; in LoadKeyFromDirectory()
/system/chre/apps/nearby/location/lbs/contexthub/nanoapps/nearby/crypto/
Dhkdf.c62 uint8_t counter = (uint8_t)(i + 1); in hkdfExpand() local
67 hmacUpdate(&hmacCtx, &counter, sizeof(counter)); in hkdfExpand()
/system/librustutils/
Dsystem_properties_fuzzer.rs50 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/
Dapc.rs107 counter: u32, field
115 let back_off = match self.counter { in get_remaining_back_off()
123 .checked_mul(1u32 << (self.counter - 6)) in get_remaining_back_off()
139 Self { counter: 0u32, timestamp: Instant::now() } in default()
220 rate_info.counter += 1; in result()
/system/core/libsync/tests/
Dsync_test.cpp517 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/core/healthd/
Dcharger_test.cpp72 int energyCounter(int64_t* counter) { in energyCounter() argument
73 *counter = 0xEC12345; in energyCounter()
/system/tools/hidl/test/lazy_test/
Dhidl_lazy_test.cpp245 eventfd_t counter; in TEST_F() local
246 rc = TEMP_FAILURE_RETRY(eventfd_read(uniqueEventFd.get(), &counter)); in TEST_F()
248 ASSERT_EQ(counter, 1); in TEST_F()
/system/keymaster/legacy_support/
Dkeymaster1_legacy_support.cpp52 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/libziparchive/
Dzip_archive_benchmark.cpp112 int counter = 0; in StartAlignedEntry() local
114 writer.StartAlignedEntry(name + std::to_string(counter++), 0, alignment); in StartAlignedEntry()

12