@@ -497,6 +497,28 @@ static const struct tracing_map_ops hist_trigger_elt_comm_ops = {
497497 .elt_init = hist_trigger_elt_comm_init ,
498498};
499499
500+ static const char * get_hist_field_flags (struct hist_field * hist_field )
501+ {
502+ const char * flags_str = NULL ;
503+
504+ if (hist_field -> flags & HIST_FIELD_FL_HEX )
505+ flags_str = "hex" ;
506+ else if (hist_field -> flags & HIST_FIELD_FL_SYM )
507+ flags_str = "sym" ;
508+ else if (hist_field -> flags & HIST_FIELD_FL_SYM_OFFSET )
509+ flags_str = "sym-offset" ;
510+ else if (hist_field -> flags & HIST_FIELD_FL_EXECNAME )
511+ flags_str = "execname" ;
512+ else if (hist_field -> flags & HIST_FIELD_FL_SYSCALL )
513+ flags_str = "syscall" ;
514+ else if (hist_field -> flags & HIST_FIELD_FL_LOG2 )
515+ flags_str = "log2" ;
516+ else if (hist_field -> flags & HIST_FIELD_FL_TIMESTAMP_USECS )
517+ flags_str = "usecs" ;
518+
519+ return flags_str ;
520+ }
521+
500522static void destroy_hist_field (struct hist_field * hist_field ,
501523 unsigned int level )
502524{
@@ -1495,28 +1517,6 @@ const struct file_operations event_hist_fops = {
14951517 .release = single_release ,
14961518};
14971519
1498- static const char * get_hist_field_flags (struct hist_field * hist_field )
1499- {
1500- const char * flags_str = NULL ;
1501-
1502- if (hist_field -> flags & HIST_FIELD_FL_HEX )
1503- flags_str = "hex" ;
1504- else if (hist_field -> flags & HIST_FIELD_FL_SYM )
1505- flags_str = "sym" ;
1506- else if (hist_field -> flags & HIST_FIELD_FL_SYM_OFFSET )
1507- flags_str = "sym-offset" ;
1508- else if (hist_field -> flags & HIST_FIELD_FL_EXECNAME )
1509- flags_str = "execname" ;
1510- else if (hist_field -> flags & HIST_FIELD_FL_SYSCALL )
1511- flags_str = "syscall" ;
1512- else if (hist_field -> flags & HIST_FIELD_FL_LOG2 )
1513- flags_str = "log2" ;
1514- else if (hist_field -> flags & HIST_FIELD_FL_TIMESTAMP_USECS )
1515- flags_str = "usecs" ;
1516-
1517- return flags_str ;
1518- }
1519-
15201520static void hist_field_print (struct seq_file * m , struct hist_field * hist_field )
15211521{
15221522 const char * field_name = hist_field_name (hist_field , 0 );
0 commit comments