Commit 2d601b98 authored by liqiong's avatar liqiong Committed by Steven Rostedt (Google)

tracing: Change "char *" string form to "char []"

The "char []" string form declares a single variable. It is better
than "char *" which creates two variables in the final assembly.

Link: https://lkml.kernel.org/r/20220512143230.28796-1-liqiong@nfschina.comSigned-off-by: default avatarliqiong <liqiong@nfschina.com>
Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
parent 9c556e5a
...@@ -4252,7 +4252,7 @@ static void print_func_help_header_irq(struct array_buffer *buf, struct seq_file ...@@ -4252,7 +4252,7 @@ static void print_func_help_header_irq(struct array_buffer *buf, struct seq_file
unsigned int flags) unsigned int flags)
{ {
bool tgid = flags & TRACE_ITER_RECORD_TGID; bool tgid = flags & TRACE_ITER_RECORD_TGID;
const char *space = " "; static const char space[] = " ";
int prec = tgid ? 12 : 2; int prec = tgid ? 12 : 2;
print_event_info(buf, m); print_event_info(buf, m);
......
...@@ -4165,7 +4165,7 @@ static int create_val_field(struct hist_trigger_data *hist_data, ...@@ -4165,7 +4165,7 @@ static int create_val_field(struct hist_trigger_data *hist_data,
return __create_val_field(hist_data, val_idx, file, NULL, field_str, 0); return __create_val_field(hist_data, val_idx, file, NULL, field_str, 0);
} }
static const char *no_comm = "(no comm)"; static const char no_comm[] = "(no comm)";
static u64 hist_field_execname(struct hist_field *hist_field, static u64 hist_field_execname(struct hist_field *hist_field,
struct tracing_map_elt *elt, struct tracing_map_elt *elt,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment