• Home
  • Raw
  • Download

Lines Matching refs:attrs

557 	struct hist_trigger_attrs	*attrs;  member
875 if (hist_data->attrs->ts_in_usecs && trace_clock_in_ns(tr)) in hist_field_timestamp()
1414 static void destroy_hist_trigger_attrs(struct hist_trigger_attrs *attrs) in destroy_hist_trigger_attrs() argument
1418 if (!attrs) in destroy_hist_trigger_attrs()
1421 for (i = 0; i < attrs->n_assignments; i++) in destroy_hist_trigger_attrs()
1422 kfree(attrs->assignment_str[i]); in destroy_hist_trigger_attrs()
1424 for (i = 0; i < attrs->n_actions; i++) in destroy_hist_trigger_attrs()
1425 kfree(attrs->action_str[i]); in destroy_hist_trigger_attrs()
1427 kfree(attrs->name); in destroy_hist_trigger_attrs()
1428 kfree(attrs->sort_key_str); in destroy_hist_trigger_attrs()
1429 kfree(attrs->keys_str); in destroy_hist_trigger_attrs()
1430 kfree(attrs->vals_str); in destroy_hist_trigger_attrs()
1431 kfree(attrs->clock); in destroy_hist_trigger_attrs()
1432 kfree(attrs); in destroy_hist_trigger_attrs()
1435 static int parse_action(char *str, struct hist_trigger_attrs *attrs) in parse_action() argument
1439 if (attrs->n_actions >= HIST_ACTIONS_MAX) in parse_action()
1445 attrs->action_str[attrs->n_actions] = kstrdup(str, GFP_KERNEL); in parse_action()
1446 if (!attrs->action_str[attrs->n_actions]) { in parse_action()
1450 attrs->n_actions++; in parse_action()
1457 char *str, struct hist_trigger_attrs *attrs) in parse_assignment() argument
1463 attrs->keys_str = kstrdup(str + len, GFP_KERNEL); in parse_assignment()
1464 if (!attrs->keys_str) { in parse_assignment()
1471 attrs->vals_str = kstrdup(str + len, GFP_KERNEL); in parse_assignment()
1472 if (!attrs->vals_str) { in parse_assignment()
1477 attrs->sort_key_str = kstrdup(str + len, GFP_KERNEL); in parse_assignment()
1478 if (!attrs->sort_key_str) { in parse_assignment()
1483 attrs->name = kstrdup(str, GFP_KERNEL); in parse_assignment()
1484 if (!attrs->name) { in parse_assignment()
1492 attrs->clock = kstrdup(str, GFP_KERNEL); in parse_assignment()
1493 if (!attrs->clock) { in parse_assignment()
1504 attrs->map_bits = map_bits; in parse_assignment()
1508 if (attrs->n_assignments == TRACING_MAP_VARS_MAX) { in parse_assignment()
1520 attrs->assignment_str[attrs->n_assignments++] = assignment; in parse_assignment()
1529 struct hist_trigger_attrs *attrs; in parse_hist_trigger_attrs() local
1532 attrs = kzalloc(sizeof(*attrs), GFP_KERNEL); in parse_hist_trigger_attrs()
1533 if (!attrs) in parse_hist_trigger_attrs()
1547 ret = parse_assignment(tr, str, attrs); in parse_hist_trigger_attrs()
1551 attrs->pause = true; in parse_hist_trigger_attrs()
1554 attrs->cont = true; in parse_hist_trigger_attrs()
1556 attrs->clear = true; in parse_hist_trigger_attrs()
1558 ret = parse_action(str, attrs); in parse_hist_trigger_attrs()
1564 if (!attrs->keys_str) { in parse_hist_trigger_attrs()
1569 if (!attrs->clock) { in parse_hist_trigger_attrs()
1570 attrs->clock = kstrdup("global", GFP_KERNEL); in parse_hist_trigger_attrs()
1571 if (!attrs->clock) { in parse_hist_trigger_attrs()
1577 return attrs; in parse_hist_trigger_attrs()
1579 destroy_hist_trigger_attrs(attrs); in parse_hist_trigger_attrs()
2214 for (i = 0; i < hist_data->attrs->var_defs.n_vars; i++) { in field_name_from_var()
2215 name = hist_data->attrs->var_defs.name[i]; in field_name_from_var()
2218 field = hist_data->attrs->var_defs.expr[i]; in field_name_from_var()
2345 hist_data->attrs->ts_in_usecs = true; in parse_field()
4382 fields_str = hist_data->attrs->vals_str; in create_val_fields()
4476 fields_str = hist_data->attrs->keys_str; in create_key_fields()
4505 unsigned int n_vars = hist_data->attrs->var_defs.n_vars; in create_var_fields()
4508 char *var_name = hist_data->attrs->var_defs.name[i]; in create_var_fields()
4509 char *expr = hist_data->attrs->var_defs.expr[i]; in create_var_fields()
4523 for (i = 0; i < hist_data->attrs->var_defs.n_vars; i++) { in free_var_defs()
4524 kfree(hist_data->attrs->var_defs.name[i]); in free_var_defs()
4525 kfree(hist_data->attrs->var_defs.expr[i]); in free_var_defs()
4528 hist_data->attrs->var_defs.n_vars = 0; in free_var_defs()
4538 for (i = 0; i < hist_data->attrs->n_assignments; i++) { in parse_var_defs()
4539 str = hist_data->attrs->assignment_str[i]; in parse_var_defs()
4564 hist_data->attrs->var_defs.name[n_vars] = s; in parse_var_defs()
4568 kfree(hist_data->attrs->var_defs.name[n_vars]); in parse_var_defs()
4569 hist_data->attrs->var_defs.name[n_vars] = NULL; in parse_var_defs()
4573 hist_data->attrs->var_defs.expr[n_vars++] = s; in parse_var_defs()
4575 hist_data->attrs->var_defs.n_vars = n_vars; in parse_var_defs()
4630 char *fields_str = hist_data->attrs->sort_key_str; in create_sort_keys()
4740 for (i = 0; i < hist_data->attrs->n_actions; i++) { in parse_actions()
4741 str = hist_data->attrs->action_str[i]; in parse_actions()
4786 for (i = 0; i < hist_data->attrs->n_actions; i++) { in create_actions()
4967 destroy_hist_trigger_attrs(hist_data->attrs); in destroy_hist_data()
5025 struct hist_trigger_attrs *attrs, in create_hist_data() argument
5037 hist_data->attrs = attrs; in create_hist_data()
5069 hist_data->attrs = NULL; in create_hist_data()
5954 seq_printf(m, ":clock=%s", hist_data->attrs->clock); in event_hist_trigger_print()
5975 if (!data->ref && hist_data->attrs->name) in event_hist_trigger_init()
5976 save_named_trigger(hist_data->attrs->name, data); in event_hist_trigger_init()
6179 if (!hist_data->attrs->pause && !hist_data->attrs->cont && in existing_hist_update_only()
6180 !hist_data->attrs->clear) in existing_hist_update_only()
6183 if (hist_data->attrs->name) { in existing_hist_update_only()
6184 named_data = find_named_trigger(hist_data->attrs->name); in existing_hist_update_only()
6192 if (hist_data->attrs->name && !named_data) in existing_hist_update_only()
6199 if (hist_data->attrs->pause) in existing_hist_update_only()
6201 else if (hist_data->attrs->cont) in existing_hist_update_only()
6203 else if (hist_data->attrs->clear) in existing_hist_update_only()
6222 if (hist_data->attrs->name) { in hist_register_trigger()
6223 named_data = find_named_trigger(hist_data->attrs->name); in hist_register_trigger()
6227 hist_err(tr, HIST_ERR_NAMED_MISMATCH, errpos(hist_data->attrs->name)); in hist_register_trigger()
6234 if (hist_data->attrs->name && !named_data) in hist_register_trigger()
6249 if (hist_data->attrs->cont || hist_data->attrs->clear) { in hist_register_trigger()
6255 if (hist_data->attrs->pause) in hist_register_trigger()
6271 char *clock = hist_data->attrs->clock; in hist_register_trigger()
6273 ret = tracing_set_clock(file->tr, hist_data->attrs->clock); in hist_register_trigger()
6315 if (hist_data->attrs->name) in have_hist_trigger_match()
6316 named_data = find_named_trigger(hist_data->attrs->name); in have_hist_trigger_match()
6338 if (hist_data->attrs->name) in hist_trigger_check_refs()
6339 named_data = find_named_trigger(hist_data->attrs->name); in hist_trigger_check_refs()
6364 if (hist_data->attrs->name) in hist_unregister_trigger()
6365 named_data = find_named_trigger(hist_data->attrs->name); in hist_unregister_trigger()
6445 struct hist_trigger_attrs *attrs; in event_hist_trigger_parse() local
6510 attrs = parse_hist_trigger_attrs(file->tr, param); in event_hist_trigger_parse()
6511 if (IS_ERR(attrs)) in event_hist_trigger_parse()
6512 return PTR_ERR(attrs); in event_hist_trigger_parse()
6514 if (attrs->map_bits) in event_hist_trigger_parse()
6515 hist_trigger_bits = attrs->map_bits; in event_hist_trigger_parse()
6517 hist_data = create_hist_data(hist_trigger_bits, attrs, file, remove); in event_hist_trigger_parse()
6519 destroy_hist_trigger_attrs(attrs); in event_hist_trigger_parse()