|
From: openocd-gerrit <ope...@us...> - 2026-09-13 04:53:43
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via bd521b22217b64c47573d084a3ce49a03b1e0e61 (commit)
from b5230e2a0612cd5853b41e557e6d03dd182c83b7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit bd521b22217b64c47573d084a3ce49a03b1e0e61
Author: Tomas Vanek <va...@fb...>
Date: Thu Aug 20 10:53:25 2026 +0200
target/riscv: avoid flooding the log during poll
C style guide in chapter "Logging" reads:
"Try to avoid flooding the log with frequently generated messages.
For example, do not use LOG_DEBUG() in operations used for polling
the target. Use LOG_DEBUG_IO() for such frequent messages."
Follow the guide and move the offending debug logs to debug I/O level.
Change-Id: I3e6d71b9182c168648cf60103ae335dab7100d13
Signed-off-by: Tomas Vanek <va...@fb...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9843
Reviewed-by: Antonio Borneo <bor...@gm...>
Tested-by: jenkins
diff --git a/src/target/riscv/riscv.c b/src/target/riscv/riscv.c
index a38eed07b..dd5051c1f 100644
--- a/src/target/riscv/riscv.c
+++ b/src/target/riscv/riscv.c
@@ -3868,7 +3868,7 @@ static int riscv_poll_hart(struct target *target, enum riscv_next_action *next_a
{
RISCV_INFO(r);
- LOG_TARGET_DEBUG(target, "polling, target->state=%d", target->state);
+ LOG_TARGET_DEBUG_IO(target, "polling, target->state=%d", target->state);
*next_action = RPH_NONE;
@@ -4045,7 +4045,7 @@ exit:
/*** OpenOCD Interface ***/
int riscv_openocd_poll(struct target *target)
{
- LOG_TARGET_DEBUG(target, "Polling all harts.");
+ LOG_TARGET_DEBUG_IO(target, "Polling all harts.");
struct riscv_info *i = riscv_info(target);
@@ -4104,7 +4104,7 @@ int riscv_openocd_poll(struct target *target)
}
}
- LOG_TARGET_DEBUG(target, "should_remain_halted=%d, should_resume=%d",
+ LOG_TARGET_DEBUG_IO(target, "should_remain_halted=%d, should_resume=%d",
should_remain_halted, should_resume);
if (should_remain_halted && should_resume) {
LOG_TARGET_WARNING(target, "%d harts should remain halted, and %d should resume.",
diff --git a/src/target/riscv/riscv_reg.c b/src/target/riscv/riscv_reg.c
index ba1bc2a85..71d5de280 100644
--- a/src/target/riscv/riscv_reg.c
+++ b/src/target/riscv/riscv_reg.c
@@ -778,7 +778,7 @@ int riscv_reg_flush_all(struct target *target)
if (!target->reg_cache)
return ERROR_OK;
- LOG_TARGET_DEBUG(target, "Flushing register cache");
+ LOG_TARGET_DEBUG_IO(target, "Flushing register cache");
/* Writing non-GPR registers may require progbuf execution, and some GPRs
* may become dirty in the process (e.g. S0, S1). For that reason, flush
@@ -795,7 +795,7 @@ int riscv_reg_flush_all(struct target *target)
return ERROR_FAIL;
}
}
- LOG_TARGET_DEBUG(target, "Flush of register cache completed");
+ LOG_TARGET_DEBUG_IO(target, "Flush of register cache completed");
return ERROR_OK;
}
-----------------------------------------------------------------------
Summary of changes:
src/target/riscv/riscv.c | 6 +++---
src/target/riscv/riscv_reg.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|