diff options
Diffstat (limited to 'tools/perf/util/probe-event.c')
-rw-r--r-- | tools/perf/util/probe-event.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index d14a4585bcaf..add379c55c36 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c | |||
@@ -150,10 +150,13 @@ static void parse_perf_probe_probepoint(char *arg, struct probe_point *pp) | |||
150 | } | 150 | } |
151 | 151 | ||
152 | /* Parse perf-probe event definition */ | 152 | /* Parse perf-probe event definition */ |
153 | int parse_perf_probe_event(const char *str, struct probe_point *pp) | 153 | void parse_perf_probe_event(const char *str, struct probe_point *pp, |
154 | bool *need_dwarf) | ||
154 | { | 155 | { |
155 | char **argv; | 156 | char **argv; |
156 | int argc, i, need_dwarf = 0; | 157 | int argc, i; |
158 | |||
159 | *need_dwarf = false; | ||
157 | 160 | ||
158 | argv = argv_split(str, &argc); | 161 | argv = argv_split(str, &argc); |
159 | if (!argv) | 162 | if (!argv) |
@@ -164,7 +167,7 @@ int parse_perf_probe_event(const char *str, struct probe_point *pp) | |||
164 | /* Parse probe point */ | 167 | /* Parse probe point */ |
165 | parse_perf_probe_probepoint(argv[0], pp); | 168 | parse_perf_probe_probepoint(argv[0], pp); |
166 | if (pp->file || pp->line) | 169 | if (pp->file || pp->line) |
167 | need_dwarf = 1; | 170 | *need_dwarf = true; |
168 | 171 | ||
169 | /* Copy arguments and ensure return probe has no C argument */ | 172 | /* Copy arguments and ensure return probe has no C argument */ |
170 | pp->nr_args = argc - 1; | 173 | pp->nr_args = argc - 1; |
@@ -177,12 +180,11 @@ int parse_perf_probe_event(const char *str, struct probe_point *pp) | |||
177 | if (pp->retprobe) | 180 | if (pp->retprobe) |
178 | semantic_error("You can't specify local" | 181 | semantic_error("You can't specify local" |
179 | " variable for kretprobe"); | 182 | " variable for kretprobe"); |
180 | need_dwarf = 1; | 183 | *need_dwarf = true; |
181 | } | 184 | } |
182 | } | 185 | } |
183 | 186 | ||
184 | argv_free(argv); | 187 | argv_free(argv); |
185 | return need_dwarf; | ||
186 | } | 188 | } |
187 | 189 | ||
188 | /* Parse kprobe_events event into struct probe_point */ | 190 | /* Parse kprobe_events event into struct probe_point */ |