Home
last modified time | relevance | path

Searched refs:queue (Results 1 - 25 of 106) sorted by relevance

12345

/arkcompiler/runtime_core/static_core/libpandabase/tests/taskmanager/
H A Dtask_test.cpp70 SchedulableTaskQueueInterface *queue = TaskQueue<>::Create(TaskType::GC, VMType::DYNAMIC_VM, QUEUE_PRIORITY); in TEST_F() local
71 EXPECT_EQ(queue->GetTaskType(), TaskType::GC); in TEST_F()
72 EXPECT_TRUE(queue->IsEmpty()); in TEST_F()
73 EXPECT_EQ(queue->Size(), 0); in TEST_F()
74 EXPECT_EQ(queue->GetPriority(), QUEUE_PRIORITY); in TEST_F()
75 // Add COUNT_OF_TASKS tasks in queue-> Each task increment counter. in TEST_F()
78 queue->AddTask(Task::Create({TaskType::GC, VMType::DYNAMIC_VM, TaskExecutionMode::BACKGROUND}, in TEST_F()
81 EXPECT_EQ(queue->GetTaskType(), TaskType::GC); in TEST_F()
82 EXPECT_FALSE(queue->IsEmpty()); in TEST_F()
83 EXPECT_EQ(queue in TEST_F()
128 SchedulableTaskQueueInterface *queue = TaskQueue<>::Create(TaskType::GC, VMType::STATIC_VM, QUEUE_PRIORITY); TEST_F() local
159 SchedulableTaskQueueInterface *queue = TaskQueue<>::Create(TaskType::GC, VMType::STATIC_VM, QUEUE_PRIORITY); TEST_F() local
202 SchedulableTaskQueueInterface *queue = TaskQueue<>::Create(TaskType::GC, VMType::STATIC_VM, QUEUE_PRIORITY); global() local
235 SchedulableTaskQueueInterface *queue = TaskQueue<>::Create(TaskType::GC, VMType::STATIC_VM, QUEUE_PRIORITY); global() local
273 SchedulableTaskQueueInterface *queue = TaskQueue<>::Create(TaskType::GC, VMType::STATIC_VM, QUEUE_PRIORITY); global() local
[all...]
H A Dtask_manager_gc_corner_case_test.cpp50 void SetQueue(TaskQueueInterface *queue) in SetQueue() argument
52 queue_ = queue; in SetQueue()
126 auto *queue = tm->CreateAndRegisterTaskQueue(TaskType::GC, VMType::STATIC_VM, TaskQueueInterface::DEFAULT_PRIORITY); in TEST_F() local
127 SetQueue(queue); in TEST_F()
133 tm->UnregisterAndDestroyTaskQueue(queue); in TEST_F()
139 auto *queue = tm->CreateAndRegisterTaskQueue(TaskType::GC, VMType::STATIC_VM, TaskQueueInterface::DEFAULT_PRIORITY); in TEST_F() local
140 SetQueue(queue); in TEST_F()
143 queue->AddTask(Task::Create(BACKGROUND_TASK, [this]() { BigGcTask(true); })); in TEST_F()
147 tm->UnregisterAndDestroyTaskQueue(queue); in TEST_F()
H A Dtask_sheduler_logging_test.cpp37 auto *queue = tm->CreateAndRegisterTaskQueue(TaskType::GC, VMType::STATIC_VM); in TEST() local
47 queue->AddTask(Task::Create(prop, []() {})); in TEST()
48 queue->AddTask(Task::Create(prop, []() {})); in TEST()
61 tm->UnregisterAndDestroyTaskQueue(queue); in TEST()
70 auto *queue = tm->CreateAndRegisterTaskQueue(TaskType::GC, VMType::STATIC_VM); in TEST() local
80 queue->AddTask(Task::Create(prop, []() {})); in TEST()
87 tm->UnregisterAndDestroyTaskQueue(queue); in TEST()
/arkcompiler/runtime_core/static_core/runtime/tests/
H A Dcompiler_queue_test.cpp89 // The methods may be added to the queue not simultaneously
92 static void GetAndCheckMethodsIfExists(CompilerQueueInterface *queue, Method *target1, Method *target2, Method *target3) in GetAndCheckMethodsIfExists() argument
94 auto method1 = queue->GetTask().GetMethod(); in GetAndCheckMethodsIfExists()
98 auto method2 = queue->GetTask().GetMethod(); in GetAndCheckMethodsIfExists()
103 auto method3 = queue->GetTask().GetMethod(); in GetAndCheckMethodsIfExists()
121 // Note, the queue implementation uses GetCurrentTimeInMillis in WaitForExpire()
149 CompilerPriorityCounterQueue queue(thread_->GetVM()->GetHeapManager()->GetInternalAllocator(), in TEST_F()
151 queue.AddTask(CompilerTask {mainMethod, false}); in TEST_F()
152 queue.AddTask(CompilerTask {fMethod, false}); in TEST_F()
153 queue in TEST_F()
[all...]
/arkcompiler/ets_runtime/ecmascript/
H A Dtagged_queue.h48 static TaggedQueue *Push(const JSThread *thread, const JSHandle<TaggedQueue> &queue, in Push() argument
51 uint32_t capacity = queue->GetCapacity().GetArrayLength(); in Push()
53 // If there is no capacity, directly create a queue whose capacity is MIN_CAPACITY. Add elements. in Push()
63 uint32_t start = queue->GetStart().GetArrayLength(); in Push()
64 uint32_t end = queue->GetEnd().GetArrayLength(); in Push()
65 uint32_t size = queue->Size(); in Push()
67 // The original queue is full and needs to be expanded. in Push()
70 return *queue; in Push()
79 newQueue->Set(thread, newEnd, queue->Get(i)); in Push()
89 queue in Push()
95 PushFixedQueue(const JSThread *thread, const JSHandle<TaggedQueue> &queue, const JSHandle<JSTaggedValue> &value) PushFixedQueue() argument
198 auto queue = TaggedQueue::Cast(*thread->GetEcmaVM()->GetFactory()->NewTaggedArray(length, initVal)); Create() local
[all...]
H A Djs_async_generator_object.cpp52 // 2. Let queue be generator.[[AsyncGeneratorQueue]]. in AsyncGeneratorResolve()
53 JSHandle<TaggedQueue> queue(thread, generator->GetAsyncGeneratorQueue()); in AsyncGeneratorResolve()
54 // 3. Assert: queue is not an empty List. in AsyncGeneratorResolve()
55 ASSERT(!(queue->Empty())); in AsyncGeneratorResolve()
56 // 4. Let next be the first element of queue. in AsyncGeneratorResolve()
57 JSHandle<AsyncGeneratorRequest> next(thread, queue->Front()); in AsyncGeneratorResolve()
58 // 5. Remove the first element from queue. in AsyncGeneratorResolve()
59 queue->Pop(thread); in AsyncGeneratorResolve()
90 // 2. Let queue be generator.[[AsyncGeneratorQueue]]. in AsyncGeneratorReject()
91 JSHandle<TaggedQueue> queue(threa in AsyncGeneratorReject()
[all...]
/arkcompiler/runtime_core/static_core/libpandabase/taskmanager/
H A Dtask_scheduler.cpp60 TaskQueueId TaskScheduler::RegisterQueue(internal::SchedulableTaskQueueInterface *queue) in RegisterQueue() argument
64 LOG(DEBUG, TASK_MANAGER) << "TaskScheduler: Register task queue with {" << queue->GetTaskType() << ", " in RegisterQueue()
65 << queue->GetVMType() << "}"; in RegisterQueue()
66 TaskQueueId id(queue->GetTaskType(), queue->GetVMType()); in RegisterQueue()
70 taskQueues_[id] = queue; in RegisterQueue()
71 queue->SetCallbacks( in RegisterQueue()
75 // init countOfTasksIsSystem_ for possible task from registered queue in RegisterQueue()
76 countOfTasksInSystem_[{queue in RegisterQueue()
164 auto queue = taskQueues_[selectedQueue]; PutTasksInWorker() local
214 auto *queue = GetQueue({properties.GetTaskType(), properties.GetVMType()}); HelpWorkersWithTasks() local
238 auto *queue = GetQueue({properties.GetTaskType(), properties.GetVMType()}); GetAndExecuteSetOfTasksFromQueue() local
369 internal::SchedulableTaskQueueInterface *queue = nullptr; GetQueue() local
391 PutWaitTaskInLocalQueue(LocalTaskQueue &queue) PutWaitTaskInLocalQueue() argument
398 PutTaskInTaskQueues(LocalTaskQueue &queue) PutTaskInTaskQueues() argument
420 auto *queue = GetQueue({prop.GetTaskType(), prop.GetVMType()}); SignalWaitList() local
[all...]
H A Dtask_scheduler.h25 #include <queue>
30 * - GC queue(ECMA)
31 * - GC queue(ArkTS)
32 * - JIT queue
43 using LocalTaskQueue = std::queue<Task>;
87 auto *queue = internal::TaskQueue<Allocator>::Create(taskType, vmType, priority); in CreateAndRegisterTaskQueue() local
88 if (UNLIKELY(queue == nullptr)) { in CreateAndRegisterTaskQueue()
91 auto id = RegisterQueue(queue); in CreateAndRegisterTaskQueue()
93 internal::TaskQueue<Allocator>::Destroy(queue); in CreateAndRegisterTaskQueue()
96 return queue; in CreateAndRegisterTaskQueue()
105 UnregisterAndDestroyTaskQueue(TaskQueueInterface *queue) UnregisterAndDestroyTaskQueue() argument
[all...]
H A Dtask_queue.h26 * @brief TaskQueue is a thread-safe queue for tasks. Queues can be registered in TaskScheduler and used to execute
44 * @param task_type: TaskType of queue.
45 * @param vm_type: VMType of queue.
46 * @param priority: A number from 1 to 10 that determines the weight of the queue during the task selection process
47 * @return a pointer to the created queue.
56 static PANDA_PUBLIC_API void Destroy(SchedulableTaskQueueInterface *queue) in Destroy() argument
59 std::allocator_traits<TaskQueueAllocatorType>::destroy(allocator, queue); in Destroy()
60 allocator.deallocate(static_cast<TaskQueue<TaskAllocatorType> *>(queue), 1U); in Destroy()
69 * @brief Adds task in task queue. Operation is thread-safe.
71 * @return the size of queue afte
124 auto *queue = &foregroundTaskQueue_; global() variable
165 auto *queue = &foregroundTaskQueue_; global() variable
[all...]
/arkcompiler/ets_frontend/es2panda/util/
H A DworkerQueue.cpp59 void WorkerQueue::Worker(WorkerQueue *queue) in Worker() argument
62 std::unique_lock<std::mutex> lock(queue->m_); in Worker()
63 queue->jobsAvailable_.wait(lock, [queue]() { return queue->terminate_ || queue->jobsCount_ != 0; }); in Worker()
65 if (queue->terminate_) { in Worker()
71 queue->Consume(); in Worker()
72 queue->jobsFinished_.notify_one(); in Worker()
/arkcompiler/runtime_core/static_core/verification/jobs/
H A Dservice.cpp35 while (langData->totalProcessors < langData->queue.size()) { in Destroy()
38 for (auto *processor : langData->queue) { in Destroy()
54 if (langData->queue.empty()) { in GetProcessor()
55 langData->queue.push_back(allocator_->New<TaskProcessor>(this, lang)); in GetProcessor()
58 // NOTE(gogabr): should we use a queue or stack discipline? in GetProcessor()
59 auto res = langData->queue.front(); in GetProcessor()
60 langData->queue.pop_front(); in GetProcessor()
69 processors_.at(lang).queue.push_back(processor); in ReleaseProcessor()
/arkcompiler/runtime_core/libpandabase/tests/ringbuf/
H A Dlock_free_ring_buffer_test.cpp18 #include <queue>
58 std::queue<size_t> queue; in TEST() local
61 queue.push(i); in TEST()
62 if (i % ((rand() % 100) + 1) == 0 && !queue.empty()) { in TEST()
64 size_t queue_pop = queue.front(); in TEST()
65 queue.pop(); in TEST()
69 while (!queue.empty()) { in TEST()
71 size_t queue_pop = queue.front(); in TEST()
72 queue in TEST()
[all...]
/arkcompiler/runtime_core/static_core/libpandabase/tests/ringbuf/
H A Dlock_free_ring_buffer_test.cpp18 #include <queue>
60 std::queue<size_t> queue; in TEST() local
63 queue.push(i); in TEST()
65 if (i % ((rand() % 100) + 1) == 0 && !queue.empty()) { in TEST()
67 size_t queuePop = queue.front(); in TEST()
68 queue.pop(); in TEST()
72 while (!queue.empty()) { in TEST()
74 size_t queuePop = queue.front(); in TEST()
75 queue in TEST()
[all...]
/arkcompiler/ets_runtime/ecmascript/tests/
H A Djs_tagged_queue_test.cpp34 JSHandle<TaggedQueue> queue = thread->GetEcmaVM()->GetFactory()->NewTaggedQueue(0); in HWTEST_F_L0() local
35 EXPECT_TRUE(*queue != nullptr); in HWTEST_F_L0()
36 EXPECT_TRUE(queue->Empty()); in HWTEST_F_L0()
37 EXPECT_EQ(queue->Size(), 0U); in HWTEST_F_L0()
38 EXPECT_EQ(queue->Front(), JSTaggedValue::Hole()); in HWTEST_F_L0()
39 EXPECT_EQ(queue->Back(), JSTaggedValue::Hole()); in HWTEST_F_L0()
44 JSHandle<TaggedQueue> queue = thread->GetEcmaVM()->GetFactory()->NewTaggedQueue(0); in HWTEST_F_L0() local
45 EXPECT_TRUE(queue->Empty()); in HWTEST_F_L0()
48 TaggedQueue::Push(thread, queue, JSHandle<JSTaggedValue>(thread, JSTaggedValue(0)))); in HWTEST_F_L0()
/arkcompiler/ets_frontend/ets2panda/compiler/core/
H A DcompileQueue.cpp66 void CompileQueue::Worker(CompileQueue *queue) in Worker() argument
69 std::unique_lock<std::mutex> lock(queue->m_); in Worker()
70 queue->jobsAvailable_.wait(lock, [queue]() { return queue->terminate_ || queue->jobsCount_ != 0; }); in Worker()
72 if (queue->terminate_) { in Worker()
78 queue->Consume(); in Worker()
79 queue->jobsFinished_.notify_one(); in Worker()
/arkcompiler/ets_runtime/ecmascript/js_api/
H A Djs_api_hashset_iterator.cpp48 JSMutableHandle<TaggedQueue> queue(thread, iter->GetTaggedQueue()); in Next()
53 currentNode.Update(FastGetCurrentNode(thread, iter, queue, tableArr)); in Next()
79 JSMutableHandle<TaggedQueue> &queue, in FastGetCurrentNode()
86 return GetCurrentNode(thread, iter, queue, tableArr); in FastGetCurrentNode()
105 JSMutableHandle<TaggedQueue> &queue, in GetCurrentNode()
110 if (queue->Empty()) { in GetCurrentNode()
117 rootValue = JSHandle<JSTaggedValue>(thread, queue->Pop(thread)); in GetCurrentNode()
123 queue.Update(JSTaggedValue(TaggedQueue::Push(thread, queue, left))); in GetCurrentNode()
127 queue in GetCurrentNode()
77 FastGetCurrentNode(JSThread *thread, JSHandle<JSAPIHashSetIterator> &iter, JSMutableHandle<TaggedQueue> &queue, JSHandle<TaggedHashArray> &tableArr) FastGetCurrentNode() argument
104 GetCurrentNode(JSThread *thread, JSHandle<JSAPIHashSetIterator> &iter, JSMutableHandle<TaggedQueue> &queue, JSHandle<TaggedHashArray> &tableArr) GetCurrentNode() argument
[all...]
H A Djs_api_hashmap_iterator.cpp47 JSMutableHandle<TaggedQueue> queue(thread, iter->GetTaggedQueue()); in Next()
54 currentNode.Update(JSAPIHashMapIterator::FastGetCurrentNode(thread, iter, queue, tableArr)); in Next()
84 JSMutableHandle<TaggedQueue> &queue, in FastGetCurrentNode()
91 return GetCurrentNode(thread, iter, queue, tableArr); in FastGetCurrentNode()
111 JSMutableHandle<TaggedQueue> &queue, in GetCurrentNode()
116 if (queue->Empty()) { in GetCurrentNode()
123 rootValue = JSHandle<JSTaggedValue>(thread, queue->Pop(thread)); in GetCurrentNode()
129 queue.Update(JSTaggedValue(TaggedQueue::Push(thread, queue, left))); in GetCurrentNode()
133 queue in GetCurrentNode()
82 FastGetCurrentNode(JSThread *thread, JSHandle<JSAPIHashMapIterator> &iter, JSMutableHandle<TaggedQueue> &queue, JSHandle<TaggedHashArray> &tableArr) FastGetCurrentNode() argument
109 GetCurrentNode(JSThread *thread, JSHandle<JSAPIHashMapIterator> &iter, JSMutableHandle<TaggedQueue> &queue, JSHandle<TaggedHashArray> &tableArr) GetCurrentNode() argument
[all...]
H A Djs_api_queue.cpp22 void JSAPIQueue::Add(JSThread *thread, const JSHandle<JSAPIQueue> &queue, const JSHandle<JSTaggedValue> &value) in Add() argument
24 uint32_t length = queue->GetLength().GetArrayLength(); in Add()
25 JSHandle<TaggedArray> elements = GrowCapacity(thread, queue, length + 1); in Add()
28 uint32_t tail = queue->GetTail(); in Add()
31 queue->SetLength(thread, JSTaggedValue(++length)); in Add()
35 queue->SetTail((tail + 1) % elementsSize); in Add()
66 JSTaggedValue JSAPIQueue::GetFirst(JSThread *thread, const JSHandle<JSAPIQueue> &queue) in GetFirst() argument
68 if (queue->GetLength().GetArrayLength() < 1) { in GetFirst()
72 uint32_t index = queue->GetFront(); in GetFirst()
74 JSHandle<TaggedArray> elements(thread, queue in GetFirst()
79 Pop(JSThread *thread, const JSHandle<JSAPIQueue> &queue) Pop() argument
273 GetArrayLength(JSThread *thread, const JSHandle<JSAPIQueue> &queue) GetArrayLength() argument
[all...]
H A Djs_api_queue_iterator.cpp39 JSHandle<JSTaggedValue> queue(thread, iter->GetIteratedQueue()); in Next()
41 if (queue->IsUndefined()) { in Next()
46 uint32_t length = JSAPIQueue::GetArrayLength(thread, JSHandle<JSAPIQueue>(queue)); in Next()
54 JSHandle<JSTaggedValue> value(thread, JSHandle<JSAPIQueue>::Cast(queue)->Get(thread, index)); in Next()
H A Djs_api_queue.h32 static void Add(JSThread *thread, const JSHandle<JSAPIQueue> &queue, const JSHandle<JSTaggedValue> &value);
33 static JSTaggedValue GetFirst(JSThread *thread, const JSHandle<JSAPIQueue> &queue);
34 static JSTaggedValue Pop(JSThread *thread, const JSHandle<JSAPIQueue> &queue);
35 static void ForEach(JSThread *thread, const JSHandle<JSAPIQueue> &queue, const JSHandle<JSTaggedValue> &value);
74 static uint32_t GetArrayLength(JSThread *thread, const JSHandle<JSAPIQueue> &queue);
/arkcompiler/runtime_core/static_core/verification/verifier/
H A Dverifier.cpp40 void Worker(PandaDeque<Method *> *queue, os::memory::Mutex *lock, size_t threadNum, std::atomic<bool> *result) in Worker() argument
61 if (queue->empty()) { in Worker()
64 method = queue->front(); in Worker()
65 queue->pop_front(); in Worker()
86 static void EnqueueMethod(Method *method, PandaDeque<Method *> &queue, PandaUnorderedSet<Method *> &methodsSet) in EnqueueMethod() argument
89 queue.push_back(method); in EnqueueMethod()
94 static void EnqueueClass(const Class &klass, bool verifyLibraries, PandaDeque<Method *> &queue, in EnqueueClass() argument
103 EnqueueMethod(&method, queue, methodsSet); in EnqueueClass()
108 PandaDeque<Method *> &queue, PandaUnorderedSet<Method *> &methodsSet) in GetFileHandler()
110 auto handleClass = [&result, &classLinker, verifyLibraries, &queue, in GetFileHandler()
107 GetFileHandler(std::atomic<bool> &result, ClassLinker &classLinker, bool verifyLibraries, PandaDeque<Method *> &queue, PandaUnorderedSet<Method *> &methodsSet) GetFileHandler() argument
149 VerifyAllNames(std::atomic<bool> &result, bool verifyLibraries, Runtime &runtime, PandaDeque<Method *> &queue, PandaUnorderedSet<Method *> &methodsSet) VerifyAllNames() argument
208 VeifyMethod(Class *klass, const std::string &fqMethodName, const std::string_view &unqualifiedMethodName, PandaDeque<Method *> &queue, PandaUnorderedSet<Method *> &methodsSet) VeifyMethod() argument
223 RunVerifierImpl(std::atomic<bool> &result, Runtime &runtime, const std::vector<std::string> &classNames, const std::vector<std::string> &methodNames, PandaDeque<Method *> &queue) RunVerifierImpl() argument
281 PandaDeque<Method *> queue; RunVerifier() local
[all...]
/arkcompiler/toolchain/tooling/test/testcases/js/
H A Dcontainer.js234 let queue = new Queue();
235 queue.add(5);
236 queue.add(188);
237 queue.add(3);
238 queue.add(2888);
239 queue.add(1);
240 queue.add('555');
241 queue.add(857);
242 queue.add('eleven');
243 queue
[all...]
/arkcompiler/ets_runtime/ecmascript/snapshot/mem/
H A Dsnapshot_processor.h63 void ProcessObjectQueue(CQueue<TaggedObject *> *queue, std::unordered_map<uint64_t, ObjectEncode> *data);
64 void SerializeObject(TaggedObject *objectHeader, CQueue<TaggedObject *> *queue,
72 EncodeBit EncodeTaggedObject(TaggedObject *objectHeader, CQueue<TaggedObject *> *queue,
74 EncodeBit GetObjectEncode(JSTaggedValue object, CQueue<TaggedObject *> *queue,
76 void EncodeTaggedObjectRange(ObjectSlot start, ObjectSlot end, CQueue<TaggedObject *> *queue,
121 EncodeBit SerializeObjectHeader(TaggedObject *objectHeader, size_t objectType, CQueue<TaggedObject *> *queue,
123 uint64_t SerializeTaggedField(JSTaggedType *tagged, CQueue<TaggedObject *> *queue,
/arkcompiler/runtime_core/static_core/compiler/optimizer/analysis/
H A Dlive_registers.cpp99 ArenaQueue<const Split *> queue(lalloc->Adapter()); in BuildIntervalsTree()
105 queue.push(lalloc->New<Split>(intervals->begin(), intervals->end(), lnRange.first, lnRange.second, nullptr)); in BuildIntervalsTree()
114 while (!queue.empty()) { in BuildIntervalsTree()
115 auto split = queue.front(); in BuildIntervalsTree()
116 queue.pop(); in BuildIntervalsTree()
143 queue.push(lalloc->New<Split>(split->begin, leftMidpoint, leftMinLn, leftMaxLn, node)); in BuildIntervalsTree()
146 queue.push(lalloc->New<Split>(rightMidpoint, split->end, rightMinLn, rightMaxLn, node)); in BuildIntervalsTree()
/arkcompiler/ets_runtime/test/fuzztest/containersqueuepop_fuzzer/
H A Dcontainersqueuepop_fuzzer.cpp77 JSHandle<JSAPIQueue> queue(thread, result); in CreateJSAPIQueue()
78 return queue; in CreateJSAPIQueue()
102 JSHandle<JSAPIQueue> queue = CreateJSAPIQueue(thread); in ContainersQueuePopFuzzTest() local
106 callInfo->SetThis(queue.GetTaggedValue()); in ContainersQueuePopFuzzTest()
114 callInfo->SetThis(queue.GetTaggedValue()); in ContainersQueuePopFuzzTest()

Completed in 10 milliseconds

12345