From 4c2e3c24291615ef396c295050a28500a8695b8c Mon Sep 17 00:00:00 2001 From: Ivan Chikish Date: Thu, 13 Jul 2023 22:15:52 +0300 Subject: [PATCH] [orbis-kernel] log _umtx_op to trace --- orbis-kernel/src/umtx.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/orbis-kernel/src/umtx.cpp b/orbis-kernel/src/umtx.cpp index 5b0eb9794..a0968822f 100644 --- a/orbis-kernel/src/umtx.cpp +++ b/orbis-kernel/src/umtx.cpp @@ -60,7 +60,7 @@ orbis::ErrorCode orbis::umtx_unlock_umtx(Thread *thread, ptr umtx, orbis::ErrorCode orbis::umtx_wait(Thread *thread, ptr addr, ulong id, std::uint64_t ut, bool is32) { - ORBIS_LOG_NOTICE(__FUNCTION__, thread->tid, addr, id, ut, is32); + ORBIS_LOG_TRACE(__FUNCTION__, thread->tid, addr, id, ut, is32); auto [chain, key, lock] = g_context.getUmtxChain0(thread->tproc->pid, addr); auto node = chain.enqueue(key, thread); ErrorCode result = {}; @@ -97,7 +97,7 @@ orbis::ErrorCode orbis::umtx_wait(Thread *thread, ptr addr, ulong id, } orbis::ErrorCode orbis::umtx_wake(Thread *thread, ptr addr, sint n_wake) { - ORBIS_LOG_NOTICE(__FUNCTION__, thread->tid, addr, n_wake); + ORBIS_LOG_TRACE(__FUNCTION__, thread->tid, addr, n_wake); auto [chain, key, lock] = g_context.getUmtxChain0(thread->tproc->pid, addr); std::size_t count = chain.sleep_queue.count(key); // TODO: check this @@ -132,7 +132,7 @@ void log_class_string::format(std::string &out, } static ErrorCode do_lock_normal(Thread *thread, ptr m, uint flags, std::uint64_t ut, umutex_lock_mode mode) { - ORBIS_LOG_NOTICE(__FUNCTION__, thread->tid, m, flags, ut, mode); + ORBIS_LOG_TRACE(__FUNCTION__, thread->tid, m, flags, ut, mode); ErrorCode error = {}; while (true) { @@ -187,7 +187,7 @@ static ErrorCode do_lock_pp(Thread *thread, ptr m, uint flags, return ErrorCode::NOSYS; } static ErrorCode do_unlock_normal(Thread *thread, ptr m, uint flags) { - ORBIS_LOG_NOTICE(__FUNCTION__, thread->tid, m, flags); + ORBIS_LOG_TRACE(__FUNCTION__, thread->tid, m, flags); int owner = m->owner.load(std::memory_order_acquire); if ((owner & ~kUmutexContested) != thread->tid) @@ -277,7 +277,7 @@ orbis::ErrorCode orbis::umtx_set_ceiling(Thread *thread, ptr m, orbis::ErrorCode orbis::umtx_cv_wait(Thread *thread, ptr cv, ptr m, std::uint64_t ut, ulong wflags) { - ORBIS_LOG_NOTICE(__FUNCTION__, thread->tid, cv, m, ut, wflags); + ORBIS_LOG_TRACE(__FUNCTION__, thread->tid, cv, m, ut, wflags); uint flags; if (ErrorCode err = uread(flags, &m->flags); err != ErrorCode{}) return err; @@ -335,7 +335,7 @@ orbis::ErrorCode orbis::umtx_cv_wait(Thread *thread, ptr cv, } orbis::ErrorCode orbis::umtx_cv_signal(Thread *thread, ptr cv) { - ORBIS_LOG_NOTICE(__FUNCTION__, thread->tid, cv); + ORBIS_LOG_TRACE(__FUNCTION__, thread->tid, cv); auto [chain, key, lock] = g_context.getUmtxChain0(thread->tproc->pid, cv); std::size_t count = chain.sleep_queue.count(key); if (chain.notify_one(key) >= count) @@ -344,7 +344,7 @@ orbis::ErrorCode orbis::umtx_cv_signal(Thread *thread, ptr cv) { } orbis::ErrorCode orbis::umtx_cv_broadcast(Thread *thread, ptr cv) { - ORBIS_LOG_NOTICE(__FUNCTION__, thread->tid, cv); + ORBIS_LOG_TRACE(__FUNCTION__, thread->tid, cv); auto [chain, key, lock] = g_context.getUmtxChain0(thread->tproc->pid, cv); chain.notify_all(key); cv->has_waiters.store(0, std::memory_order::relaxed); @@ -431,7 +431,7 @@ orbis::ErrorCode orbis::umtx_sem_wake(Thread *thread, ptr obj, orbis::ErrorCode orbis::umtx_nwake_private(Thread *thread, ptr uaddrs, std::int64_t count) { - ORBIS_LOG_NOTICE(__FUNCTION__, thread->tid, uaddrs, count); + ORBIS_LOG_TRACE(__FUNCTION__, thread->tid, uaddrs, count); while (count-- > 0) { void *uaddr; auto error = uread(uaddr, uaddrs++);