| /tools/testing/selftests/bpf/prog_tests/ |
| A D | xdp_flowtable.c | 67 struct nstoken *tok = NULL; in test_xdp_flowtable() local 81 tok = open_netns(RX_NETNS_NAME); in test_xdp_flowtable() 82 if (!ASSERT_OK_PTR(tok, "setns")) in test_xdp_flowtable() 115 close_netns(tok); in test_xdp_flowtable() 116 tok = open_netns(TX_NETNS_NAME); in test_xdp_flowtable() 125 close_netns(tok); in test_xdp_flowtable() 126 tok = open_netns(RX_NETNS_NAME); in test_xdp_flowtable() 143 close_netns(tok); in test_xdp_flowtable() 151 close_netns(tok); in test_xdp_flowtable() 164 if (tok) in test_xdp_flowtable() [all …]
|
| A D | xdp_metadata.c | 339 close_netns(*tok); in switch_ns_to_rx() 345 close_netns(*tok); in switch_ns_to_tx() 389 switch_ns_to_rx(&tok); in test_xdp_metadata() 459 switch_ns_to_tx(&tok); in test_xdp_metadata() 473 switch_ns_to_rx(&tok); in test_xdp_metadata() 482 switch_ns_to_tx(&tok); in test_xdp_metadata() 491 switch_ns_to_rx(&tok); in test_xdp_metadata() 516 switch_ns_to_tx(&tok); in test_xdp_metadata() 525 switch_ns_to_rx(&tok); in test_xdp_metadata() 541 if (tok) in test_xdp_metadata() [all …]
|
| A D | xdp_dev_bound_only.c | 27 struct nstoken *tok = NULL; in test_xdp_dev_bound_only_offdev() local 33 tok = open_netns(LOCAL_NETNS); in test_xdp_dev_bound_only_offdev() 34 if (!ASSERT_OK_PTR(tok, "open_netns")) in test_xdp_dev_bound_only_offdev() 56 close_netns(tok); in test_xdp_dev_bound_only_offdev()
|
| A D | empty_skb.c | 11 struct nstoken *tok = NULL; in test_empty_skb() local 96 tok = open_netns("empty_skb"); in test_empty_skb() 97 if (!ASSERT_OK_PTR(tok, "setns")) in test_empty_skb() 148 if (tok) in test_empty_skb() 149 close_netns(tok); in test_empty_skb()
|
| A D | assign_reuse.c | 176 struct nstoken *tok = NULL; in test_assign_reuse() local 181 tok = open_netns(NS_TEST); in test_assign_reuse() 182 if (!ASSERT_OK_PTR(tok, "netns token")) in test_assign_reuse() 195 close_netns(tok); in test_assign_reuse()
|
| A D | sock_addr.c | 2554 static int setup_test_env(struct nstoken **tok) in setup_test_env() argument 2560 *tok = open_netns(TEST_NS); in setup_test_env() 2561 if (!ASSERT_OK_PTR(*tok, "netns token")) in setup_test_env() 2576 close_netns(*tok); in setup_test_env() 2577 *tok = NULL; in setup_test_env() 2583 static void cleanup_test_env(struct nstoken *tok) in cleanup_test_env() argument 2585 close_netns(tok); in cleanup_test_env() 2591 struct nstoken *tok = NULL; in test_sock_addr() local 2599 if (!ASSERT_OK(setup_test_env(&tok), "setup_test_env")) in test_sock_addr() 2657 cleanup_test_env(tok); in test_sock_addr()
|
| /tools/perf/arch/s390/annotate/ |
| A D | instructions.c | 7 char *endptr, *tok, *name; in s390_call__parse() local 13 tok = strchr(ops->raw, ','); in s390_call__parse() 14 if (!tok) in s390_call__parse() 17 ops->target.addr = strtoull(tok + 1, &endptr, 16); in s390_call__parse() 29 tok = strchr(name, '>'); in s390_call__parse() 30 if (tok == NULL) in s390_call__parse() 33 *tok = '\0'; in s390_call__parse() 35 *tok = '>'; in s390_call__parse()
|
| /tools/perf/util/ |
| A D | lock-contention.c | 28 char *s, *tmp, *tok; in parse_call_stack() local 35 for (tok = strtok_r(s, ", ", &tmp); tok; tok = strtok_r(NULL, ", ", &tmp)) { in parse_call_stack() 38 entry = malloc(sizeof(*entry) + strlen(tok) + 1); in parse_call_stack() 45 strcpy(entry->name, tok); in parse_call_stack()
|
| A D | callchain.c | 172 char *tok; in __parse_callchain_report_opt() local 185 if (!strncmp(tok, "none", strlen(tok))) { in __parse_callchain_report_opt() 192 if (!parse_callchain_mode(tok) || in __parse_callchain_report_opt() 193 !parse_callchain_order(tok) || in __parse_callchain_report_opt() 222 if (tok == endptr) in __parse_callchain_report_opt() 228 if (tok == endptr) in __parse_callchain_report_opt() 254 char *tok, *name, *saveptr = NULL; in parse_callchain_record() local 266 name = tok ? : (char *)buf; in parse_callchain_record() 275 if (tok) { in parse_callchain_record() 278 size = strtoul(tok, &name, 0); in parse_callchain_record() [all …]
|
| A D | sort.h | 148 int sort_dimension__add(struct perf_hpp_list *list, const char *tok, 151 int output_field_add(struct perf_hpp_list *list, const char *tok, int *level);
|
| A D | sort.c | 3643 if (!sd->name || strncasecmp(tok, sd->name, strlen(tok))) in sort_dimension__add() 3690 if (!sd->name || strncasecmp(tok, sd->name, strlen(tok))) in sort_dimension__add() 3712 if (!sd->name || strncasecmp(tok, sd->name, strlen(tok))) in sort_dimension__add() 3731 if (strncasecmp(tok, hd->name, strlen(tok))) in sort_dimension__add() 3783 tok = str; in setup_sort_list() 3800 if (*tok) { in setup_sort_list() 4093 if (strncasecmp(tok, hd->name, strlen(tok))) in output_field_add() 4114 if (!sd->name || strncasecmp(tok, sd->name, strlen(tok))) in output_field_add() 4123 if (!sd->name || strncasecmp(tok, sd->name, strlen(tok))) in output_field_add() 4135 if (!sd->name || strncasecmp(tok, sd->name, strlen(tok))) in output_field_add() [all …]
|
| A D | pmu.c | 908 size_t tok_len = strlen(tok); in perf_pmu__match_wildcard() 911 if (strncmp(pmu_name, tok, tok_len)) in perf_pmu__match_wildcard() 953 return tok == NULL; in perf_pmu__match_ignoring_suffix_uncore() 958 if (!strncmp(tok, "uncore_", 7)) in perf_pmu__match_ignoring_suffix_uncore() 959 tok += 7; in perf_pmu__match_ignoring_suffix_uncore() 962 tok_len = pmu_name_len_no_suffix(tok); in perf_pmu__match_ignoring_suffix_uncore() 979 char *mutable_to_match, *tok, *tmp; in perf_pmu__match_wildcard_uncore() local 999 while (tok) { in perf_pmu__match_wildcard_uncore() 1000 size_t tok_len = strlen(tok); in perf_pmu__match_wildcard_uncore() 1002 if (strncmp(pmu_name, tok, tok_len)) { in perf_pmu__match_wildcard_uncore() [all …]
|
| A D | mem-events.c | 144 char *tok, *saveptr = NULL; in perf_pmu__mem_events_parse() local 156 tok = strtok_r((char *)buf, ",", &saveptr); in perf_pmu__mem_events_parse() 158 while (tok) { in perf_pmu__mem_events_parse() 165 if (strstr(e->tag, tok)) in perf_pmu__mem_events_parse() 169 tok = strtok_r(NULL, ",", &saveptr); in perf_pmu__mem_events_parse()
|
| /tools/perf/arch/loongarch/annotate/ |
| A D | instructions.c | 11 char *c, *endptr, *tok, *name; in loongarch_call__parse() local 30 tok = strchr(name, '>'); in loongarch_call__parse() 31 if (tok == NULL) in loongarch_call__parse() 34 *tok = '\0'; in loongarch_call__parse() 36 *tok = '>'; in loongarch_call__parse()
|
| /tools/sched_ext/ |
| A D | scx_flatcg.c | 56 char *line, *cur = NULL, *tok; in read_cpu_util() local 75 for (idx = 0; (tok = strtok_r(line, " \n", &cur)); idx++) { in read_cpu_util() 83 v = strtoull(tok, &endp, 0); in read_cpu_util() 86 idx, tok); in read_cpu_util()
|
| /tools/perf/ |
| A D | builtin-lock.c | 348 char *tok, *tmp, *orig; in setup_output_field() local 2282 char *s, *tmp, *tok; in parse_lock_type() local 2288 for (tok = strtok_r(s, ", ", &tmp); tok; tok = strtok_r(NULL, ", ", &tmp)) { in parse_lock_type() 2292 if (strchr(tok, ':')) { in parse_lock_type() 2401 char *s, *tmp, *tok; in parse_lock_addr() local 2409 for (tok = strtok_r(s, ", ", &tmp); tok; tok = strtok_r(NULL, ", ", &tmp)) { in parse_lock_addr() 2421 if (*tok == '&') { in parse_lock_addr() 2493 char *s, *tmp, *tok; in parse_cgroup_filter() local 2500 for (tok = strtok_r(s, ", ", &tmp); tok; tok = strtok_r(NULL, ", ", &tmp)) { in parse_cgroup_filter() 2566 char *s, *tmp, *tok; in parse_lock_delay() local [all …]
|
| A D | builtin-kmem.c | 1683 if (!strcmp(slab_sorts[i]->name, tok)) { in slab_sort_dimension__add() 1703 if (!strcmp(page_sorts[i]->name, tok)) { in page_sort_dimension__add() 1719 char *tok; in setup_slab_sorting() local 1729 tok = strsep(&pos, ","); in setup_slab_sorting() 1730 if (!tok) in setup_slab_sorting() 1732 if (slab_sort_dimension__add(tok, sort_list) < 0) { in setup_slab_sorting() 1733 pr_err("Unknown slab --sort key: '%s'", tok); in setup_slab_sorting() 1745 char *tok; in setup_page_sorting() local 1755 tok = strsep(&pos, ","); in setup_page_sorting() 1756 if (!tok) in setup_page_sorting() [all …]
|
| A D | builtin-kwork.c | 169 const char *tok, struct list_head *list) in sort_dimension__add() argument 214 if (!strcmp(available_sorts[i]->name, tok)) { in sort_dimension__add() 227 char *tmp, *tok, *str = strdup(kwork->sort_order); in setup_sorting() local 229 for (tok = strtok_r(str, ", ", &tmp); in setup_sorting() 230 tok; tok = strtok_r(NULL, ", ", &tmp)) { in setup_sorting() 233 "Unknown --sort key: `%s'", tok); in setup_sorting() 2245 char *tmp, *tok, *str; in setup_event_list() local 2254 for (tok = strtok_r(str, ", ", &tmp); in setup_event_list() 2255 tok; tok = strtok_r(NULL, ", ", &tmp)) { in setup_event_list() 2258 if (strcmp(tok, class->name) == 0) { in setup_event_list() [all …]
|
| A D | builtin-c2c.c | 2006 char *tmp, *tok; \ 2013 tok; tok = strtok_r(NULL, ", ", &tmp)) { \ 2014 ret = _fn(hpp_list, tok, env); \ 2016 pr_err("Invalid --fields key: `%s'", tok); \ 2897 char *tok, *tmp, *buf = strdup(cl_sort); in build_cl_output() local 2909 for_each_token(tok, buf, ",", tmp) { in build_cl_output() 2910 if (!strcmp(tok, "tid")) { in build_cl_output() 2912 } else if (!strcmp(tok, "pid")) { in build_cl_output() 2914 } else if (!strcmp(tok, "iaddr")) { in build_cl_output() 2919 } else if (!strcmp(tok, "dso")) { in build_cl_output() [all …]
|
| A D | builtin-script.c | 3026 tok = strchr(str, ':'); in parse_output_fields() 3027 if (tok) { in parse_output_fields() 3028 *tok = '\0'; in parse_output_fields() 3029 tok++; in parse_output_fields() 3053 if (strchr(tok, '+') || strchr(tok, '-')) in parse_output_fields() 3061 tok = str; in parse_output_fields() 3084 for (tok = strtok_r(tok, ",", &strtok_saveptr); tok; tok = strtok_r(NULL, ",", &strtok_saveptr)) { in parse_output_fields() 3085 if (*tok == '+') { in parse_output_fields() 3089 tok++; in parse_output_fields() 3090 } else if (*tok == '-') { in parse_output_fields() [all …]
|
| A D | builtin-kvm.c | 448 char *tmp, *tok; in kvm_hpp_list__init() local 454 for (tok = strtok_r(list, ", ", &tmp); tok; in kvm_hpp_list__init() 455 tok = strtok_r(NULL, ", ", &tmp)) { in kvm_hpp_list__init() 456 ret = fn(hpp_list, tok); in kvm_hpp_list__init() 462 pr_err("Invalid field key: '%s'", tok); in kvm_hpp_list__init() 464 pr_err("Unknown field key: '%s'", tok); in kvm_hpp_list__init() 466 pr_err("Fail to initialize for field key: '%s'", tok); in kvm_hpp_list__init()
|
| /tools/perf/arch/x86/util/ |
| A D | iostat.c | 251 char *tok, *tmp, *filter_copy = NULL; in iio_root_ports_list_filter() local 265 for (tok = strtok_r(filter_copy, ",", &tmp); tok; in iio_root_ports_list_filter() 266 tok = strtok_r(NULL, ",", &tmp)) { in iio_root_ports_list_filter() 267 if (!iio_root_port_parse_str(&domain, &bus, tok)) { in iio_root_ports_list_filter()
|
| /tools/perf/bench/ |
| A D | numa.c | 615 tok = strsep(&str, ","); in parse_setup_cpu_list() 616 if (!tok) in parse_setup_cpu_list() 619 tok_end = strstr(tok, "-"); in parse_setup_cpu_list() 627 bind_cpu_0 = atol(tok); in parse_setup_cpu_list() 644 tok_len = strstr(tok, "_"); in parse_setup_cpu_list() 652 tok_mul = strstr(tok, "x"); in parse_setup_cpu_list() 762 tok = strsep(&str, ","); in parse_setup_node_list() 763 if (!tok) in parse_setup_node_list() 766 tok_end = strstr(tok, "-"); in parse_setup_node_list() 774 bind_node_0 = atol(tok); in parse_setup_node_list() [all …]
|
| /tools/testing/selftests/net/ |
| A D | so_txtime.c | 393 char *arg, *tok; in parse_io() local 400 while ((tok = strtok(arg, ","))) { in parse_io() 407 array->delay_us = strtol(tok, NULL, 0) * 1000; in parse_io() 410 array->data = tok[0]; in parse_io()
|
| /tools/testing/selftests/net/mptcp/ |
| A D | pm_nl_ctl.c | 806 char *tok, *str; in add_addr() local 813 for (str = argv[arg]; (tok = strtok(str, ",")); in add_addr() 815 if (!strcmp(tok, "subflow")) in add_addr() 817 else if (!strcmp(tok, "signal")) in add_addr() 819 else if (!strcmp(tok, "backup")) in add_addr() 821 else if (!strcmp(tok, "fullmesh")) in add_addr() 1394 char *tok, *str; in set_flags() local 1402 if (!strcmp(tok, "backup")) in set_flags() 1404 else if (!strcmp(tok, "fullmesh")) in set_flags() 1406 else if (strcmp(tok, "nobackup") && in set_flags() [all …]
|