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()
124 return ret; in test_gen_synth_cmd()
143 int ret; in test_empty_synth_event() local
156 ret = synth_event_gen_cmd_start(&cmd, "empty_synth_test", THIS_MODULE); in test_empty_synth_event()
157 if (ret) in test_empty_synth_event()
162 ret = synth_event_add_field(&cmd, "pid_t", "next_pid_field"); in test_empty_synth_event()
163 if (ret) in test_empty_synth_event()
166 ret = synth_event_add_field(&cmd, "char[16]", "next_comm_field"); in test_empty_synth_event()
167 if (ret) in test_empty_synth_event()
170 ret = synth_event_add_field(&cmd, "u64", "ts_ns"); in test_empty_synth_event()
171 if (ret) in test_empty_synth_event()
174 ret = synth_event_add_field(&cmd, "u64", "ts_ms"); in test_empty_synth_event()
175 if (ret) in test_empty_synth_event()
178 ret = synth_event_add_field(&cmd, "unsigned int", "cpu"); in test_empty_synth_event()
179 if (ret) in test_empty_synth_event()
182 ret = synth_event_add_field(&cmd, "char[64]", "my_string_field"); in test_empty_synth_event()
183 if (ret) in test_empty_synth_event()
186 ret = synth_event_add_field(&cmd, "int", "my_int_field"); in test_empty_synth_event()
187 if (ret) in test_empty_synth_event()
192 ret = synth_event_gen_cmd_end(&cmd); in test_empty_synth_event()
193 if (ret) in test_empty_synth_event()
206 ret = PTR_ERR(empty_synth_test); in test_empty_synth_event()
211 ret = trace_array_set_clr_event(empty_synth_test->tr, in test_empty_synth_event()
213 if (ret) { in test_empty_synth_event()
229 ret = synth_event_trace_array(empty_synth_test, vals, ARRAY_SIZE(vals)); in test_empty_synth_event()
231 return ret; in test_empty_synth_event()
260 int ret; in test_create_synth_event() local
263 ret = synth_event_create("create_synth_test", in test_create_synth_event()
267 if (ret) in test_create_synth_event()
280 ret = PTR_ERR(create_synth_test); in test_create_synth_event()
285 ret = trace_array_set_clr_event(create_synth_test->tr, in test_create_synth_event()
287 if (ret) { in test_create_synth_event()
305 ret = synth_event_trace_array(create_synth_test, vals, ARRAY_SIZE(vals)); in test_create_synth_event()
307 return ret; in test_create_synth_event()
322 int ret; in test_add_next_synth_val() local
325 ret = synth_event_trace_start(gen_synth_test, &trace_state); in test_add_next_synth_val()
326 if (ret) in test_add_next_synth_val()
327 return ret; in test_add_next_synth_val()
332 ret = synth_event_add_next_val(777, &trace_state); in test_add_next_synth_val()
333 if (ret) in test_add_next_synth_val()
337 ret = synth_event_add_next_val((u64)(long)"slinky", &trace_state); in test_add_next_synth_val()
338 if (ret) in test_add_next_synth_val()
342 ret = synth_event_add_next_val(1000000, &trace_state); in test_add_next_synth_val()
343 if (ret) in test_add_next_synth_val()
347 ret = synth_event_add_next_val(1000, &trace_state); in test_add_next_synth_val()
348 if (ret) in test_add_next_synth_val()
352 ret = synth_event_add_next_val(raw_smp_processor_id(), &trace_state); in test_add_next_synth_val()
353 if (ret) in test_add_next_synth_val()
357 ret = synth_event_add_next_val((u64)(long)"thneed_2.01", &trace_state); in test_add_next_synth_val()
358 if (ret) in test_add_next_synth_val()
362 ret = synth_event_add_next_val(395, &trace_state); in test_add_next_synth_val()
365 ret = synth_event_trace_end(&trace_state); in test_add_next_synth_val()
367 return ret; in test_add_next_synth_val()
378 int ret; in test_add_synth_val() local
381 ret = synth_event_trace_start(gen_synth_test, &trace_state); in test_add_synth_val()
382 if (ret) in test_add_synth_val()
383 return ret; in test_add_synth_val()
387 ret = synth_event_add_val("ts_ns", 1000000, &trace_state); in test_add_synth_val()
388 if (ret) in test_add_synth_val()
391 ret = synth_event_add_val("ts_ms", 1000, &trace_state); in test_add_synth_val()
392 if (ret) in test_add_synth_val()
395 ret = synth_event_add_val("cpu", raw_smp_processor_id(), &trace_state); in test_add_synth_val()
396 if (ret) in test_add_synth_val()
399 ret = synth_event_add_val("next_pid_field", 777, &trace_state); in test_add_synth_val()
400 if (ret) in test_add_synth_val()
403 ret = synth_event_add_val("next_comm_field", (u64)(long)"silly putty", in test_add_synth_val()
405 if (ret) in test_add_synth_val()
408 ret = synth_event_add_val("my_string_field", (u64)(long)"thneed_9", in test_add_synth_val()
410 if (ret) in test_add_synth_val()
413 ret = synth_event_add_val("my_int_field", 3999, &trace_state); in test_add_synth_val()
416 ret = synth_event_trace_end(&trace_state); in test_add_synth_val()
418 return ret; in test_add_synth_val()
426 int ret; in test_trace_synth_event() local
429 ret = synth_event_trace(create_synth_test, 9, /* number of values */ in test_trace_synth_event()
439 return ret; in test_trace_synth_event()
444 int ret; in synth_event_gen_test_init() local
446 ret = test_gen_synth_cmd(); in synth_event_gen_test_init()
447 if (ret) in synth_event_gen_test_init()
448 return ret; in synth_event_gen_test_init()
450 ret = test_empty_synth_event(); in synth_event_gen_test_init()
451 if (ret) { in synth_event_gen_test_init()
460 ret = test_create_synth_event(); in synth_event_gen_test_init()
461 if (ret) { in synth_event_gen_test_init()
476 ret = test_add_next_synth_val(); in synth_event_gen_test_init()
477 WARN_ON(ret); in synth_event_gen_test_init()
479 ret = test_add_synth_val(); in synth_event_gen_test_init()
480 WARN_ON(ret); in synth_event_gen_test_init()
482 ret = test_trace_synth_event(); in synth_event_gen_test_init()
483 WARN_ON(ret); in synth_event_gen_test_init()
485 return ret; in synth_event_gen_test_init()