Home
last modified time | relevance | path

Searched full:monitor (Results 1 – 25 of 89) sorted by relevance

1234

/arkcompiler/runtime_core/static_core/runtime/
Dmonitor_object_lock.cpp27 [[maybe_unused]] auto res = Monitor::MonitorEnter(objHandler_.GetPtr()); in ObjectLock()
28 ASSERT(res == Monitor::State::OK); in ObjectLock()
33Monitor::State state = Monitor::Wait(objHandler_.GetPtr(), ThreadStatus::IS_WAITING, 0, 0, ignoreI… in Wait()
34 LOG_IF(state == Monitor::State::ILLEGAL, FATAL, RUNTIME) << "Monitor::Wait() failed"; in Wait()
35 return state != Monitor::State::INTERRUPTED; in Wait()
40Monitor::State state = Monitor::Wait(objHandler_.GetPtr(), ThreadStatus::IS_TIMED_WAITING, timeout… in TimedWait()
41 LOG_IF(state == Monitor::State::ILLEGAL, FATAL, RUNTIME) << "Monitor::Wait() failed"; in TimedWait()
42 return state != Monitor::State::INTERRUPTED; in TimedWait()
47 Monitor::State state = Monitor::Notify(objHandler_.GetPtr()); in Notify()
48 LOG_IF(state != Monitor::State::OK, FATAL, RUNTIME) << "Monitor::Notify() failed"; in Notify()
[all …]
Dmonitor_pool.cpp21 #include "runtime/monitor.h"
25 Monitor *MonitorPool::CreateMonitor(ObjectHeader *obj) in CreateMonitor()
28 for (Monitor::MonitorId i = 0; i < MAX_MONITOR_ID; i++) { in CreateMonitor()
31 auto monitor = allocator_->New<Monitor>(lastId_); in CreateMonitor() local
32 if (monitor == nullptr) { in CreateMonitor()
35 monitors_[lastId_] = monitor; in CreateMonitor()
36 monitor->SetObject(obj); in CreateMonitor()
37 return monitor; in CreateMonitor()
44 Monitor *MonitorPool::LookupMonitor(Monitor::MonitorId id) in LookupMonitor()
54 void MonitorPool::FreeMonitor(Monitor::MonitorId id) in FreeMonitor()
[all …]
Dmonitor.cpp16 #include "runtime/monitor.h"
90 void Monitor::InflateThinLock(MTManagedThread *thread, [[maybe_unused]] const VMHandle<ObjectHeader… in InflateThinLock()
94 // and try inflating light monitor (`Inflate` expects lock to still be acquired by target; in InflateThinLock()
95 // otherwise markword CAS fails). If it fails (i.e. thread got suspended when this monitor is in InflateThinLock()
98 // or inflate monitor once this thread acquires light lock), this policy yields much better in InflateThinLock()
101 // monitor still acquired. in InflateThinLock()
116 // NB! Inflate can do nothing if monitor is already unlocked or acquired by other thread. in InflateThinLock()
127 // to heavy monitor in InflateThinLock()
137 std::optional<Monitor::State> Monitor::HandleLightLockedState(MarkWord &mark, MTManagedThread *thre… in HandleLightLockedState()
151 … LOG(DEBUG, RUNTIME) << "The lightweight monitor was successfully recursively acquired"; in HandleLightLockedState()
[all …]
Dmonitor_pool.h24 #include "runtime/monitor.h"
30 // Likely, we do not need to copy monitor pool
34 static constexpr Monitor::MonitorId MAX_MONITOR_ID = MarkWord::MONITOR_POINTER_MAX_COUNT;
52 auto monitor = monitorIter->second; in DeflateMonitorsWithCallBack() local
53 if (cb(monitor) && monitor->DeflateInternal()) { in DeflateMonitorsWithCallBack()
55 allocator_->Delete(monitor); in DeflateMonitorsWithCallBack()
90 Monitor *CreateMonitor(ObjectHeader *obj);
92 Monitor *LookupMonitor(Monitor::MonitorId id);
94 void FreeMonitor(Monitor::MonitorId id);
100 PandaSet<Monitor::MonitorId> GetEnteredMonitorsIds(MTManagedThread *thread);
[all …]
Dmonitor.h77 // Potential drawback: infrustructure to detect, when the monitor is not acquired by any thread and…
80 // Potential targets: after monitor release check the owners of monitors,
85 class Monitor {
100 PANDA_PUBLIC_API static Monitor::State MonitorEnter(ObjectHeader *obj, bool trylock = false);
104 PANDA_PUBLIC_API static Monitor::State MonitorExit(ObjectHeader *obj);
128 * @param thread pointer to thread which will acquire the monitor.
129 …* @tparam for_other_thread include logic for inflation of monitor owned by other thread. Should be…
131 …* @return true if new monitor was successfuly created and object's markword updated with monitor's…
142 * @return true if object's monitor was found, acquired and freed; false otherwise
150 static Monitor *GetMonitorFromObject(ObjectHeader *obj);
[all …]
Dintrinsics.cpp352 auto res = Monitor::MonitorEnter(header); in ObjectMonitorEnter()
354 ASSERT(res != Monitor::State::INTERRUPTED); in ObjectMonitorEnter()
355 if (UNLIKELY(res != Monitor::State::OK)) { in ObjectMonitorEnter()
369 auto res = Monitor::MonitorExit(header); in ObjectMonitorExit()
371 ASSERT(res != Monitor::State::INTERRUPTED); in ObjectMonitorExit()
372 if (res == Monitor::State::ILLEGAL) { in ObjectMonitorExit()
381 Monitor::State state = Monitor::Wait(header, ThreadStatus::IS_WAITING, 0, 0); in ObjectWait()
382 LOG_IF(state == Monitor::State::ILLEGAL, FATAL, RUNTIME) << "Monitor::Wait() failed"; in ObjectWait()
387 Monitor::State state = Monitor::Wait(header, ThreadStatus::IS_TIMED_WAITING, timeout, 0); in ObjectTimedWait()
388 LOG_IF(state == Monitor::State::ILLEGAL, FATAL, RUNTIME) << "Monitor::Wait() failed"; in ObjectTimedWait()
[all …]
Dlock_order_graph.cpp21 void UpdateMonitorsForThread(PandaMap<ManagedThread::ThreadId, Monitor::MonitorId> &enteringMonitor… in UpdateMonitorsForThread()
22 … PandaMap<Monitor::MonitorId, PandaSet<ManagedThread::ThreadId>> &enteredMonitors, in UpdateMonitorsForThread()
71 // We can only wait for a single monitor here. in CheckForTerminationLoops()
114 // There is a rare case, in which a monitor may be entered recursively in a in CheckNodeForTerminationLoops()
Dmark_word.h27 // | state:01 | RB:1 | GC:1 | Monitor:60 | OOP to metadata object | Heavyw…
44 // | state:01 | RB:1 | GC:1 | Monitor:28 | OOP to metadata object | Heavyw…
61 // | state:01 | RB:1 | GC:1 | Monitor:12 | OOP to metadata object | Heavyw…
74 #include "runtime/monitor.h"
180 MarkWord DecodeFromMonitor(Monitor::MonitorId monitor) in DecodeFromMonitor() argument
182 // Clear monitor and status bits in DecodeFromMonitor()
184 MarkWordSize monitorInPlace = (static_cast<MarkWordSize>(monitor) & MONITOR_POINTER_MASK) in DecodeFromMonitor()
209 // Clear monitor and status bits in DecodeFromLightLock()
223 // Clear monitor and status bits in DecodeFromUnlocked()
307 Monitor::MonitorId GetMonitorId() const in GetMonitorId()
[all …]
Dmonitor_object_lock.h18 #include "runtime/monitor.h"
/arkcompiler/runtime_core/static_core/runtime/tests/
Dmonitor_test.cpp68 Monitor::MonitorEnter(header); in TEST_F()
70 Monitor::MonitorExit(header); in TEST_F()
79 Monitor::MonitorEnter(header); in TEST_F()
81 Monitor::MonitorEnter(header); in TEST_F()
83 Monitor::MonitorExit(header); in TEST_F()
85 Monitor::MonitorExit(header); in TEST_F()
95 Monitor::MonitorEnter(header1); in TEST_F()
98 Monitor::MonitorEnter(header2); in TEST_F()
101 Monitor::MonitorExit(header1); in TEST_F()
104 Monitor::MonitorExit(header2); in TEST_F()
[all …]
/arkcompiler/runtime_core/tests/cts-generator/cts-template/
Dmonitor.yaml42 panda.Object monitor
49 stobj.obj a0, RL.monitor
54 ldobj.obj a0, RL.monitor
68 - file-name: 'monitor'
70 title: Monitor instructions
72 Monitor instructions are used to synchronize object access between threads. Each object
73 is associated with a monitor, each monitor has a counter that allows to control access to
74 the monitor object.
77 On monitorenter VM thread tries to get ownership of the monitor in the following manner: if
78 monitor count is equal to zero, then it means that monitor doesn't belong to any thread. In
[all …]
/arkcompiler/runtime_core/static_core/runtime/include/
Dmtmanaged_thread.h35 void AddMonitor(Monitor *monitor);
36 void RemoveMonitor(Monitor *monitor);
60 Monitor *GetWaitingMonitor() in GetWaitingMonitor()
65 void SetWaitingMonitor(Monitor *monitor) in SetWaitingMonitor() argument
67 ASSERT(waitingMonitor_ == nullptr || monitor == nullptr); in SetWaitingMonitor()
68 waitingMonitor_ = monitor; in SetWaitingMonitor()
71 Monitor *GetEnteringMonitor() const in GetEnteringMonitor()
77 void SetEnteringMonitor(Monitor *monitor) in SetEnteringMonitor() argument
80 ASSERT(enteringMonitor_.load(std::memory_order_relaxed) == nullptr || monitor == nullptr); in SetEnteringMonitor()
82 enteringMonitor_.store(monitor, std::memory_order_relaxed); in SetEnteringMonitor()
[all …]
Dthread-inl.h117 ALWAYS_INLINE inline void MTManagedThread::AddMonitor(Monitor *monitor) in AddMonitor() argument
122 LOG(DEBUG, RUNTIME) << "Adding monitor " << monitor->GetId(); in AddMonitor()
125 ALWAYS_INLINE inline void MTManagedThread::RemoveMonitor(Monitor *monitor) in RemoveMonitor() argument
130 LOG(DEBUG, RUNTIME) << "Removing monitor " << monitor->GetId(); in RemoveMonitor()
/arkcompiler/runtime_core/static_core/irtoc/scripts/
Dmonitors.irt26 params: {monitor: 'ptr'},
46 mark_word := LoadI(monitor).Imm(Constants::MARK_WORD_OFFSET).mw
48 addr := Add(monitor, Constants::MARK_WORD_OFFSET).ptr
70 addr := Add(monitor, Constants::MARK_WORD_OFFSET).ptr
75 addr := Add(monitor, Constants::MARK_WORD_OFFSET).ptr
90 StoreI(locked_objects_addr, monitor).Imm(Constants::LOCKED_OBJECT_INFO_MONITOR_OFFSET).ptr
100 …Intrinsic(:SLOW_PATH_ENTRY, monitor).AddImm(ep_offset).MethodAsImm("MonitorEnterOddSavedBridge").T…
107 params: {monitor: 'ptr'},
123 mark_word := LoadI(monitor).Imm(Constants::MARK_WORD_OFFSET).mw
125 addr := Add(monitor, Constants::MARK_WORD_OFFSET).ptr
[all …]
/arkcompiler/runtime_core/tests/checked/
Dmonitor.pa30 #! INST "Monitor"
32 #! INST "Monitor"
57 #! INST "Monitor"
59 #! INST "Monitor"
62 #! INST_NOT "Monitor"
/arkcompiler/runtime_core/static_core/tests/checked/
Dmonitor.pa30 #! INST "Monitor"
32 #! INST "Monitor"
57 #! INST "Monitor"
59 #! INST "Monitor"
64 #! INST_NOT "Monitor"
/arkcompiler/runtime_core/static_core/compiler/tests/
Dmonitor_analysis_test.cpp30 INST(1U, Opcode::Monitor).v0id().Entry().Inputs(0U, 4U); in TEST_F()
32 INST(2U, Opcode::Monitor).v0id().Exit().Inputs(0U, 5U); in TEST_F()
63 INST(4U, Opcode::Monitor).v0id().Entry().Inputs(1U, 11U); in TEST_F()
75 INST(9U, Opcode::Monitor).v0id().Exit().Inputs(1U, 12U); in TEST_F()
114 INST(5U, Opcode::Monitor).v0id().Entry().Inputs(1U, 14U); in SRC_GRAPH()
116 INST(6U, Opcode::Monitor).v0id().Entry().Inputs(2U, 15U); in SRC_GRAPH()
118 INST(7U, Opcode::Monitor).v0id().Exit().Inputs(1U, 16U); in SRC_GRAPH()
130 INST(12U, Opcode::Monitor).v0id().Exit().Inputs(2U, 17U); in SRC_GRAPH()
173 INST(4U, Opcode::Monitor).v0id().Entry().Inputs(1U, 12U); in SRC_GRAPH()
180 INST(7U, Opcode::Monitor).v0id().Exit().Inputs(1U, 13U); in SRC_GRAPH()
[all …]
/arkcompiler/ets_runtime/common_components/heap/allocator/
Dfix_heap.h76 FixHeapWorker(ArkCollector *collector, TaskPackMonitor &monitor, Result &result, in FixHeapWorker() argument
78 : Task(0), collector_(collector), monitor_(monitor), result_(result), getNextTask_(next) in FixHeapWorker()
126 PostFixHeapWorker(FixHeapWorker::Result &result, TaskPackMonitor &monitor) noexcept in PostFixHeapWorker() argument
128 : Task(0), monitor_(monitor), result_(result) in PostFixHeapWorker()
/arkcompiler/ets_runtime/common_components/heap/space/
Dfrom_space.cpp94 …k(int32_t id, FromSpace& fromSpace, RegionDesc* region, size_t regionCnt, TaskPackMonitor &monitor) in CopyTask() argument
95 …ask(id), fromSpace_(fromSpace), startRegion_(region), regionCount_(regionCnt), monitor_(monitor) {} in CopyTask()
163 TaskPackMonitor monitor(parallel, parallel); in CopyFromRegions() local
170 …hreadPool->PostTask(std::make_unique<CopyTask>(0, *this, startRegion, regionCntEachTask, monitor)); in CopyFromRegions()
173 monitor.WaitAllFinished(); in CopyFromRegions()
/arkcompiler/runtime_core/panda_guard/obfuscate/
Dui_decorator.h43 MONITOR, enumerator
88 * @Monitor("age", "name") --> need obfuscated age and name
89 * @Monitor("info.name") --> need obfuscated info and name
/arkcompiler/ets_runtime/common_components/heap/collector/
Dmarking_collector.cpp52 … ConcurrentMarkingTask(uint32_t id, MarkingCollector &tc, Taskpool *pool, TaskPackMonitor &monitor, in ConcurrentMarkingTask() argument
54 : Task(id), collector_(tc), threadPool_(pool), monitor_(monitor), globalQueue_(globalQueue) in ConcurrentMarkingTask()
58 ConcurrentMarkingTask(uint32_t id, MarkingCollector& tc, TaskPackMonitor &monitor, in ConcurrentMarkingTask() argument
60 … : Task(id), collector_(tc), threadPool_(nullptr), monitor_(monitor), globalQueue_(globalQueue) in ConcurrentMarkingTask()
91 ClearWeakStackTask(uint32_t id, MarkingCollector &tc, Taskpool *pool, TaskPackMonitor &monitor, in ClearWeakStackTask() argument
93 : Task(id), collector_(tc), threadPool_(pool), monitor_(monitor), globalQueue_(globalQueue) in ClearWeakStackTask()
97 ClearWeakStackTask(uint32_t id, MarkingCollector& tc, TaskPackMonitor &monitor, in ClearWeakStackTask() argument
99 … : Task(id), collector_(tc), threadPool_(nullptr), monitor_(monitor), globalQueue_(globalQueue) in ClearWeakStackTask()
323 TaskPackMonitor monitor(parallelCount, parallelCount); in TracingImpl() local
326 …ool->PostTask(std::make_unique<ConcurrentMarkingTask>(0, *this, threadPool, monitor, globalQueue)); in TracingImpl()
[all …]
/arkcompiler/runtime_core/static_core/runtime/include/tooling/
Ddebug_interface.h278 * @param object Reference to the monitor
286 * @param object Reference to the monitor
287 * @param timedOut True if the monitor timed out
292 …* @brief Method is called by the runtime when a thread is attempting to enter a monitor already ac…
295 * @param object Reference to the monitor
300 …* @brief Method is called by the runtime when a thread enters a monitor after waiting for it to be…
303 * @param object Reference to the monitor
/arkcompiler/runtime_core/static_core/runtime/mem/gc/
Dgc_root.cpp264 vm_->GetMonitorPool()->EnumerateMonitors([&gcRootUpdater](Monitor *monitor) { in UpdateRefsToMovedObjects() argument
265 ObjectHeader *objectHeader = monitor->GetObject(); in UpdateRefsToMovedObjects()
271 …LOG(DEBUG, GC) << "Update monitor " << std::hex << monitor << " object, old val = " << objectHeader in UpdateRefsToMovedObjects()
273 monitor->SetObject(reinterpret_cast<ObjectHeader *>(newObjectHeader)); in UpdateRefsToMovedObjects()
/arkcompiler/runtime_core/static_core/compiler/optimizer/analysis/
Dmonitor_analysis.cpp35 // The Monitor.Exit is removed from the compiled code after explicit Throw instruction in MarkedMonitorRec()
39 if (inst->GetOpcode() == Opcode::Monitor) { in MarkedMonitorRec()
/arkcompiler/ets_frontend/ets2panda/linter/src/lib/utils/consts/
DDefaultDecoratorWhitelist.ts79 'Monitor',

1234