[RH7] trace: fix debug prints for busyloop tracking in tracing_read_pipe

Submitted by Pavel Tikhomirov on Nov. 7, 2018, 9:54 a.m.

Details

Message ID 20181107095446.25058-1-ptikhomirov@virtuozzo.com
State New
Series "trace: fix debug prints for busyloop tracking in tracing_read_pipe"
Headers show

Commit Message

Pavel Tikhomirov Nov. 7, 2018, 9:54 a.m.
Make it realy shut only after 10000 cycles.

https://jira.sw.ru/browse/PSBM-53928
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
---
 kernel/trace/trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 3bb31030a51c..cce5ef576489 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -4400,7 +4400,7 @@  tracing_read_pipe(struct file *filp, char __user *ubuf,
 	 * entries, go back to wait for more entries.
 	 */
 	if (sret == -EBUSY) {
-		if ((loops % 10000) == 0) {
+		if ((++loops % 10000) == 0) {
 			WARN_ON(1);
 			printk("%ldk loops in tracing_read_pipe\n", loops / 1000);
 			printk("trace_empty(iter): %d\n", trace_empty(iter));