Home
last modified time | relevance | path

Searched refs:env (Results 1 – 25 of 68) sorted by relevance

123

/tools/perf/util/
Denv.c16 void perf_env__insert_bpf_prog_info(struct perf_env *env, in perf_env__insert_bpf_prog_info() argument
19 down_write(&env->bpf_progs.lock); in perf_env__insert_bpf_prog_info()
20 __perf_env__insert_bpf_prog_info(env, info_node); in perf_env__insert_bpf_prog_info()
21 up_write(&env->bpf_progs.lock); in perf_env__insert_bpf_prog_info()
24 void __perf_env__insert_bpf_prog_info(struct perf_env *env, struct bpf_prog_info_node *info_node) in __perf_env__insert_bpf_prog_info() argument
31 p = &env->bpf_progs.infos.rb_node; in __perf_env__insert_bpf_prog_info()
47 rb_insert_color(&info_node->rb_node, &env->bpf_progs.infos); in __perf_env__insert_bpf_prog_info()
48 env->bpf_progs.infos_cnt++; in __perf_env__insert_bpf_prog_info()
51 struct bpf_prog_info_node *perf_env__find_bpf_prog_info(struct perf_env *env, in perf_env__find_bpf_prog_info() argument
57 down_read(&env->bpf_progs.lock); in perf_env__find_bpf_prog_info()
[all …]
Denv.h107 void perf_env__exit(struct perf_env *env);
109 int perf_env__set_cmdline(struct perf_env *env, int argc, const char *argv[]);
111 int perf_env__read_cpu_topology_map(struct perf_env *env);
115 const char *perf_env__arch(struct perf_env *env);
116 const char *perf_env__raw_arch(struct perf_env *env);
117 int perf_env__nr_cpus_avail(struct perf_env *env);
119 void perf_env__init(struct perf_env *env);
120 void __perf_env__insert_bpf_prog_info(struct perf_env *env,
122 void perf_env__insert_bpf_prog_info(struct perf_env *env,
124 struct bpf_prog_info_node *perf_env__find_bpf_prog_info(struct perf_env *env,
[all …]
Dbpf-event.c39 struct perf_env *env = machine->env; in machine__process_bpf_event_load() local
44 if (env == NULL) in machine__process_bpf_event_load()
47 info_node = perf_env__find_bpf_prog_info(env, id); in machine__process_bpf_event_load()
63 map->dso->bpf_prog.env = env; in machine__process_bpf_event_load()
93 static int perf_env__fetch_btf(struct perf_env *env, in perf_env__fetch_btf() argument
111 if (!perf_env__insert_btf(env, node)) { in perf_env__fetch_btf()
175 struct perf_env *env; in perf_event__synthesize_one_bpf_prog() local
184 env = session->data ? &session->header.env : &perf_env; in perf_event__synthesize_one_bpf_prog()
228 perf_env__fetch_btf(env, info->btf_id, btf); in perf_event__synthesize_one_bpf_prog()
282 perf_env__insert_bpf_prog_info(env, info_node); in perf_event__synthesize_one_bpf_prog()
[all …]
Dbpf-event.h36 int evlist__add_bpf_sb_event(struct evlist *evlist, struct perf_env *env);
38 struct perf_env *env,
49 struct perf_env *env __maybe_unused) in evlist__add_bpf_sb_event()
55 struct perf_env *env __maybe_unused, in __bpf_event__print_bpf_prog_info()
Dheader.c895 return do_write(ff, &ff->ph->env.clockid_res_ns, in write_clockid()
896 sizeof(ff->ph->env.clockid_res_ns)); in write_clockid()
918 struct perf_env *env = &ff->ph->env; in write_bpf_prog_info() local
923 down_read(&env->bpf_progs.lock); in write_bpf_prog_info()
925 ret = do_write(ff, &env->bpf_progs.infos_cnt, in write_bpf_prog_info()
926 sizeof(env->bpf_progs.infos_cnt)); in write_bpf_prog_info()
930 root = &env->bpf_progs.infos; in write_bpf_prog_info()
953 up_read(&env->bpf_progs.lock); in write_bpf_prog_info()
967 struct perf_env *env = &ff->ph->env; in write_bpf_btf() local
972 down_read(&env->bpf_progs.lock); in write_bpf_btf()
[all …]
Dmem2node.c47 int mem2node__init(struct mem2node *map, struct perf_env *env) in mem2node__init() argument
49 struct memory_node *n, *nodes = &env->memory_nodes[0]; in mem2node__init()
51 u64 bsize = env->memory_bsize; in mem2node__init()
57 for (i = 0; i < env->nr_memory_nodes; i++) { in mem2node__init()
66 for (i = 0; i < env->nr_memory_nodes; i++) { in mem2node__init()
Dunwind-libunwind.c41 if (!mg->machine->env || !mg->machine->env->arch) in unwind__prepare_access()
48 arch = perf_env__arch(mg->machine->env); in unwind__prepare_access()
Dllvm-utils.c73 char *env, *path, *tmp = NULL; in search_program() local
88 env = getenv("PATH"); in search_program()
89 if (!env) in search_program()
91 env = strdup(env); in search_program()
92 if (!env) in search_program()
96 path = strtok_r(env, ":", &tmp); in search_program()
107 free(env); in search_program()
Dsample-raw.c14 const char *arch_pf = perf_env__arch(evlist->env); in perf_evlist__init_trace_event_sample_raw()
Dmem2node.h16 int mem2node__init(struct mem2node *map, struct perf_env *env);
Dsvghelper.c752 int svg_build_topology_map(struct perf_env *env) in svg_build_topology_map() argument
758 nr_cpus = min(env->nr_cpus_online, MAX_NR_CPUS); in svg_build_topology_map()
760 t.sib_core_nr = env->nr_sibling_cores; in svg_build_topology_map()
761 t.sib_thr_nr = env->nr_sibling_threads; in svg_build_topology_map()
762 t.sib_core = calloc(env->nr_sibling_cores, sizeof(cpumask_t)); in svg_build_topology_map()
763 t.sib_thr = calloc(env->nr_sibling_threads, sizeof(cpumask_t)); in svg_build_topology_map()
765 sib_core = env->sibling_cores; in svg_build_topology_map()
766 sib_thr = env->sibling_threads; in svg_build_topology_map()
773 for (i = 0; i < env->nr_sibling_cores; i++) { in svg_build_topology_map()
782 for (i = 0; i < env->nr_sibling_threads; i++) { in svg_build_topology_map()
/tools/testing/selftests/bpf/
Dtest_progs.c13 struct test_env env; variable
45 if (stdout == env.stdout) in dump_test_log()
50 if (env.verbose || test->force_log || failed) { in dump_test_log()
51 if (env.log_cnt) { in dump_test_log()
52 env.log_buf[env.log_cnt] = '\0'; in dump_test_log()
53 fprintf(env.stdout, "%s", env.log_buf); in dump_test_log()
54 if (env.log_buf[env.log_cnt - 1] != '\n') in dump_test_log()
55 fprintf(env.stdout, "\n"); in dump_test_log()
64 if (env.test->skip_cnt) { in skip_account()
65 env.skip_cnt++; in skip_account()
[all …]
/tools/perf/arch/
Dcommon.c97 char *env = getenv("PATH"); in lookup_path() local
99 if (!env) in lookup_path()
102 env = strdup(env); in lookup_path()
103 if (!env) in lookup_path()
106 path = strtok_r(env, ":", &tmp); in lookup_path()
115 free(env); in lookup_path()
132 static int perf_env__lookup_binutils_path(struct perf_env *env, in perf_env__lookup_binutils_path() argument
136 const char *arch = perf_env__arch(env), *cross_env; in perf_env__lookup_binutils_path()
205 int perf_env__lookup_objdump(struct perf_env *env, const char **path) in perf_env__lookup_objdump() argument
211 if (env->arch == NULL) in perf_env__lookup_objdump()
[all …]
Dcommon.h9 int perf_env__lookup_objdump(struct perf_env *env, const char **path);
10 bool perf_env__single_address_space(struct perf_env *env);
/tools/perf/tests/
Dtopology.c91 if (!session->header.env.cpu) in check_cpu_topology()
94 for (i = 0; i < session->header.env.nr_cpus_avail; i++) { in check_cpu_topology()
98 session->header.env.cpu[i].core_id, in check_cpu_topology()
99 session->header.env.cpu[i].socket_id); in check_cpu_topology()
104 (session->header.env.cpu[map->map[i]].core_id == (cpu_map__get_core(map, i, NULL) & 0xffff))); in check_cpu_topology()
107 (session->header.env.cpu[map->map[i]].socket_id == cpu_map__get_socket(map, i, NULL))); in check_cpu_topology()
Dmem2node.c50 struct perf_env env = { in test__mem2node() local
65 T("failed: mem2node__init", !mem2node__init(&map, &env)); in test__mem2node()
/tools/lib/subcmd/
Drun-command.c115 if (cmd->env) { in start_command()
116 for (; *cmd->env; cmd->env++) { in start_command()
117 if (strchr(*cmd->env, '=')) in start_command()
118 putenv((char*)*cmd->env); in start_command()
120 unsetenv(*cmd->env); in start_command()
Dexec-cmd.c116 char *env; in get_argv_exec_path() local
121 env = getenv(subcmd_config.exec_path_env); in get_argv_exec_path()
122 if (env && *env) in get_argv_exec_path()
123 return strdup(env); in get_argv_exec_path()
Drun-command.h43 const char *const *env; member
/tools/perf/
Dbuiltin-stat.c934 static inline int perf_env__get_cpu(struct perf_env *env, struct perf_cpu_map *map, int idx) in perf_env__get_cpu() argument
943 if (cpu >= env->nr_cpus_avail) in perf_env__get_cpu()
951 struct perf_env *env = data; in perf_env__get_socket() local
952 int cpu = perf_env__get_cpu(env, map, idx); in perf_env__get_socket()
954 return cpu == -1 ? -1 : env->cpu[cpu].socket_id; in perf_env__get_socket()
959 struct perf_env *env = data; in perf_env__get_die() local
960 int die_id = -1, cpu = perf_env__get_cpu(env, map, idx); in perf_env__get_die()
969 if (WARN_ONCE(env->cpu[cpu].socket_id >> 8, "The socket id number is too big.\n")) in perf_env__get_die()
972 if (WARN_ONCE(env->cpu[cpu].die_id >> 8, "The die id number is too big.\n")) in perf_env__get_die()
975 die_id = (env->cpu[cpu].socket_id << 8) | (env->cpu[cpu].die_id & 0xff); in perf_env__get_die()
[all …]
/tools/perf/ui/browsers/
Dheader.c95 int tui__header_window(struct perf_env *env) in tui__header_window() argument
104 session = container_of(env, struct perf_session, header.env); in tui__header_window()
Dhists.h16 struct perf_env *env; member
/tools/testing/selftests/bpf/prog_tests/
Dbpf_verif_scale.c94 if (env.verifier_stats) { in test_bpf_verif_scale()
109 if (env.verifier_stats) in test_bpf_verif_scale()
Dget_stack_raw_tp.c44 if (env.jit_enabled) { in get_stack_print_output()
61 if (env.jit_enabled) { in get_stack_print_output()
Dbpf_obj_id.c112 (env.jit_enabled && !prog_infos[i].jited_prog_len) || in test_bpf_obj_id()
113 (env.jit_enabled && in test_bpf_obj_id()
127 env.jit_enabled, in test_bpf_obj_id()

123