* [PATCH 1/2] blk-wbt: Use tracepoint_string() for wbt_step tracepoint string literals
@ 2020-04-17 13:00 Tommi Rantala
2020-04-17 13:00 ` [PATCH 2/2] blk-wbt: Drop needless newlines from tracepoint format strings Tommi Rantala
2020-04-17 14:22 ` [PATCH 1/2] blk-wbt: Use tracepoint_string() for wbt_step tracepoint string literals Jens Axboe
0 siblings, 2 replies; 3+ messages in thread
From: Tommi Rantala @ 2020-04-17 13:00 UTC (permalink / raw)
To: Jens Axboe; +Cc: Tommi Rantala, linux-block, linux-kernel
Use tracepoint_string() for string literals that are used in the
wbt_step tracepoint, so that userspace tools can display the string
content.
Signed-off-by: Tommi Rantala <tommi.t.rantala@nokia.com>
---
block/blk-wbt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/blk-wbt.c b/block/blk-wbt.c
index 8641ba9793c5..9cb082f38b93 100644
--- a/block/blk-wbt.c
+++ b/block/blk-wbt.c
@@ -313,7 +313,7 @@ static void scale_up(struct rq_wb *rwb)
calc_wb_limits(rwb);
rwb->unknown_cnt = 0;
rwb_wake_all(rwb);
- rwb_trace_step(rwb, "scale up");
+ rwb_trace_step(rwb, tracepoint_string("scale up"));
}
static void scale_down(struct rq_wb *rwb, bool hard_throttle)
@@ -322,7 +322,7 @@ static void scale_down(struct rq_wb *rwb, bool hard_throttle)
return;
calc_wb_limits(rwb);
rwb->unknown_cnt = 0;
- rwb_trace_step(rwb, "scale down");
+ rwb_trace_step(rwb, tracepoint_string("scale down"));
}
static void rwb_arm_timer(struct rq_wb *rwb)
--
2.25.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] blk-wbt: Drop needless newlines from tracepoint format strings
2020-04-17 13:00 [PATCH 1/2] blk-wbt: Use tracepoint_string() for wbt_step tracepoint string literals Tommi Rantala
@ 2020-04-17 13:00 ` Tommi Rantala
2020-04-17 14:22 ` [PATCH 1/2] blk-wbt: Use tracepoint_string() for wbt_step tracepoint string literals Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Tommi Rantala @ 2020-04-17 13:00 UTC (permalink / raw)
To: Jens Axboe
Cc: Tommi Rantala, Steven Rostedt, Ingo Molnar, Bart Van Assche,
linux-kernel
Drop needless newlines from tracepoint format strings, they only add
empty lines to perf tracing output.
Signed-off-by: Tommi Rantala <tommi.t.rantala@nokia.com>
---
include/trace/events/wbt.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/trace/events/wbt.h b/include/trace/events/wbt.h
index 37342a13c9cb..784814160197 100644
--- a/include/trace/events/wbt.h
+++ b/include/trace/events/wbt.h
@@ -46,7 +46,7 @@ TRACE_EVENT(wbt_stat,
),
TP_printk("%s: rmean=%llu, rmin=%llu, rmax=%llu, rsamples=%llu, "
- "wmean=%llu, wmin=%llu, wmax=%llu, wsamples=%llu\n",
+ "wmean=%llu, wmin=%llu, wmax=%llu, wsamples=%llu",
__entry->name, __entry->rmean, __entry->rmin, __entry->rmax,
__entry->rnr_samples, __entry->wmean, __entry->wmin,
__entry->wmax, __entry->wnr_samples)
@@ -73,7 +73,7 @@ TRACE_EVENT(wbt_lat,
__entry->lat = div_u64(lat, 1000);
),
- TP_printk("%s: latency %lluus\n", __entry->name,
+ TP_printk("%s: latency %lluus", __entry->name,
(unsigned long long) __entry->lat)
);
@@ -115,7 +115,7 @@ TRACE_EVENT(wbt_step,
__entry->max = max;
),
- TP_printk("%s: %s: step=%d, window=%luus, background=%u, normal=%u, max=%u\n",
+ TP_printk("%s: %s: step=%d, window=%luus, background=%u, normal=%u, max=%u",
__entry->name, __entry->msg, __entry->step, __entry->window,
__entry->bg, __entry->normal, __entry->max)
);
@@ -148,7 +148,7 @@ TRACE_EVENT(wbt_timer,
__entry->inflight = inflight;
),
- TP_printk("%s: status=%u, step=%d, inflight=%u\n", __entry->name,
+ TP_printk("%s: status=%u, step=%d, inflight=%u", __entry->name,
__entry->status, __entry->step, __entry->inflight)
);
--
2.25.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] blk-wbt: Use tracepoint_string() for wbt_step tracepoint string literals
2020-04-17 13:00 [PATCH 1/2] blk-wbt: Use tracepoint_string() for wbt_step tracepoint string literals Tommi Rantala
2020-04-17 13:00 ` [PATCH 2/2] blk-wbt: Drop needless newlines from tracepoint format strings Tommi Rantala
@ 2020-04-17 14:22 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2020-04-17 14:22 UTC (permalink / raw)
To: Tommi Rantala; +Cc: linux-block, linux-kernel
On 4/17/20 7:00 AM, Tommi Rantala wrote:
> Use tracepoint_string() for string literals that are used in the
> wbt_step tracepoint, so that userspace tools can display the string
> content.
Applied 1-2, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-17 14:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-17 13:00 [PATCH 1/2] blk-wbt: Use tracepoint_string() for wbt_step tracepoint string literals Tommi Rantala
2020-04-17 13:00 ` [PATCH 2/2] blk-wbt: Drop needless newlines from tracepoint format strings Tommi Rantala
2020-04-17 14:22 ` [PATCH 1/2] blk-wbt: Use tracepoint_string() for wbt_step tracepoint string literals Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).