diff mbox series

[1/3] mm: mmap_lock: remove redundant "\n" in TP_printk

Message ID 20210729092831.38106-1-ligang.bdlg@bytedance.com (mailing list archive)
State New
Headers show
Series mmap: mmap_lock: some improvments | expand

Commit Message

Gang Li July 29, 2021, 9:28 a.m. UTC
Ftrace core will add "\n" automatically on print. "\n" in TP_printk
will create blank line, so remove it.

Signed-off-by: Gang Li <ligang.bdlg@bytedance.com>
---
 include/trace/events/mmap_lock.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Axel Rasmussen July 29, 2021, 5:25 p.m. UTC | #1
Reviewed-by: Axel Rasmussen <axelrasmussen@google.com>

On Thu, Jul 29, 2021 at 2:28 AM Gang Li <ligang.bdlg@bytedance.com> wrote:
>
> Ftrace core will add "\n" automatically on print. "\n" in TP_printk
> will create blank line, so remove it.
>
> Signed-off-by: Gang Li <ligang.bdlg@bytedance.com>
> ---
>  include/trace/events/mmap_lock.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/trace/events/mmap_lock.h b/include/trace/events/mmap_lock.h
> index 0abff67b96f0..5f980c92e3e9 100644
> --- a/include/trace/events/mmap_lock.h
> +++ b/include/trace/events/mmap_lock.h
> @@ -32,7 +32,7 @@ TRACE_EVENT_FN(mmap_lock_start_locking,
>         ),
>
>         TP_printk(
> -               "mm=%p memcg_path=%s write=%s\n",
> +               "mm=%p memcg_path=%s write=%s",
>                 __entry->mm,
>                 __get_str(memcg_path),
>                 __entry->write ? "true" : "false"
> @@ -63,7 +63,7 @@ TRACE_EVENT_FN(mmap_lock_acquire_returned,
>         ),
>
>         TP_printk(
> -               "mm=%p memcg_path=%s write=%s success=%s\n",
> +               "mm=%p memcg_path=%s write=%s success=%s",
>                 __entry->mm,
>                 __get_str(memcg_path),
>                 __entry->write ? "true" : "false",
> @@ -92,7 +92,7 @@ TRACE_EVENT_FN(mmap_lock_released,
>         ),
>
>         TP_printk(
> -               "mm=%p memcg_path=%s write=%s\n",
> +               "mm=%p memcg_path=%s write=%s",
>                 __entry->mm,
>                 __get_str(memcg_path),
>                 __entry->write ? "true" : "false"
> --
> 2.20.1
>
Muchun Song July 30, 2021, 2:45 a.m. UTC | #2
On Thu, Jul 29, 2021 at 5:28 PM Gang Li <ligang.bdlg@bytedance.com> wrote:
>
> Ftrace core will add "\n" automatically on print. "\n" in TP_printk
> will create blank line, so remove it.
>
> Signed-off-by: Gang Li <ligang.bdlg@bytedance.com>

Reviewed-by: Muchun Song <songmuchun@bytedance.com>
diff mbox series

Patch

diff --git a/include/trace/events/mmap_lock.h b/include/trace/events/mmap_lock.h
index 0abff67b96f0..5f980c92e3e9 100644
--- a/include/trace/events/mmap_lock.h
+++ b/include/trace/events/mmap_lock.h
@@ -32,7 +32,7 @@  TRACE_EVENT_FN(mmap_lock_start_locking,
 	),
 
 	TP_printk(
-		"mm=%p memcg_path=%s write=%s\n",
+		"mm=%p memcg_path=%s write=%s",
 		__entry->mm,
 		__get_str(memcg_path),
 		__entry->write ? "true" : "false"
@@ -63,7 +63,7 @@  TRACE_EVENT_FN(mmap_lock_acquire_returned,
 	),
 
 	TP_printk(
-		"mm=%p memcg_path=%s write=%s success=%s\n",
+		"mm=%p memcg_path=%s write=%s success=%s",
 		__entry->mm,
 		__get_str(memcg_path),
 		__entry->write ? "true" : "false",
@@ -92,7 +92,7 @@  TRACE_EVENT_FN(mmap_lock_released,
 	),
 
 	TP_printk(
-		"mm=%p memcg_path=%s write=%s\n",
+		"mm=%p memcg_path=%s write=%s",
 		__entry->mm,
 		__get_str(memcg_path),
 		__entry->write ? "true" : "false"