mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
tracing: Move get_hist_field_flags()
Move get_hist_field_flags() to make it more easily accessible for new code (and keep the move separate from new functionality). Link: http://lkml.kernel.org/r/32470f0a7047ec7a6e84ba5ec89d6142cc6ede7d.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org> (cherry picked from commit fde3bce553d359c01beb9a6fce4013b65076aff3) Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: azrim <mirzaspc@gmail.com>
This commit is contained in:
parent
99e11bc4a1
commit
43d74fc395
@ -497,6 +497,28 @@ static const struct tracing_map_ops hist_trigger_elt_comm_ops = {
|
||||
.elt_init = hist_trigger_elt_comm_init,
|
||||
};
|
||||
|
||||
static const char *get_hist_field_flags(struct hist_field *hist_field)
|
||||
{
|
||||
const char *flags_str = NULL;
|
||||
|
||||
if (hist_field->flags & HIST_FIELD_FL_HEX)
|
||||
flags_str = "hex";
|
||||
else if (hist_field->flags & HIST_FIELD_FL_SYM)
|
||||
flags_str = "sym";
|
||||
else if (hist_field->flags & HIST_FIELD_FL_SYM_OFFSET)
|
||||
flags_str = "sym-offset";
|
||||
else if (hist_field->flags & HIST_FIELD_FL_EXECNAME)
|
||||
flags_str = "execname";
|
||||
else if (hist_field->flags & HIST_FIELD_FL_SYSCALL)
|
||||
flags_str = "syscall";
|
||||
else if (hist_field->flags & HIST_FIELD_FL_LOG2)
|
||||
flags_str = "log2";
|
||||
else if (hist_field->flags & HIST_FIELD_FL_TIMESTAMP_USECS)
|
||||
flags_str = "usecs";
|
||||
|
||||
return flags_str;
|
||||
}
|
||||
|
||||
static void destroy_hist_field(struct hist_field *hist_field,
|
||||
unsigned int level)
|
||||
{
|
||||
@ -1498,28 +1520,6 @@ const struct file_operations event_hist_fops = {
|
||||
.release = single_release,
|
||||
};
|
||||
|
||||
static const char *get_hist_field_flags(struct hist_field *hist_field)
|
||||
{
|
||||
const char *flags_str = NULL;
|
||||
|
||||
if (hist_field->flags & HIST_FIELD_FL_HEX)
|
||||
flags_str = "hex";
|
||||
else if (hist_field->flags & HIST_FIELD_FL_SYM)
|
||||
flags_str = "sym";
|
||||
else if (hist_field->flags & HIST_FIELD_FL_SYM_OFFSET)
|
||||
flags_str = "sym-offset";
|
||||
else if (hist_field->flags & HIST_FIELD_FL_EXECNAME)
|
||||
flags_str = "execname";
|
||||
else if (hist_field->flags & HIST_FIELD_FL_SYSCALL)
|
||||
flags_str = "syscall";
|
||||
else if (hist_field->flags & HIST_FIELD_FL_LOG2)
|
||||
flags_str = "log2";
|
||||
else if (hist_field->flags & HIST_FIELD_FL_TIMESTAMP_USECS)
|
||||
flags_str = "usecs";
|
||||
|
||||
return flags_str;
|
||||
}
|
||||
|
||||
static void hist_field_print(struct seq_file *m, struct hist_field *hist_field)
|
||||
{
|
||||
const char *field_name = hist_field_name(hist_field, 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user