Lines Matching refs:ret

50 	int ret;  in test_gen_synth_cmd()  local
64 ret = synth_event_gen_cmd_start(&cmd, "gen_synth_test", THIS_MODULE, in test_gen_synth_cmd()
69 if (ret) in test_gen_synth_cmd()
74 ret = synth_event_add_field(&cmd, "unsigned int", "cpu"); in test_gen_synth_cmd()
75 if (ret) in test_gen_synth_cmd()
78 ret = synth_event_add_field(&cmd, "char[64]", "my_string_field"); in test_gen_synth_cmd()
79 if (ret) in test_gen_synth_cmd()
82 ret = synth_event_add_field(&cmd, "int", "my_int_field"); in test_gen_synth_cmd()
83 if (ret) in test_gen_synth_cmd()
86 ret = synth_event_gen_cmd_end(&cmd); in test_gen_synth_cmd()
87 if (ret) in test_gen_synth_cmd()
99 ret = PTR_ERR(gen_synth_test); in test_gen_synth_cmd()
104 ret = trace_array_set_clr_event(gen_synth_test->tr, in test_gen_synth_cmd()
106 if (ret) { in test_gen_synth_cmd()
122 ret = synth_event_trace_array(gen_synth_test, vals, ARRAY_SIZE(vals)); in test_gen_synth_cmd()
125 return ret; in test_gen_synth_cmd()
141 int ret; in test_empty_synth_event() local
154 ret = synth_event_gen_cmd_start(&cmd, "empty_synth_test", THIS_MODULE); in test_empty_synth_event()
155 if (ret) in test_empty_synth_event()
160 ret = synth_event_add_field(&cmd, "pid_t", "next_pid_field"); in test_empty_synth_event()
161 if (ret) in test_empty_synth_event()
164 ret = synth_event_add_field(&cmd, "char[16]", "next_comm_field"); in test_empty_synth_event()
165 if (ret) in test_empty_synth_event()
168 ret = synth_event_add_field(&cmd, "u64", "ts_ns"); in test_empty_synth_event()
169 if (ret) in test_empty_synth_event()
172 ret = synth_event_add_field(&cmd, "u64", "ts_ms"); in test_empty_synth_event()
173 if (ret) in test_empty_synth_event()
176 ret = synth_event_add_field(&cmd, "unsigned int", "cpu"); in test_empty_synth_event()
177 if (ret) in test_empty_synth_event()
180 ret = synth_event_add_field(&cmd, "char[64]", "my_string_field"); in test_empty_synth_event()
181 if (ret) in test_empty_synth_event()
184 ret = synth_event_add_field(&cmd, "int", "my_int_field"); in test_empty_synth_event()
185 if (ret) in test_empty_synth_event()
190 ret = synth_event_gen_cmd_end(&cmd); in test_empty_synth_event()
191 if (ret) in test_empty_synth_event()
204 ret = PTR_ERR(empty_synth_test); in test_empty_synth_event()
209 ret = trace_array_set_clr_event(empty_synth_test->tr, in test_empty_synth_event()
211 if (ret) { in test_empty_synth_event()
227 ret = synth_event_trace_array(empty_synth_test, vals, ARRAY_SIZE(vals)); in test_empty_synth_event()
230 return ret; in test_empty_synth_event()
256 int ret; in test_create_synth_event() local
259 ret = synth_event_create("create_synth_test", in test_create_synth_event()
263 if (ret) in test_create_synth_event()
276 ret = PTR_ERR(create_synth_test); in test_create_synth_event()
281 ret = trace_array_set_clr_event(create_synth_test->tr, in test_create_synth_event()
283 if (ret) { in test_create_synth_event()
301 ret = synth_event_trace_array(create_synth_test, vals, ARRAY_SIZE(vals)); in test_create_synth_event()
303 return ret; in test_create_synth_event()
318 int ret; in test_add_next_synth_val() local
321 ret = synth_event_trace_start(gen_synth_test, &trace_state); in test_add_next_synth_val()
322 if (ret) in test_add_next_synth_val()
323 return ret; in test_add_next_synth_val()
328 ret = synth_event_add_next_val(777, &trace_state); in test_add_next_synth_val()
329 if (ret) in test_add_next_synth_val()
333 ret = synth_event_add_next_val((u64)(long)"slinky", &trace_state); in test_add_next_synth_val()
334 if (ret) in test_add_next_synth_val()
338 ret = synth_event_add_next_val(1000000, &trace_state); in test_add_next_synth_val()
339 if (ret) in test_add_next_synth_val()
343 ret = synth_event_add_next_val(1000, &trace_state); in test_add_next_synth_val()
344 if (ret) in test_add_next_synth_val()
348 ret = synth_event_add_next_val(raw_smp_processor_id(), &trace_state); in test_add_next_synth_val()
349 if (ret) in test_add_next_synth_val()
353 ret = synth_event_add_next_val((u64)(long)"thneed_2.01", &trace_state); in test_add_next_synth_val()
354 if (ret) in test_add_next_synth_val()
358 ret = synth_event_add_next_val(395, &trace_state); in test_add_next_synth_val()
361 ret = synth_event_trace_end(&trace_state); in test_add_next_synth_val()
363 return ret; in test_add_next_synth_val()
374 int ret; in test_add_synth_val() local
377 ret = synth_event_trace_start(gen_synth_test, &trace_state); in test_add_synth_val()
378 if (ret) in test_add_synth_val()
379 return ret; in test_add_synth_val()
383 ret = synth_event_add_val("ts_ns", 1000000, &trace_state); in test_add_synth_val()
384 if (ret) in test_add_synth_val()
387 ret = synth_event_add_val("ts_ms", 1000, &trace_state); in test_add_synth_val()
388 if (ret) in test_add_synth_val()
391 ret = synth_event_add_val("cpu", raw_smp_processor_id(), &trace_state); in test_add_synth_val()
392 if (ret) in test_add_synth_val()
395 ret = synth_event_add_val("next_pid_field", 777, &trace_state); in test_add_synth_val()
396 if (ret) in test_add_synth_val()
399 ret = synth_event_add_val("next_comm_field", (u64)(long)"silly putty", in test_add_synth_val()
401 if (ret) in test_add_synth_val()
404 ret = synth_event_add_val("my_string_field", (u64)(long)"thneed_9", in test_add_synth_val()
406 if (ret) in test_add_synth_val()
409 ret = synth_event_add_val("my_int_field", 3999, &trace_state); in test_add_synth_val()
412 ret = synth_event_trace_end(&trace_state); in test_add_synth_val()
414 return ret; in test_add_synth_val()
422 int ret; in test_trace_synth_event() local
425 ret = synth_event_trace(create_synth_test, 9, /* number of values */ in test_trace_synth_event()
435 return ret; in test_trace_synth_event()
440 int ret; in synth_event_gen_test_init() local
442 ret = test_gen_synth_cmd(); in synth_event_gen_test_init()
443 if (ret) in synth_event_gen_test_init()
444 return ret; in synth_event_gen_test_init()
446 ret = test_empty_synth_event(); in synth_event_gen_test_init()
447 if (ret) { in synth_event_gen_test_init()
456 ret = test_create_synth_event(); in synth_event_gen_test_init()
457 if (ret) { in synth_event_gen_test_init()
472 ret = test_add_next_synth_val(); in synth_event_gen_test_init()
473 WARN_ON(ret); in synth_event_gen_test_init()
475 ret = test_add_synth_val(); in synth_event_gen_test_init()
476 WARN_ON(ret); in synth_event_gen_test_init()
478 ret = test_trace_synth_event(); in synth_event_gen_test_init()
479 WARN_ON(ret); in synth_event_gen_test_init()
492 return ret; in synth_event_gen_test_init()