aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2012-05-22 10:30:48 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-05-22 11:31:26 -0400
commite326e7524531c5c6de4a8cf8eeed60b4a9f47637 (patch)
tree10bb1b044d8495bc746daf722e929fab48a5a11d /tools
parent6b5fc39bdd781711d7da8b95ae0243df3b35c5bf (diff)
perf script: Explicitly handle known default print arg type
Handle the print argument types brought by the new libparsevent in perl scripting engine. PRINT_BSTRING and PRINT_DYNAMIC_ARRAY are treated just like strings and thus don't require specific processing. But PRINT_FUNC need specific plugins which are not yet handled, lets warn if we meet this case. This fixes: util/scripting-engines/trace-event-perl.c: In function define_event_symbol: util/scripting-engines/trace-event-perl.c:188: error: enumeration value PRINT_BSTRING not handled in switch util/scripting-engines/trace-event-perl.c:188: error: enumeration value PRINT_DYNAMIC_ARRAY not handled in switch util/scripting-engines/trace-event-perl.c:188: error: enumeration value PRINT_FUNC not handled in switch Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Frederic Weisbecker <fweisbec@redhat.com> Cc: Frederic Weisbecker <fweisbec@redhat.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Namhyung Kim <namhyung.kim@lge.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Tom Zanussi <tzanussi@gmail.com> Link: http://lkml.kernel.org/r/1337697049-30251-1-git-send-email-fweisbec@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/scripting-engines/trace-event-perl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/scripting-engines/trace-event-perl.c b/tools/perf/util/scripting-engines/trace-event-perl.c
index e30749e38a9b..d50658b7d9e0 100644
--- a/tools/perf/util/scripting-engines/trace-event-perl.c
+++ b/tools/perf/util/scripting-engines/trace-event-perl.c
@@ -209,6 +209,8 @@ static void define_event_symbols(struct event *event,
209 define_symbolic_values(args->symbol.symbols, ev_name, 209 define_symbolic_values(args->symbol.symbols, ev_name,
210 cur_field_name); 210 cur_field_name);
211 break; 211 break;
212 case PRINT_BSTRING:
213 case PRINT_DYNAMIC_ARRAY:
212 case PRINT_STRING: 214 case PRINT_STRING:
213 break; 215 break;
214 case PRINT_TYPE: 216 case PRINT_TYPE:
@@ -220,7 +222,9 @@ static void define_event_symbols(struct event *event,
220 define_event_symbols(event, ev_name, args->op.left); 222 define_event_symbols(event, ev_name, args->op.left);
221 define_event_symbols(event, ev_name, args->op.right); 223 define_event_symbols(event, ev_name, args->op.right);
222 break; 224 break;
225 case PRINT_FUNC:
223 default: 226 default:
227 pr_err("Unsupported print arg type\n");
224 /* we should warn... */ 228 /* we should warn... */
225 return; 229 return;
226 } 230 }