Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 1 | /* |
| 2 | * builtin-inject.c |
| 3 | * |
| 4 | * Builtin inject command: Examine the live mode (stdin) event stream |
| 5 | * and repipe it to stdout while optionally injecting additional |
| 6 | * events into it. |
| 7 | */ |
| 8 | #include "builtin.h" |
| 9 | |
| 10 | #include "perf.h" |
| 11 | #include "util/session.h" |
Arnaldo Carvalho de Melo | 45694aa | 2011-11-28 08:30:20 -0200 | [diff] [blame] | 12 | #include "util/tool.h" |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 13 | #include "util/debug.h" |
| 14 | |
| 15 | #include "util/parse-options.h" |
| 16 | |
Arnaldo Carvalho de Melo | 5ded57a | 2012-09-30 19:54:10 -0300 | [diff] [blame] | 17 | struct perf_inject { |
| 18 | struct perf_tool tool; |
| 19 | bool build_ids; |
| 20 | }; |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 21 | |
Irina Tirdea | 1d037ca | 2012-09-11 01:15:03 +0300 | [diff] [blame] | 22 | static int perf_event__repipe_synth(struct perf_tool *tool __maybe_unused, |
Arnaldo Carvalho de Melo | d20deb6 | 2011-11-25 08:19:45 -0200 | [diff] [blame] | 23 | union perf_event *event, |
Irina Tirdea | 1d037ca | 2012-09-11 01:15:03 +0300 | [diff] [blame] | 24 | struct machine *machine __maybe_unused) |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 25 | { |
| 26 | uint32_t size; |
| 27 | void *buf = event; |
| 28 | |
| 29 | size = event->header.size; |
| 30 | |
| 31 | while (size) { |
| 32 | int ret = write(STDOUT_FILENO, buf, size); |
| 33 | if (ret < 0) |
| 34 | return -errno; |
| 35 | |
| 36 | size -= ret; |
| 37 | buf += ret; |
| 38 | } |
| 39 | |
| 40 | return 0; |
| 41 | } |
| 42 | |
Arnaldo Carvalho de Melo | 45694aa | 2011-11-28 08:30:20 -0200 | [diff] [blame] | 43 | static int perf_event__repipe_op2_synth(struct perf_tool *tool, |
Arnaldo Carvalho de Melo | 743eb86 | 2011-11-28 07:56:39 -0200 | [diff] [blame] | 44 | union perf_event *event, |
Irina Tirdea | 1d037ca | 2012-09-11 01:15:03 +0300 | [diff] [blame] | 45 | struct perf_session *session |
| 46 | __maybe_unused) |
Arnaldo Carvalho de Melo | d20deb6 | 2011-11-25 08:19:45 -0200 | [diff] [blame] | 47 | { |
Arnaldo Carvalho de Melo | 45694aa | 2011-11-28 08:30:20 -0200 | [diff] [blame] | 48 | return perf_event__repipe_synth(tool, event, NULL); |
Arnaldo Carvalho de Melo | 743eb86 | 2011-11-28 07:56:39 -0200 | [diff] [blame] | 49 | } |
| 50 | |
Arnaldo Carvalho de Melo | 45694aa | 2011-11-28 08:30:20 -0200 | [diff] [blame] | 51 | static int perf_event__repipe_event_type_synth(struct perf_tool *tool, |
Arnaldo Carvalho de Melo | 743eb86 | 2011-11-28 07:56:39 -0200 | [diff] [blame] | 52 | union perf_event *event) |
| 53 | { |
Arnaldo Carvalho de Melo | 45694aa | 2011-11-28 08:30:20 -0200 | [diff] [blame] | 54 | return perf_event__repipe_synth(tool, event, NULL); |
Arnaldo Carvalho de Melo | 743eb86 | 2011-11-28 07:56:39 -0200 | [diff] [blame] | 55 | } |
| 56 | |
| 57 | static int perf_event__repipe_tracing_data_synth(union perf_event *event, |
Irina Tirdea | 1d037ca | 2012-09-11 01:15:03 +0300 | [diff] [blame] | 58 | struct perf_session *session |
| 59 | __maybe_unused) |
Arnaldo Carvalho de Melo | 743eb86 | 2011-11-28 07:56:39 -0200 | [diff] [blame] | 60 | { |
| 61 | return perf_event__repipe_synth(NULL, event, NULL); |
Arnaldo Carvalho de Melo | d20deb6 | 2011-11-25 08:19:45 -0200 | [diff] [blame] | 62 | } |
| 63 | |
Arnaldo Carvalho de Melo | 10d0f08 | 2011-11-11 22:45:41 -0200 | [diff] [blame] | 64 | static int perf_event__repipe_attr(union perf_event *event, |
Irina Tirdea | 1d037ca | 2012-09-11 01:15:03 +0300 | [diff] [blame] | 65 | struct perf_evlist **pevlist __maybe_unused) |
Arnaldo Carvalho de Melo | 10d0f08 | 2011-11-11 22:45:41 -0200 | [diff] [blame] | 66 | { |
Stephane Eranian | 1a1ed1b | 2012-05-15 13:28:11 +0200 | [diff] [blame] | 67 | int ret; |
| 68 | ret = perf_event__process_attr(event, pevlist); |
| 69 | if (ret) |
| 70 | return ret; |
| 71 | |
Arnaldo Carvalho de Melo | d20deb6 | 2011-11-25 08:19:45 -0200 | [diff] [blame] | 72 | return perf_event__repipe_synth(NULL, event, NULL); |
Arnaldo Carvalho de Melo | 10d0f08 | 2011-11-11 22:45:41 -0200 | [diff] [blame] | 73 | } |
| 74 | |
Arnaldo Carvalho de Melo | 45694aa | 2011-11-28 08:30:20 -0200 | [diff] [blame] | 75 | static int perf_event__repipe(struct perf_tool *tool, |
Arnaldo Carvalho de Melo | d20deb6 | 2011-11-25 08:19:45 -0200 | [diff] [blame] | 76 | union perf_event *event, |
Irina Tirdea | 1d037ca | 2012-09-11 01:15:03 +0300 | [diff] [blame] | 77 | struct perf_sample *sample __maybe_unused, |
Arnaldo Carvalho de Melo | 743eb86 | 2011-11-28 07:56:39 -0200 | [diff] [blame] | 78 | struct machine *machine) |
Arnaldo Carvalho de Melo | 640c03c | 2010-12-02 14:10:21 -0200 | [diff] [blame] | 79 | { |
Arnaldo Carvalho de Melo | 45694aa | 2011-11-28 08:30:20 -0200 | [diff] [blame] | 80 | return perf_event__repipe_synth(tool, event, machine); |
Arnaldo Carvalho de Melo | 640c03c | 2010-12-02 14:10:21 -0200 | [diff] [blame] | 81 | } |
| 82 | |
Arnaldo Carvalho de Melo | 45694aa | 2011-11-28 08:30:20 -0200 | [diff] [blame] | 83 | static int perf_event__repipe_sample(struct perf_tool *tool, |
Arnaldo Carvalho de Melo | d20deb6 | 2011-11-25 08:19:45 -0200 | [diff] [blame] | 84 | union perf_event *event, |
Irina Tirdea | 1d037ca | 2012-09-11 01:15:03 +0300 | [diff] [blame] | 85 | struct perf_sample *sample __maybe_unused, |
| 86 | struct perf_evsel *evsel __maybe_unused, |
Arnaldo Carvalho de Melo | 743eb86 | 2011-11-28 07:56:39 -0200 | [diff] [blame] | 87 | struct machine *machine) |
Arnaldo Carvalho de Melo | 9e69c21 | 2011-03-15 15:44:01 -0300 | [diff] [blame] | 88 | { |
Arnaldo Carvalho de Melo | 45694aa | 2011-11-28 08:30:20 -0200 | [diff] [blame] | 89 | return perf_event__repipe_synth(tool, event, machine); |
Arnaldo Carvalho de Melo | 9e69c21 | 2011-03-15 15:44:01 -0300 | [diff] [blame] | 90 | } |
| 91 | |
Arnaldo Carvalho de Melo | 45694aa | 2011-11-28 08:30:20 -0200 | [diff] [blame] | 92 | static int perf_event__repipe_mmap(struct perf_tool *tool, |
Arnaldo Carvalho de Melo | d20deb6 | 2011-11-25 08:19:45 -0200 | [diff] [blame] | 93 | union perf_event *event, |
Arnaldo Carvalho de Melo | 8115d60 | 2011-01-29 14:01:45 -0200 | [diff] [blame] | 94 | struct perf_sample *sample, |
Arnaldo Carvalho de Melo | 743eb86 | 2011-11-28 07:56:39 -0200 | [diff] [blame] | 95 | struct machine *machine) |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 96 | { |
| 97 | int err; |
| 98 | |
Arnaldo Carvalho de Melo | 45694aa | 2011-11-28 08:30:20 -0200 | [diff] [blame] | 99 | err = perf_event__process_mmap(tool, event, sample, machine); |
| 100 | perf_event__repipe(tool, event, sample, machine); |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 101 | |
| 102 | return err; |
| 103 | } |
| 104 | |
Arnaldo Carvalho de Melo | 45694aa | 2011-11-28 08:30:20 -0200 | [diff] [blame] | 105 | static int perf_event__repipe_task(struct perf_tool *tool, |
Arnaldo Carvalho de Melo | d20deb6 | 2011-11-25 08:19:45 -0200 | [diff] [blame] | 106 | union perf_event *event, |
Arnaldo Carvalho de Melo | 8115d60 | 2011-01-29 14:01:45 -0200 | [diff] [blame] | 107 | struct perf_sample *sample, |
Arnaldo Carvalho de Melo | 743eb86 | 2011-11-28 07:56:39 -0200 | [diff] [blame] | 108 | struct machine *machine) |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 109 | { |
| 110 | int err; |
| 111 | |
Arnaldo Carvalho de Melo | 45694aa | 2011-11-28 08:30:20 -0200 | [diff] [blame] | 112 | err = perf_event__process_task(tool, event, sample, machine); |
| 113 | perf_event__repipe(tool, event, sample, machine); |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 114 | |
| 115 | return err; |
| 116 | } |
| 117 | |
Arnaldo Carvalho de Melo | 8115d60 | 2011-01-29 14:01:45 -0200 | [diff] [blame] | 118 | static int perf_event__repipe_tracing_data(union perf_event *event, |
| 119 | struct perf_session *session) |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 120 | { |
| 121 | int err; |
| 122 | |
Arnaldo Carvalho de Melo | 743eb86 | 2011-11-28 07:56:39 -0200 | [diff] [blame] | 123 | perf_event__repipe_synth(NULL, event, NULL); |
Arnaldo Carvalho de Melo | 8115d60 | 2011-01-29 14:01:45 -0200 | [diff] [blame] | 124 | err = perf_event__process_tracing_data(event, session); |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 125 | |
| 126 | return err; |
| 127 | } |
| 128 | |
Arnaldo Carvalho de Melo | 090f720 | 2010-05-02 19:46:36 -0300 | [diff] [blame] | 129 | static int dso__read_build_id(struct dso *self) |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 130 | { |
Arnaldo Carvalho de Melo | 090f720 | 2010-05-02 19:46:36 -0300 | [diff] [blame] | 131 | if (self->has_build_id) |
| 132 | return 0; |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 133 | |
Arnaldo Carvalho de Melo | 090f720 | 2010-05-02 19:46:36 -0300 | [diff] [blame] | 134 | if (filename__read_build_id(self->long_name, self->build_id, |
| 135 | sizeof(self->build_id)) > 0) { |
| 136 | self->has_build_id = true; |
| 137 | return 0; |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 138 | } |
| 139 | |
Arnaldo Carvalho de Melo | 090f720 | 2010-05-02 19:46:36 -0300 | [diff] [blame] | 140 | return -1; |
| 141 | } |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 142 | |
Arnaldo Carvalho de Melo | 45694aa | 2011-11-28 08:30:20 -0200 | [diff] [blame] | 143 | static int dso__inject_build_id(struct dso *self, struct perf_tool *tool, |
Arnaldo Carvalho de Melo | 743eb86 | 2011-11-28 07:56:39 -0200 | [diff] [blame] | 144 | struct machine *machine) |
Arnaldo Carvalho de Melo | 090f720 | 2010-05-02 19:46:36 -0300 | [diff] [blame] | 145 | { |
| 146 | u16 misc = PERF_RECORD_MISC_USER; |
Arnaldo Carvalho de Melo | 090f720 | 2010-05-02 19:46:36 -0300 | [diff] [blame] | 147 | int err; |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 148 | |
Arnaldo Carvalho de Melo | 090f720 | 2010-05-02 19:46:36 -0300 | [diff] [blame] | 149 | if (dso__read_build_id(self) < 0) { |
| 150 | pr_debug("no build_id found for %s\n", self->long_name); |
| 151 | return -1; |
| 152 | } |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 153 | |
Arnaldo Carvalho de Melo | 090f720 | 2010-05-02 19:46:36 -0300 | [diff] [blame] | 154 | if (self->kernel) |
| 155 | misc = PERF_RECORD_MISC_KERNEL; |
| 156 | |
Arnaldo Carvalho de Melo | 45694aa | 2011-11-28 08:30:20 -0200 | [diff] [blame] | 157 | err = perf_event__synthesize_build_id(tool, self, misc, perf_event__repipe, |
Arnaldo Carvalho de Melo | 743eb86 | 2011-11-28 07:56:39 -0200 | [diff] [blame] | 158 | machine); |
Arnaldo Carvalho de Melo | 090f720 | 2010-05-02 19:46:36 -0300 | [diff] [blame] | 159 | if (err) { |
| 160 | pr_err("Can't synthesize build_id event for %s\n", self->long_name); |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 161 | return -1; |
| 162 | } |
| 163 | |
| 164 | return 0; |
| 165 | } |
| 166 | |
Arnaldo Carvalho de Melo | 45694aa | 2011-11-28 08:30:20 -0200 | [diff] [blame] | 167 | static int perf_event__inject_buildid(struct perf_tool *tool, |
Arnaldo Carvalho de Melo | d20deb6 | 2011-11-25 08:19:45 -0200 | [diff] [blame] | 168 | union perf_event *event, |
Arnaldo Carvalho de Melo | 8115d60 | 2011-01-29 14:01:45 -0200 | [diff] [blame] | 169 | struct perf_sample *sample, |
Irina Tirdea | 1d037ca | 2012-09-11 01:15:03 +0300 | [diff] [blame] | 170 | struct perf_evsel *evsel __maybe_unused, |
Arnaldo Carvalho de Melo | 743eb86 | 2011-11-28 07:56:39 -0200 | [diff] [blame] | 171 | struct machine *machine) |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 172 | { |
| 173 | struct addr_location al; |
| 174 | struct thread *thread; |
| 175 | u8 cpumode; |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 176 | |
| 177 | cpumode = event->header.misc & PERF_RECORD_MISC_CPUMODE_MASK; |
| 178 | |
Arnaldo Carvalho de Melo | 743eb86 | 2011-11-28 07:56:39 -0200 | [diff] [blame] | 179 | thread = machine__findnew_thread(machine, event->ip.pid); |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 180 | if (thread == NULL) { |
| 181 | pr_err("problem processing %d event, skipping it.\n", |
| 182 | event->header.type); |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 183 | goto repipe; |
| 184 | } |
| 185 | |
Arnaldo Carvalho de Melo | 743eb86 | 2011-11-28 07:56:39 -0200 | [diff] [blame] | 186 | thread__find_addr_map(thread, machine, cpumode, MAP__FUNCTION, |
| 187 | event->ip.ip, &al); |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 188 | |
| 189 | if (al.map != NULL) { |
| 190 | if (!al.map->dso->hit) { |
| 191 | al.map->dso->hit = 1; |
Arnaldo Carvalho de Melo | 090f720 | 2010-05-02 19:46:36 -0300 | [diff] [blame] | 192 | if (map__load(al.map, NULL) >= 0) { |
Arnaldo Carvalho de Melo | 45694aa | 2011-11-28 08:30:20 -0200 | [diff] [blame] | 193 | dso__inject_build_id(al.map->dso, tool, machine); |
Arnaldo Carvalho de Melo | 090f720 | 2010-05-02 19:46:36 -0300 | [diff] [blame] | 194 | /* |
| 195 | * If this fails, too bad, let the other side |
| 196 | * account this as unresolved. |
| 197 | */ |
Namhyung Kim | 393be2e | 2012-08-06 13:41:21 +0900 | [diff] [blame] | 198 | } else { |
Namhyung Kim | 29a0fc9 | 2012-09-28 18:31:59 +0900 | [diff] [blame] | 199 | #ifdef LIBELF_SUPPORT |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 200 | pr_warning("no symbols found in %s, maybe " |
| 201 | "install a debug package?\n", |
| 202 | al.map->dso->long_name); |
Namhyung Kim | 393be2e | 2012-08-06 13:41:21 +0900 | [diff] [blame] | 203 | #endif |
| 204 | } |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 205 | } |
| 206 | } |
| 207 | |
| 208 | repipe: |
Arnaldo Carvalho de Melo | 45694aa | 2011-11-28 08:30:20 -0200 | [diff] [blame] | 209 | perf_event__repipe(tool, event, sample, machine); |
Arnaldo Carvalho de Melo | 090f720 | 2010-05-02 19:46:36 -0300 | [diff] [blame] | 210 | return 0; |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 211 | } |
| 212 | |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 213 | extern volatile int session_done; |
| 214 | |
Irina Tirdea | 1d037ca | 2012-09-11 01:15:03 +0300 | [diff] [blame] | 215 | static void sig_handler(int sig __maybe_unused) |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 216 | { |
| 217 | session_done = 1; |
| 218 | } |
| 219 | |
Arnaldo Carvalho de Melo | 5ded57a | 2012-09-30 19:54:10 -0300 | [diff] [blame] | 220 | static int __cmd_inject(struct perf_inject *inject) |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 221 | { |
| 222 | struct perf_session *session; |
| 223 | int ret = -EINVAL; |
| 224 | |
| 225 | signal(SIGINT, sig_handler); |
| 226 | |
Arnaldo Carvalho de Melo | 5ded57a | 2012-09-30 19:54:10 -0300 | [diff] [blame] | 227 | if (inject->build_ids) { |
| 228 | inject->tool.sample = perf_event__inject_buildid; |
| 229 | inject->tool.mmap = perf_event__repipe_mmap; |
| 230 | inject->tool.fork = perf_event__repipe_task; |
| 231 | inject->tool.tracing_data = perf_event__repipe_tracing_data; |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 232 | } |
| 233 | |
Arnaldo Carvalho de Melo | 5ded57a | 2012-09-30 19:54:10 -0300 | [diff] [blame] | 234 | session = perf_session__new("-", O_RDONLY, false, true, &inject->tool); |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 235 | if (session == NULL) |
| 236 | return -ENOMEM; |
| 237 | |
Arnaldo Carvalho de Melo | 5ded57a | 2012-09-30 19:54:10 -0300 | [diff] [blame] | 238 | ret = perf_session__process_events(session, &inject->tool); |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 239 | |
| 240 | perf_session__delete(session); |
| 241 | |
| 242 | return ret; |
| 243 | } |
| 244 | |
Irina Tirdea | 1d037ca | 2012-09-11 01:15:03 +0300 | [diff] [blame] | 245 | int cmd_inject(int argc, const char **argv, const char *prefix __maybe_unused) |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 246 | { |
Arnaldo Carvalho de Melo | 5ded57a | 2012-09-30 19:54:10 -0300 | [diff] [blame] | 247 | struct perf_inject inject = { |
| 248 | .tool = { |
| 249 | .sample = perf_event__repipe_sample, |
| 250 | .mmap = perf_event__repipe, |
| 251 | .comm = perf_event__repipe, |
| 252 | .fork = perf_event__repipe, |
| 253 | .exit = perf_event__repipe, |
| 254 | .lost = perf_event__repipe, |
| 255 | .read = perf_event__repipe_sample, |
| 256 | .throttle = perf_event__repipe, |
| 257 | .unthrottle = perf_event__repipe, |
| 258 | .attr = perf_event__repipe_attr, |
| 259 | .event_type = perf_event__repipe_event_type_synth, |
| 260 | .tracing_data = perf_event__repipe_tracing_data_synth, |
| 261 | .build_id = perf_event__repipe_op2_synth, |
| 262 | }, |
| 263 | }; |
| 264 | const struct option options[] = { |
| 265 | OPT_BOOLEAN('b', "build-ids", &inject.build_ids, |
| 266 | "Inject build-ids into the output stream"), |
| 267 | OPT_INCR('v', "verbose", &verbose, |
| 268 | "be more verbose (show build ids, etc)"), |
| 269 | OPT_END() |
| 270 | }; |
Arnaldo Carvalho de Melo | 002439e | 2012-10-01 15:20:58 -0300 | [diff] [blame^] | 271 | const char * const inject_usage[] = { |
| 272 | "perf inject [<options>]", |
| 273 | NULL |
| 274 | }; |
Arnaldo Carvalho de Melo | 5ded57a | 2012-09-30 19:54:10 -0300 | [diff] [blame] | 275 | |
Arnaldo Carvalho de Melo | 002439e | 2012-10-01 15:20:58 -0300 | [diff] [blame^] | 276 | argc = parse_options(argc, argv, options, inject_usage, 0); |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 277 | |
| 278 | /* |
| 279 | * Any (unrecognized) arguments left? |
| 280 | */ |
| 281 | if (argc) |
Arnaldo Carvalho de Melo | 002439e | 2012-10-01 15:20:58 -0300 | [diff] [blame^] | 282 | usage_with_options(inject_usage, options); |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 283 | |
| 284 | if (symbol__init() < 0) |
| 285 | return -1; |
| 286 | |
Arnaldo Carvalho de Melo | 5ded57a | 2012-09-30 19:54:10 -0300 | [diff] [blame] | 287 | return __cmd_inject(&inject); |
Tom Zanussi | 454c407 | 2010-05-01 01:41:20 -0500 | [diff] [blame] | 288 | } |