| /arkcompiler/runtime_core/static_core/docs/diagrams/ |
| D | task_manager-components.plantuml | 5 [GC queue(ECMA)] 6 [GC queue(ArkTS)] 7 [JIT queue] 10 [GC queue(ECMA)] -> TaskManager 11 [GC queue(ArkTS)] -> TaskManager 12 [JIT queue] -> TaskManager 17 [TaskManager] --> [local queue 1] 18 ' [GC queue(ArkTS)] --> [local queue 1] 19 ' [JIT queue] --> [local queue 1] 22 [TaskManager] --> [local queue 2] [all …]
|
| /arkcompiler/runtime_core/static_core/libpandabase/tests/taskmanager/ |
| D | task_test.cpp | 56 …SchedulableTaskQueueInterface *queue = TaskQueue<>::Create(TaskType::GC, VMType::DYNAMIC_VM, QUEUE… in TEST_F() local 57 EXPECT_EQ(queue->GetTaskType(), TaskType::GC); in TEST_F() 58 EXPECT_TRUE(queue->IsEmpty()); in TEST_F() 59 EXPECT_EQ(queue->Size(), 0); in TEST_F() 60 EXPECT_EQ(queue->GetPriority(), QUEUE_PRIORITY); in TEST_F() 64 … queue->AddTask(Task::Create({TaskType::GC, VMType::DYNAMIC_VM, TaskExecutionMode::BACKGROUND}, in TEST_F() 67 EXPECT_EQ(queue->GetTaskType(), TaskType::GC); in TEST_F() 68 EXPECT_FALSE(queue->IsEmpty()); in TEST_F() 69 EXPECT_EQ(queue->Size(), COUNT_OF_TASKS); in TEST_F() 74 auto popTask = static_cast<SchedulableTaskQueueInterface *>(queue)->PopTask(); in TEST_F() [all …]
|
| D | task_manager_gc_corner_case_test.cpp | 50 void SetQueue(TaskQueueInterface *queue) in SetQueue() argument 52 queue_ = queue; in SetQueue() 127 …auto *queue = tm->CreateAndRegisterTaskQueue(TaskType::GC, VMType::STATIC_VM, TaskQueueInterface::… in TEST_F() local 128 SetQueue(queue); in TEST_F() 134 tm->UnregisterAndDestroyTaskQueue(queue); in TEST_F() 140 …auto *queue = tm->CreateAndRegisterTaskQueue(TaskType::GC, VMType::STATIC_VM, TaskQueueInterface::… in TEST_F() local 141 SetQueue(queue); in TEST_F() 144 queue->AddTask(Task::Create(BACKGROUND_TASK, [this]() { BigGcTask(true); })); in TEST_F() 148 tm->UnregisterAndDestroyTaskQueue(queue); in TEST_F()
|
| /arkcompiler/runtime_core/static_core/runtime/tests/ |
| D | compiler_queue_test.cpp | 92 static void GetAndCheckMethodsIfExists(CompilerQueueInterface *queue, Method *target1, Method *targ… 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() 149 CompilerPriorityCounterQueue queue(thread_->GetVM()->GetHeapManager()->GetInternalAllocator(), in TEST_F() local 151 queue.AddTask(CompilerTask {mainMethod, false}); in TEST_F() 152 queue.AddTask(CompilerTask {fMethod, false}); in TEST_F() 153 queue.AddTask(CompilerTask {gMethod, false}); in TEST_F() 155 GetAndCheckMethodsIfExists(&queue, gMethod, fMethod, mainMethod); in TEST_F() 177 CompilerPriorityCounterQueue queue(thread_->GetVM()->GetHeapManager()->GetInternalAllocator(), in TEST_F() local [all …]
|
| /arkcompiler/ets_runtime/ecmascript/ |
| D | tagged_queue.h | 48 static TaggedQueue *Push(const JSThread *thread, const JSHandle<TaggedQueue> &queue, in Push() argument 51 uint32_t capacity = queue->GetCapacity().GetArrayLength(); 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() 70 return *queue; in Push() 79 newQueue->Set(thread, newEnd, queue->Get(i)); in Push() 89 queue->Set(thread, end, value.GetTaggedValue()); in Push() 90 queue->SetEnd(thread, JSTaggedValue((end + 1) % capacity)); in Push() 91 return *queue; in Push() [all …]
|
| D | js_async_generator_object.cpp | 62 JSHandle<TaggedQueue> queue(thread, generator->GetAsyncGeneratorQueue()); in AsyncGeneratorResolve() local 64 ASSERT(!(queue->Empty())); in AsyncGeneratorResolve() 66 JSHandle<AsyncGeneratorRequest> next(thread, queue->Front()); in AsyncGeneratorResolve() 68 queue->Pop(thread); in AsyncGeneratorResolve() 97 JSHandle<TaggedQueue> queue(thread, generator->GetAsyncGeneratorQueue()); in AsyncGeneratorReject() local 99 ASSERT(!(queue->Empty())); in AsyncGeneratorReject() 101 JSHandle<JSTaggedValue> val(thread, queue->Front()); in AsyncGeneratorReject() 104 queue->Pop(thread); in AsyncGeneratorReject() 138 JSHandle<TaggedQueue> queue(thread, generator->GetAsyncGeneratorQueue()); in AsyncGeneratorResumeNext() local 140 if (queue->Empty()) { in AsyncGeneratorResumeNext() [all …]
|
| /arkcompiler/runtime_core/static_core/libpandabase/taskmanager/ |
| D | task_scheduler.cpp | 67 TaskQueueId TaskScheduler::RegisterQueue(internal::SchedulableTaskQueueInterface *queue) in RegisterQueue() argument 71 TaskQueueId id(queue->GetTaskType(), queue->GetVMType()); in RegisterQueue() 75 taskQueues_[id] = queue; in RegisterQueue() 76 queue->SetNewTasksCallback([this](TaskProperties properties, size_t count, bool wasEmpty) { in RegisterQueue() 130 internal::SchedulableTaskQueueInterface *queue = nullptr; in SelectNextTasks() local 131 …std::tie(std::ignore, queue) = *kineticPriorities_.upper_bound(choice); // Get queue of chosen el… in SelectNextTasks() 133 TaskQueueId id(queue->GetTaskType(), queue->GetVMType()); in SelectNextTasks() 142 internal::SchedulableTaskQueueInterface *queue = nullptr; in UpdateKineticPriorities() local 144 std::tie(std::ignore, queue) = idQueuePair; in UpdateKineticPriorities() 145 if (queue->IsEmpty()) { in UpdateKineticPriorities() [all …]
|
| D | worker_thread.cpp | 41 std::queue<Task> *queue = nullptr; in PopTask() local 43 queue = &foregroundQueue_; in PopTask() 45 queue = &backgroundQueue_; in PopTask() 47 auto task = std::move(queue->front()); in PopTask() 48 queue->pop(); in PopTask()
|
| D | task_scheduler.h | 74 auto *queue = internal::TaskQueue<Allocator>::Create(taskType, vmType, priority); 75 if (UNLIKELY(queue == nullptr)) { 78 auto id = RegisterQueue(queue); 80 internal::TaskQueue<Allocator>::Destroy(queue); 83 return queue; 93 PANDA_PUBLIC_API void UnregisterAndDestroyTaskQueue(TaskQueueInterface *queue) in UnregisterAndDestroyTaskQueue() argument 95 TaskQueueId id(queue->GetTaskType(), queue->GetVMType()); in UnregisterAndDestroyTaskQueue() 142 PANDA_PUBLIC_API TaskQueueId RegisterQueue(internal::SchedulableTaskQueueInterface *queue);
|
| D | task_queue.h | 55 static PANDA_PUBLIC_API void Destroy(SchedulableTaskQueueInterface *queue) in Destroy() argument 58 std::allocator_traits<TaskQueueAllocatorType>::destroy(allocator, queue); in Destroy() 59 …allocator.deallocate(static_cast<TaskQueue<TaskAllocatorType> *>(queue), sizeof(TaskQueue<TaskAllo… in Destroy() 123 auto *queue = &foregroundTaskQueue_; in PopTask() local 125 queue = &backgroundTaskQueue_; in PopTask() 134 auto task = PopTaskFromQueue(*queue); in PopTask() 224 using InternalTaskQueue = std::queue<Task, std::deque<Task, TaskAllocatorType>>; 260 Task PopTaskFromQueue(InternalTaskQueue &queue) REQUIRES(taskQueueStateLock_) in PopTaskFromQueue() argument 262 auto task = std::move(queue.front()); in PopTaskFromQueue() 263 queue.pop(); in PopTaskFromQueue()
|
| /arkcompiler/ets_frontend/ets2panda/compiler/core/ |
| D | compileQueue.cpp | 66 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_frontend/es2panda/util/ |
| D | workerQueue.cpp | 59 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/ |
| D | service.cpp | 35 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() 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/static_core/libpandabase/tests/ringbuf/ |
| D | lock_free_ring_buffer_test.cpp | 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.pop(); in TEST()
|
| /arkcompiler/runtime_core/libpandabase/tests/ringbuf/ |
| D | lock_free_ring_buffer_test.cpp | 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.pop(); in TEST()
|
| /arkcompiler/ets_runtime/ecmascript/js_api/ |
| D | js_api_queue.cpp | 27 void JSAPIQueue::Add(JSThread *thread, const JSHandle<JSAPIQueue> &queue, const JSHandle<JSTaggedVa… in Add() argument 29 uint32_t length = queue->GetLength().GetArrayLength(); in Add() 30 JSHandle<TaggedArray> elements = GrowCapacity(thread, queue, length + 1); in Add() 33 uint32_t tail = queue->GetTail(); in Add() 36 queue->SetLength(thread, JSTaggedValue(++length)); in Add() 40 queue->SetTail((tail + 1) % elementsSize); in Add() 71 JSTaggedValue JSAPIQueue::GetFirst(JSThread *thread, const JSHandle<JSAPIQueue> &queue) in GetFirst() argument 73 if (queue->GetLength().GetArrayLength() < 1) { in GetFirst() 77 uint32_t index = queue->GetFront(); in GetFirst() 79 JSHandle<TaggedArray> elements(thread, queue->GetElements()); in GetFirst() [all …]
|
| D | js_api_hashmap_iterator.cpp | 53 JSMutableHandle<TaggedQueue> queue(thread, iter->GetTaggedQueue()); in Next() local 60 currentNode.Update(JSAPIHashMapIterator::FastGetCurrentNode(thread, iter, queue, tableArr)); in Next() 90 … JSMutableHandle<TaggedQueue> &queue, in FastGetCurrentNode() argument 97 return GetCurrentNode(thread, iter, queue, tableArr); in FastGetCurrentNode() 117 JSMutableHandle<TaggedQueue> &queue, in GetCurrentNode() argument 122 if (queue->Empty()) { in GetCurrentNode() 129 rootValue = JSHandle<JSTaggedValue>(thread, queue->Pop(thread)); in GetCurrentNode() 135 queue.Update(JSTaggedValue(TaggedQueue::Push(thread, queue, left))); in GetCurrentNode() 139 queue.Update(JSTaggedValue(TaggedQueue::Push(thread, queue, right))); in GetCurrentNode() 142 iter->SetTaggedQueue(thread, queue.GetTaggedValue()); in GetCurrentNode() [all …]
|
| D | js_api_hashset_iterator.cpp | 54 JSMutableHandle<TaggedQueue> queue(thread, iter->GetTaggedQueue()); in Next() local 59 currentNode.Update(FastGetCurrentNode(thread, iter, queue, tableArr)); in Next() 85 … JSMutableHandle<TaggedQueue> &queue, in FastGetCurrentNode() argument 92 return GetCurrentNode(thread, iter, queue, tableArr); in FastGetCurrentNode() 111 JSMutableHandle<TaggedQueue> &queue, in GetCurrentNode() argument 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.Update(JSTaggedValue(TaggedQueue::Push(thread, queue, right))); in GetCurrentNode() 136 iter->SetTaggedQueue(thread, queue.GetTaggedValue()); in GetCurrentNode() [all …]
|
| D | js_api_queue_iterator.cpp | 42 JSHandle<JSTaggedValue> queue(thread, iter->GetIteratedQueue()); in Next() local 44 if (queue->IsUndefined()) { in Next() 49 uint32_t length = JSAPIQueue::GetArrayLength(thread, JSHandle<JSAPIQueue>(queue)); in Next() 57 JSHandle<JSTaggedValue> value(thread, JSHandle<JSAPIQueue>::Cast(queue)->Get(thread, index)); in Next()
|
| D | js_api_queue.h | 32 …static void Add(JSThread *thread, const JSHandle<JSAPIQueue> &queue, const JSHandle<JSTaggedValue>… 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<JSTaggedVa… 74 static uint32_t GetArrayLength(JSThread *thread, const JSHandle<JSAPIQueue> &queue);
|
| /arkcompiler/ets_runtime/ecmascript/tests/ |
| D | js_tagged_queue_test.cpp | 58 JSHandle<TaggedQueue> queue = thread->GetEcmaVM()->GetFactory()->NewTaggedQueue(0); in HWTEST_F_L0() local 59 EXPECT_TRUE(*queue != nullptr); in HWTEST_F_L0() 60 EXPECT_TRUE(queue->Empty()); in HWTEST_F_L0() 61 EXPECT_EQ(queue->Size(), 0U); in HWTEST_F_L0() 62 EXPECT_EQ(queue->Front(), JSTaggedValue::Hole()); in HWTEST_F_L0() 63 EXPECT_EQ(queue->Back(), JSTaggedValue::Hole()); in HWTEST_F_L0() 68 JSHandle<TaggedQueue> queue = thread->GetEcmaVM()->GetFactory()->NewTaggedQueue(0); in HWTEST_F_L0() local 69 EXPECT_TRUE(queue->Empty()); in HWTEST_F_L0() 72 … TaggedQueue::Push(thread, queue, JSHandle<JSTaggedValue>(thread, JSTaggedValue(0)))); in HWTEST_F_L0()
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_test_suite/gc/ |
| D | finalization_queue_test.ets | 21 let queue: FinalizationQueue | null = null; 44 function finalizationQueueTest(queue: FinalizationQueue | null): void { 54 queue.register(object1!, object1_callbackArg as Object, object1_token); 55 queue.register(object2!, object2_callbackArg as Object, object2_token); 56 queue.register(object3!, object3_callbackArg as Object); 61 queue.unregister(unregistered_token); 62 queue.unregister(null); 73 queue.unregister(object2_token); 90 queue = new FinalizationQueue(callback); 91 finalizationQueueTest(queue); [all …]
|
| /arkcompiler/toolchain/tooling/test/testcases/js/ |
| D | container.js | 234 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.add(999); [all …]
|
| /arkcompiler/runtime_core/static_core/compiler/optimizer/analysis/ |
| D | live_registers.cpp | 99 ArenaQueue<const Split *> queue(lalloc->Adapter()); in BuildIntervalsTree() local 105 …queue.push(lalloc->New<Split>(intervals->begin(), intervals->end(), lnRange.first, lnRange.second,… 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/ecmascript/snapshot/mem/ |
| D | snapshot_processor.h | 53 …void ProcessObjectQueue(CQueue<TaggedObject *> *queue, std::unordered_map<uint64_t, ObjectEncode> … 54 void SerializeObject(TaggedObject *objectHeader, CQueue<TaggedObject *> *queue, 62 EncodeBit EncodeTaggedObject(TaggedObject *objectHeader, CQueue<TaggedObject *> *queue, 64 EncodeBit GetObjectEncode(JSTaggedValue object, CQueue<TaggedObject *> *queue, 66 void EncodeTaggedObjectRange(ObjectSlot start, ObjectSlot end, CQueue<TaggedObject *> *queue, 111 …SerializeObjectHeader(TaggedObject *objectHeader, size_t objectType, CQueue<TaggedObject *> *queue, 113 uint64_t SerializeTaggedField(JSTaggedType *tagged, CQueue<TaggedObject *> *queue,
|