Home
last modified time | relevance | path

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

123

/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()
123 if (slot.counter <= 1) { in processResult()
127 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/extras/simpleperf/
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
Devent_fd.cpp108 PerfCounter counter; in Id() local
109 if (InnerReadCounter(&counter)) { in Id()
110 id_ = counter.id; in Id()
133 bool EventFd::InnerReadCounter(PerfCounter* counter) const { in InnerReadCounter()
134 CHECK(counter != nullptr); in InnerReadCounter()
135 if (!android::base::ReadFully(perf_event_fd_, counter, sizeof(*counter))) { in InnerReadCounter()
142 bool EventFd::ReadCounter(PerfCounter* counter) { in ReadCounter() argument
143 if (!InnerReadCounter(counter)) { in ReadCounter()
150 cpu_).c_str(), counter->value - last_counter_value_); in ReadCounter()
154 cpu_).c_str(), counter->value - last_counter_value_); in ReadCounter()
[all …]
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_stat_test.cpp353 PerfCounter counter; in TEST() local
354 counter.value = 1; in TEST()
355 counter.time_enabled = 2; in TEST()
356 counter.time_running = 3; in TEST()
358 a.FromCounter(counter); in TEST()
370 b.ToCounter(counter); in TEST()
371 ASSERT_EQ(counter.value, 2); in TEST()
372 ASSERT_EQ(counter.time_enabled, 4); in TEST()
373 ASSERT_EQ(counter.time_running, 6); in TEST()
404 CounterInfo& counter = info.counters.back(); in AddCounter() local
[all …]
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()
216 for (const auto& counter : info.counters) { in AddCountersForOneEventType() local
219 key |= counter.tid; in AddCountersForOneEventType()
[all …]
Dcmd_list.cpp80 PerfCounter counter; in IsEventTypeSupported() local
81 if (!event_fd->ReadCounter(&counter)) { in IsEventTypeSupported()
85 return (counter.value != 0u) ? EventTypeStatus::SUPPORTED : EventTypeStatus::MAY_NOT_SUPPORTED; in IsEventTypeSupported()
Dcmd_stat.cpp808 PerfCounter& counter = counters_per_event[j].counter; in AdjustToIntervalOnlyValues() local
810 new_sum.FromCounter(counter); in AdjustToIntervalOnlyValues()
812 delta.ToCounter(counter); in AdjustToIntervalOnlyValues()
833 counter_info.cpu, counter_info.counter.value, in ShowCounters()
834 counter_info.counter.time_enabled, in ShowCounters()
835 counter_info.counter.time_running, counter_info.counter.id); in ShowCounters()
841 counter_info.cpu, counter_info.counter.value, in ShowCounters()
842 counter_info.counter.time_enabled, in ShowCounters()
843 counter_info.counter.time_running, counter_info.counter.id); in ShowCounters()
Devent_fd.h64 bool ReadCounter(PerfCounter* counter);
126 bool InnerReadCounter(PerfCounter* counter) const;
Devent_selection_set.cpp697 static bool ReadCounter(EventFd* event_fd, CounterInfo* counter) { in ReadCounter() argument
698 if (!event_fd->ReadCounter(&counter->counter)) { in ReadCounter()
701 counter->tid = event_fd->ThreadId(); in ReadCounter()
702 counter->cpu = event_fd->Cpu(); in ReadCounter()
716 CounterInfo counter; in ReadCounters() local
717 if (!ReadCounter(event_fd.get(), &counter)) { in ReadCounters()
720 counters_info.counters.push_back(counter); in ReadCounters()
/system/bt/gd/os/linux_generic/
Drepeating_alarm_unittest.cc49 int counter = 0; in VerifyMultipleDelayedTasks() local
54 common::Unretained(&counter), in VerifyMultipleDelayedTasks()
66 int* counter, in verify_delayed_tasks() argument
72 *counter = *counter + 1; in verify_delayed_tasks()
75 if (*counter == scheduled_tasks) { in verify_delayed_tasks()
78 …ASSERT_NEAR(time_delta.count(), interval_between_tasks_ms * 1000000 * *counter, error_ms * 1000000… in verify_delayed_tasks()
/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/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_sbc_encoder.cc74 uint32_t counter; member
393 a2dp_sbc_encoder_cb.feeding_state.counter = 0; in a2dp_sbc_feeding_flush()
410 for (uint8_t counter = 0; counter < nb_iterations; counter++) { in a2dp_sbc_send_frames() local
445 a2dp_sbc_encoder_cb.feeding_state.counter += bytes_this_tick; in a2dp_sbc_get_num_frame_iteration()
459 a2dp_sbc_encoder_cb.feeding_state.counter / pcm_bytes_per_frame; in a2dp_sbc_get_num_frame_iteration()
495 a2dp_sbc_encoder_cb.feeding_state.counter = in a2dp_sbc_get_num_frame_iteration()
517 a2dp_sbc_encoder_cb.feeding_state.counter = in a2dp_sbc_get_num_frame_iteration()
522 a2dp_sbc_encoder_cb.feeding_state.counter -= noi * nof * pcm_bytes_per_frame; in a2dp_sbc_get_num_frame_iteration()
570 a2dp_sbc_encoder_cb.feeding_state.counter += in a2dp_sbc_encode_frames()
Da2dp_aac_encoder.cc59 uint32_t counter; member
521 a2dp_aac_encoder_cb.aac_feeding_state.counter = 0; in a2dp_aac_feeding_flush()
537 for (uint8_t counter = 0; counter < nb_iterations; counter++) { in a2dp_aac_send_frames() local
571 a2dp_aac_encoder_cb.aac_feeding_state.counter += bytes_this_tick; in a2dp_aac_get_num_frame_iteration()
583 result = a2dp_aac_encoder_cb.aac_feeding_state.counter / pcm_bytes_per_frame; in a2dp_aac_get_num_frame_iteration()
584 a2dp_aac_encoder_cb.aac_feeding_state.counter -= result * pcm_bytes_per_frame; in a2dp_aac_get_num_frame_iteration()
683 a2dp_aac_encoder_cb.aac_feeding_state.counter += in a2dp_aac_encode_frames()
Da2dp_vendor_ldac_encoder.cc127 uint32_t counter; member
531 a2dp_ldac_encoder_cb.ldac_feeding_state.counter = 0; in a2dp_vendor_ldac_feeding_flush()
547 for (uint8_t counter = 0; counter < nb_iterations; counter++) { in a2dp_vendor_ldac_send_frames() local
589 a2dp_ldac_encoder_cb.ldac_feeding_state.counter += in a2dp_ldac_get_num_frame_iteration()
594 a2dp_ldac_encoder_cb.ldac_feeding_state.counter / pcm_bytes_per_frame; in a2dp_ldac_get_num_frame_iteration()
595 a2dp_ldac_encoder_cb.ldac_feeding_state.counter -= in a2dp_ldac_get_num_frame_iteration()
679 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()
809 p_clcb->counter = len - 2; in gatt_process_read_by_type_rsp()
811 if (p_clcb->counter == (p_clcb->p_tcb->payload_size - 4)) { in gatt_process_read_by_type_rsp()
815 if (p_clcb->counter <= GATT_MAX_ATTR_LEN) { in gatt_process_read_by_type_rsp()
816 memcpy(p_clcb->p_attr_buf, p, p_clcb->counter); in gatt_process_read_by_type_rsp()
817 gatt_act_read(p_clcb, p_clcb->counter); in gatt_process_read_by_type_rsp()
895 uint16_t offset = p_clcb->counter; in gatt_process_read_rsp()
900 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()
/system/libziparchive/
Dzip_archive_benchmark.cpp97 int counter = 0; in StartAlignedEntry() local
99 writer.StartAlignedEntry(name + std::to_string(counter++), 0, alignment); in StartAlignedEntry()
/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()

123