Home
last modified time | relevance | path

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

12

/system/update_engine/payload_generator/
Dcycle_breaker_unittest.cc49 int counter = 0; in TEST() local
50 const Vertex::Index n_a = counter++; in TEST()
51 const Vertex::Index n_b = counter++; in TEST()
52 const Vertex::Index n_c = counter++; in TEST()
53 const Vertex::Index n_d = counter++; in TEST()
54 const Vertex::Index n_e = counter++; in TEST()
55 const Vertex::Index n_f = counter++; in TEST()
56 const Vertex::Index n_g = counter++; in TEST()
57 const Vertex::Index n_h = counter++; in TEST()
58 const Graph::size_type kNodeCount = counter++; in TEST()
[all …]
Dtopological_sort_unittest.cc53 int counter = 0; in TEST() local
54 const Vertex::Index n_a = counter++; in TEST()
55 const Vertex::Index n_b = counter++; in TEST()
56 const Vertex::Index n_c = counter++; in TEST()
57 const Vertex::Index n_d = counter++; in TEST()
58 const Vertex::Index n_e = counter++; in TEST()
59 const Vertex::Index n_f = counter++; in TEST()
60 const Vertex::Index n_g = counter++; in TEST()
61 const Vertex::Index n_h = counter++; in TEST()
62 const Vertex::Index n_i = counter++; in TEST()
[all …]
Dcycle_breaker.cc167 static int counter = 0; in Circuit() local
168 counter++; in Circuit()
169 if (counter == 10000) { in Circuit()
170 counter = 0; in Circuit()
/system/security/keystore/
Dconfirmationui_rate_limiting.h38 Slot() : previous_start{}, prompt_start{}, counter(0) {} in Slot()
41 uint32_t counter; member
48 static std::chrono::seconds getBackoff(uint32_t counter) { in getBackoff() argument
50 switch (counter) { in getBackoff()
60 return 60s * (1ULL << (counter - 6)); in getBackoff()
89 if (!slot.counter || slot.prompt_start <= now - getBackoff(slot.counter)) { in tryPrompt()
91 slot.counter += 1; in tryPrompt()
113 if (slot.counter <= 1) { in processResult()
117 slot.counter -= 1; in processResult()
/system/iorap/src/common/
Ddebug.h48 return counter;
52 counter = value;
55 size_t counter{1}; // Don't start with 0.
87 friend std::ostream& operator<<(std::ostream& os, DebugCounter counter);
90 inline std::ostream& operator<<(std::ostream& os, DebugCounter counter) {
91 os << counter.value();
/system/core/base/
Dquick_exit_test.cpp48 static int counter = 4; in TEST() local
50 ASSERT_EQ(0, android::base::at_quick_exit([]() { _exit(counter); })); in TEST()
51 ASSERT_EQ(0, android::base::at_quick_exit([]() { counter += 2; })); in TEST()
52 ASSERT_EQ(0, android::base::at_quick_exit([]() { counter *= 10; })); in TEST()
/system/extras/simpleperf/
Devent_fd.cpp109 PerfCounter counter; in Id() local
110 if (InnerReadCounter(&counter)) { in Id()
111 id_ = counter.id; in Id()
126 bool EventFd::InnerReadCounter(PerfCounter* counter) const { in InnerReadCounter()
127 CHECK(counter != nullptr); in InnerReadCounter()
128 if (!android::base::ReadFully(perf_event_fd_, counter, sizeof(*counter))) { in InnerReadCounter()
135 bool EventFd::ReadCounter(PerfCounter* counter) { in ReadCounter() argument
136 if (!InnerReadCounter(counter)) { in ReadCounter()
143 cpu_).c_str(), counter->value - last_counter_value_); in ReadCounter()
147 cpu_).c_str(), counter->value - last_counter_value_); in ReadCounter()
[all …]
Drecord_lib_test.cpp39 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
95 TEST(counter, start_stop_multiple_times) { in TEST() argument
124 TEST(counter, no_change_after_stop) { in TEST() argument
Drecord_lib_interface.cpp161 Counter counter; in InitAccumulatedCounters() local
162 counter.event = name; in InitAccumulatedCounters()
163 counter.value = 0; in InitAccumulatedCounters()
164 counter.time_enabled_in_ns = 0; in InitAccumulatedCounters()
165 counter.time_running_in_ns = 0; in InitAccumulatedCounters()
166 accumulated_counters_.push_back(counter); in InitAccumulatedCounters()
189 sum.value += c.counter.value; in ReadRawCounters()
190 sum.time_enabled_in_ns += c.counter.time_enabled; in ReadRawCounters()
191 sum.time_running_in_ns += c.counter.time_running; in ReadRawCounters()
Dcmd_list.cpp64 PerfCounter counter; in IsEventTypeSupported() local
65 if (!event_fd->ReadCounter(&counter)) { in IsEventTypeSupported()
68 return (counter.value != 0u); in IsEventTypeSupported()
Dcmd_stat.cpp687 counter_info.cpu, counter_info.counter.value, in ShowCounters()
688 counter_info.counter.time_enabled, in ShowCounters()
689 counter_info.counter.time_running, counter_info.counter.id); in ShowCounters()
695 counter_info.cpu, counter_info.counter.value, in ShowCounters()
696 counter_info.counter.time_enabled, in ShowCounters()
697 counter_info.counter.time_running, counter_info.counter.id); in ShowCounters()
708 sum.value += counter_info.counter.value; in ShowCounters()
709 sum.time_enabled += counter_info.counter.time_enabled; in ShowCounters()
710 sum.time_running += counter_info.counter.time_running; in ShowCounters()
Devent_selection_set.cpp581 static bool ReadCounter(EventFd* event_fd, CounterInfo* counter) { in ReadCounter() argument
582 if (!event_fd->ReadCounter(&counter->counter)) { in ReadCounter()
585 counter->tid = event_fd->ThreadId(); in ReadCounter()
586 counter->cpu = event_fd->Cpu(); in ReadCounter()
600 CounterInfo counter; in ReadCounters() local
601 if (!ReadCounter(event_fd.get(), &counter)) { in ReadCounters()
604 counters_info.counters.push_back(counter); in ReadCounters()
780 CounterInfo counter; in HandleCpuOfflineEvent() local
781 if (!ReadCounter(it->get(), &counter)) { in HandleCpuOfflineEvent()
784 selection.hotplugged_counters.push_back(counter); in HandleCpuOfflineEvent()
Devent_fd.h63 bool ReadCounter(PerfCounter* counter);
110 bool InnerReadCounter(PerfCounter* counter) const;
/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/SimpleperfExamplePureJava/app/src/main/java/com/example/simpleperf/simpleperfexamplepurejava/
DSleepActivity.java17 volatile int counter = 0; in createRunSleepThread()
24 counter = callFunction(counter); in createRunSleepThread()
/system/extras/simpleperf/demo/SimpleperfExampleOfKotlin/app/src/main/java/com/example/simpleperf/simpleperfexampleofkotlin/
DSleepActivity.kt16 var counter = 0 in createRunSleepThread() variable
24 counter = callFunction(counter) in createRunSleepThread()
/system/bt/gd/os/linux_generic/
Drepeating_alarm_unittest.cc45 int counter = 0; in VerifyMultipleDelayedTasks() local
47 … [&counter, &promise, start_time, scheduled_tasks, task_length_ms, interval_between_tasks_ms]() { in VerifyMultipleDelayedTasks()
48 counter++; in VerifyMultipleDelayedTasks()
51 if (counter == scheduled_tasks) { in VerifyMultipleDelayedTasks()
54 …ASSERT_NEAR(time_delta.count(), interval_between_tasks_ms * 1000000 * counter, error_ms * 1000000); in VerifyMultipleDelayedTasks()
/system/core/storaged/
Dstoraged_diskstats.cpp83 stats->counter = 1; in init_disk_stats_other()
195 inc->counter = 1; in get_inc_disk_stats()
210 if (dst->counter + src->counter) { in add_disk_stats()
212 ((dst->io_avg * dst->counter) + (src->io_avg * src->counter)) / in add_disk_stats()
213 (dst->counter + src->counter); in add_disk_stats()
215 dst->counter += src->counter; in add_disk_stats()
/system/bt/osi/test/
Dsemaphore_test.cc18 int counter; member
28 ++helper->counter; in sleep_then_increment_counter()
85 EXPECT_EQ(sequence_helper.counter, 1) in TEST_F()
/system/bt/stack/a2dp/
Da2dp_aac_encoder.cc58 uint32_t counter; member
479 a2dp_aac_encoder_cb.aac_feeding_state.counter = 0; in a2dp_aac_feeding_flush()
495 for (uint8_t counter = 0; counter < nb_iterations; counter++) { in a2dp_aac_send_frames() local
525 a2dp_aac_encoder_cb.aac_feeding_state.counter += in a2dp_aac_get_num_frame_iteration()
529 result = a2dp_aac_encoder_cb.aac_feeding_state.counter / pcm_bytes_per_frame; in a2dp_aac_get_num_frame_iteration()
530 a2dp_aac_encoder_cb.aac_feeding_state.counter -= result * pcm_bytes_per_frame; in a2dp_aac_get_num_frame_iteration()
630 a2dp_aac_encoder_cb.aac_feeding_state.counter += in a2dp_aac_encode_frames()
Da2dp_sbc_encoder.cc73 uint32_t counter; member
395 a2dp_sbc_encoder_cb.feeding_state.counter = 0; in a2dp_sbc_feeding_flush()
412 for (uint8_t counter = 0; counter < nb_iterations; counter++) { in a2dp_sbc_send_frames() local
442 a2dp_sbc_encoder_cb.feeding_state.counter += in a2dp_sbc_get_num_frame_iteration()
448 a2dp_sbc_encoder_cb.feeding_state.counter / pcm_bytes_per_frame; in a2dp_sbc_get_num_frame_iteration()
487 a2dp_sbc_encoder_cb.feeding_state.counter = in a2dp_sbc_get_num_frame_iteration()
510 a2dp_sbc_encoder_cb.feeding_state.counter = in a2dp_sbc_get_num_frame_iteration()
515 a2dp_sbc_encoder_cb.feeding_state.counter -= noi * nof * pcm_bytes_per_frame; in a2dp_sbc_get_num_frame_iteration()
563 a2dp_sbc_encoder_cb.feeding_state.counter += in a2dp_sbc_encode_frames()
Da2dp_vendor_ldac_encoder.cc127 uint32_t counter; member
535 a2dp_ldac_encoder_cb.ldac_feeding_state.counter = 0; in a2dp_vendor_ldac_feeding_flush()
551 for (uint8_t counter = 0; counter < nb_iterations; counter++) { in a2dp_vendor_ldac_send_frames() local
594 a2dp_ldac_encoder_cb.ldac_feeding_state.counter += in a2dp_ldac_get_num_frame_iteration()
599 a2dp_ldac_encoder_cb.ldac_feeding_state.counter / pcm_bytes_per_frame; in a2dp_ldac_get_num_frame_iteration()
600 a2dp_ldac_encoder_cb.ldac_feeding_state.counter -= in a2dp_ldac_get_num_frame_iteration()
684 a2dp_ldac_encoder_cb.ldac_feeding_state.counter += in a2dp_ldac_encode_frames()
/system/bt/common/
Drepeating_timer_unittest.cc211 int counter = counter_; in TEST_F() local
214 ASSERT_EQ(counter, counter_); in TEST_F()
248 int counter = counter_; in TEST_F() local
251 ASSERT_EQ(counter, counter_); in TEST_F()
/system/bt/stack/gatt/
Dgatt_cl.cc162 if (!p_clcb->counter) { in gatt_act_read()
307 p_rsp_value->len != p_clcb->counter || in gatt_check_write_long_terminate()
354 p_clcb->counter = to_send; in gatt_send_prepare_write()
815 p_clcb->counter = len - 2; in gatt_process_read_by_type_rsp()
817 if (p_clcb->counter == (p_clcb->p_tcb->payload_size - 4)) { in gatt_process_read_by_type_rsp()
821 if (p_clcb->counter <= GATT_MAX_ATTR_LEN) { in gatt_process_read_by_type_rsp()
822 memcpy(p_clcb->p_attr_buf, p, p_clcb->counter); in gatt_process_read_by_type_rsp()
823 gatt_act_read(p_clcb, p_clcb->counter); in gatt_process_read_by_type_rsp()
907 uint16_t offset = p_clcb->counter; in gatt_process_read_rsp()
912 p_clcb->counter = len; in gatt_process_read_rsp()
[all …]
Dgatt_auth.cc100 uint32_t counter; in gatt_verify_signature() local
109 STREAM_TO_UINT32(counter, p); in gatt_verify_signature()
111 if (!BTM_BleVerifySignature(tcb.peer_bda, p_orig, cmd_len, counter, p)) { in gatt_verify_signature()
141 gatt_act_read(p_clcb, p_clcb->counter); in gatt_sec_check_complete()

12