Lines Matching full:env
903 return do_write(ff, &ff->ph->env.clock.clockid_res_ns, in write_clockid()
904 sizeof(ff->ph->env.clock.clockid_res_ns)); in write_clockid()
922 data32 = ff->ph->env.clock.clockid; in write_clock_data()
929 data64 = &ff->ph->env.clock.tod_ns; in write_clock_data()
936 data64 = &ff->ph->env.clock.clockid_ns; in write_clock_data()
1045 struct perf_env *env = &ff->ph->env; in write_bpf_prog_info() local
1050 down_read(&env->bpf_progs.lock); in write_bpf_prog_info()
1052 ret = do_write(ff, &env->bpf_progs.infos_cnt, in write_bpf_prog_info()
1053 sizeof(env->bpf_progs.infos_cnt)); in write_bpf_prog_info()
1057 root = &env->bpf_progs.infos; in write_bpf_prog_info()
1080 up_read(&env->bpf_progs.lock); in write_bpf_prog_info()
1087 struct perf_env *env = &ff->ph->env; in write_bpf_btf() local
1092 down_read(&env->bpf_progs.lock); in write_bpf_btf()
1094 ret = do_write(ff, &env->bpf_progs.btfs_cnt, in write_bpf_btf()
1095 sizeof(env->bpf_progs.btfs_cnt)); in write_bpf_btf()
1100 root = &env->bpf_progs.btfs; in write_bpf_btf()
1113 up_read(&env->bpf_progs.lock); in write_bpf_btf()
1534 ret = do_write(ff, &(ff->ph->env.comp_ver), sizeof(ff->ph->env.comp_ver)); in write_compressed()
1538 ret = do_write(ff, &(ff->ph->env.comp_type), sizeof(ff->ph->env.comp_type)); in write_compressed()
1542 ret = do_write(ff, &(ff->ph->env.comp_level), sizeof(ff->ph->env.comp_level)); in write_compressed()
1546 ret = do_write(ff, &(ff->ph->env.comp_ratio), sizeof(ff->ph->env.comp_ratio)); in write_compressed()
1550 return do_write(ff, &(ff->ph->env.comp_mmap_len), sizeof(ff->ph->env.comp_mmap_len)); in write_compressed()
1647 fprintf(fp, "# hostname : %s\n", ff->ph->env.hostname); in print_hostname()
1652 fprintf(fp, "# os release : %s\n", ff->ph->env.os_release); in print_osrelease()
1657 fprintf(fp, "# arch : %s\n", ff->ph->env.arch); in print_arch()
1662 fprintf(fp, "# cpudesc : %s\n", ff->ph->env.cpu_desc); in print_cpudesc()
1667 fprintf(fp, "# nrcpus online : %u\n", ff->ph->env.nr_cpus_online); in print_nrcpus()
1668 fprintf(fp, "# nrcpus avail : %u\n", ff->ph->env.nr_cpus_avail); in print_nrcpus()
1673 fprintf(fp, "# perf version : %s\n", ff->ph->env.version); in print_version()
1680 nr = ff->ph->env.nr_cmdline; in print_cmdline()
1685 char *argv_i = strdup(ff->ph->env.cmdline_argv[i]); in print_cmdline()
1687 fprintf(fp, "%s ", ff->ph->env.cmdline_argv[i]); in print_cmdline()
1708 int cpu_nr = ph->env.nr_cpus_avail; in print_cpu_topology()
1712 nr = ph->env.nr_sibling_cores; in print_cpu_topology()
1713 str = ph->env.sibling_cores; in print_cpu_topology()
1720 if (ph->env.nr_sibling_dies) { in print_cpu_topology()
1721 nr = ph->env.nr_sibling_dies; in print_cpu_topology()
1722 str = ph->env.sibling_dies; in print_cpu_topology()
1730 nr = ph->env.nr_sibling_threads; in print_cpu_topology()
1731 str = ph->env.sibling_threads; in print_cpu_topology()
1738 if (ph->env.nr_sibling_dies) { in print_cpu_topology()
1739 if (ph->env.cpu != NULL) { in print_cpu_topology()
1743 i, ph->env.cpu[i].core_id, in print_cpu_topology()
1744 ph->env.cpu[i].die_id, in print_cpu_topology()
1745 ph->env.cpu[i].socket_id); in print_cpu_topology()
1750 if (ph->env.cpu != NULL) { in print_cpu_topology()
1754 i, ph->env.cpu[i].core_id, in print_cpu_topology()
1755 ph->env.cpu[i].socket_id); in print_cpu_topology()
1765 ff->ph->env.clock.clockid_res_ns * 1000); in print_clockid()
1777 if (!ff->ph->env.clock.enabled) { in print_clock_data()
1783 ref = ff->ph->env.clock.tod_ns; in print_clock_data()
1789 ref = ff->ph->env.clock.clockid_ns; in print_clock_data()
1794 clockid = ff->ph->env.clock.clockid; in print_clock_data()
1817 for (i = 0; i < ff->ph->env.nr_hybrid_nodes; i++) { in print_hybrid_topology()
1818 n = &ff->ph->env.hybrid_nodes[i]; in print_hybrid_topology()
1837 struct perf_env *env = &ff->ph->env; in print_bpf_prog_info() local
1841 down_read(&env->bpf_progs.lock); in print_bpf_prog_info()
1843 root = &env->bpf_progs.infos; in print_bpf_prog_info()
1853 env, fp); in print_bpf_prog_info()
1856 up_read(&env->bpf_progs.lock); in print_bpf_prog_info()
1861 struct perf_env *env = &ff->ph->env; in print_bpf_btf() local
1865 down_read(&env->bpf_progs.lock); in print_bpf_btf()
1867 root = &env->bpf_progs.btfs; in print_bpf_btf()
1878 up_read(&env->bpf_progs.lock); in print_bpf_btf()
2058 fprintf(fp, "# total memory : %llu kB\n", ff->ph->env.total_mem); in print_total_mem()
2066 for (i = 0; i < ff->ph->env.nr_numa_nodes; i++) { in print_numa_topology()
2067 n = &ff->ph->env.numa_nodes[i]; in print_numa_topology()
2080 fprintf(fp, "# cpuid : %s\n", ff->ph->env.cpuid); in print_cpuid()
2103 for (i = 0; i < ff->ph->env.caches_cnt; i++) { in print_cache()
2105 cpu_cache_level__fprintf(fp, &ff->ph->env.caches[i]); in print_cache()
2112 ff->ph->env.comp_type == PERF_COMP_ZSTD ? "Zstd" : "Unknown", in print_compressed()
2113 ff->ph->env.comp_level, ff->ph->env.comp_ratio); in print_compressed()
2137 __print_pmu_caps(fp, ff->ph->env.nr_cpu_pmu_caps, in print_cpu_pmu_caps()
2138 ff->ph->env.cpu_pmu_caps, (char *)"cpu"); in print_cpu_pmu_caps()
2145 for (int i = 0; i < ff->ph->env.nr_pmus_with_caps; i++) { in print_pmu_caps()
2146 pmu_caps = &ff->ph->env.pmu_caps[i]; in print_pmu_caps()
2151 if (strcmp(perf_env__arch(&ff->ph->env), "x86") == 0 && in print_pmu_caps()
2152 perf_env__has_pmu_mapping(&ff->ph->env, "ibs_op")) { in print_pmu_caps()
2153 char *max_precise = perf_env__find_pmu_cap(&ff->ph->env, "cpu", "max_precise"); in print_pmu_caps()
2167 pmu_num = ff->ph->env.nr_pmu_mappings; in print_pmu_mappings()
2173 str = ff->ph->env.pmu_mappings; in print_pmu_mappings()
2258 nodes = ff->ph->env.memory_nodes; in print_mem_topology()
2259 nr = ff->ph->env.nr_memory_nodes; in print_mem_topology()
2262 nr, ff->ph->env.memory_bsize); in print_mem_topology()
2265 memory_node__fprintf(&nodes[i], ff->ph->env.memory_bsize, fp); in print_mem_topology()
2433 free(ff->ph->env.__feat_env); \
2434 ff->ph->env.__feat_env = do_read_string(ff); \
2435 return ff->ph->env.__feat_env ? 0 : -ENOMEM; \
2473 ff->ph->env.nr_cpus_avail = (int)nr_cpus_avail; in process_nrcpus()
2474 ff->ph->env.nr_cpus_online = (int)nr_cpus_online; in process_nrcpus()
2486 ff->ph->env.total_mem = (unsigned long long)total_mem; in process_total_mem()
2553 ff->ph->env.nr_cmdline = nr; in process_cmdline()
2573 ff->ph->env.cmdline = cmdline; in process_cmdline()
2574 ff->ph->env.cmdline_argv = (const char **) argv; in process_cmdline()
2588 int cpu_nr = ff->ph->env.nr_cpus_avail; in process_cpu_topology()
2593 ph->env.cpu = calloc(cpu_nr, sizeof(*ph->env.cpu)); in process_cpu_topology()
2594 if (!ph->env.cpu) in process_cpu_topology()
2600 ph->env.nr_sibling_cores = nr; in process_cpu_topology()
2616 ph->env.sibling_cores = strbuf_detach(&sb, NULL); in process_cpu_topology()
2621 ph->env.nr_sibling_threads = nr; in process_cpu_topology()
2635 ph->env.sibling_threads = strbuf_detach(&sb, NULL); in process_cpu_topology()
2642 zfree(&ph->env.cpu); in process_cpu_topology()
2651 if (ph->env.arch && (!strncmp(ph->env.arch, "s390", 4) in process_cpu_topology()
2652 || !strncmp(ph->env.arch, "aarch64", 7))) in process_cpu_topology()
2659 ph->env.cpu[i].core_id = nr; in process_cpu_topology()
2671 ph->env.cpu[i].socket_id = nr; in process_cpu_topology()
2685 ph->env.nr_sibling_dies = nr; in process_cpu_topology()
2699 ph->env.sibling_dies = strbuf_detach(&sb, NULL); in process_cpu_topology()
2705 ph->env.cpu[i].die_id = nr; in process_cpu_topology()
2714 zfree(&ph->env.cpu); in process_cpu_topology()
2754 ff->ph->env.nr_numa_nodes = nr; in process_numa_topology()
2755 ff->ph->env.numa_nodes = nodes; in process_numa_topology()
2778 ff->ph->env.nr_pmu_mappings = pmu_num; in process_pmu_mappings()
2797 ff->ph->env.msr_pmu_type = type; in process_pmu_mappings()
2802 ff->ph->env.pmu_mappings = strbuf_detach(&sb, NULL); in process_pmu_mappings()
2825 ff->ph->env.nr_groups = nr_groups; in process_group_desc()
2949 ff->ph->env.caches = caches; in process_cache()
2950 ff->ph->env.caches_cnt = cnt; in process_cache()
3024 ff->ph->env.memory_bsize = bsize; in process_mem_topology()
3025 ff->ph->env.memory_nodes = nodes; in process_mem_topology()
3026 ff->ph->env.nr_memory_nodes = nr; in process_mem_topology()
3038 if (do_read_u64(ff, &ff->ph->env.clock.clockid_res_ns)) in process_clockid()
3061 ff->ph->env.clock.clockid = data32; in process_clock_data()
3067 ff->ph->env.clock.tod_ns = data64; in process_clock_data()
3073 ff->ph->env.clock.clockid_ns = data64; in process_clock_data()
3074 ff->ph->env.clock.enabled = true; in process_clock_data()
3104 ff->ph->env.nr_hybrid_nodes = nr; in process_hybrid_topology()
3105 ff->ph->env.hybrid_nodes = nodes; in process_hybrid_topology()
3137 struct perf_env *env = &ff->ph->env; in process_bpf_prog_info() local
3150 down_write(&env->bpf_progs.lock); in process_bpf_prog_info()
3191 __perf_env__insert_bpf_prog_info(env, info_node); in process_bpf_prog_info()
3194 up_write(&env->bpf_progs.lock); in process_bpf_prog_info()
3199 up_write(&env->bpf_progs.lock); in process_bpf_prog_info()
3205 struct perf_env *env = &ff->ph->env; in process_bpf_btf() local
3218 down_write(&env->bpf_progs.lock); in process_bpf_btf()
3238 __perf_env__insert_btf(env, node); in process_bpf_btf()
3244 up_write(&env->bpf_progs.lock); in process_bpf_btf()
3253 if (do_read_u32(ff, &(ff->ph->env.comp_ver))) in process_compressed()
3256 if (do_read_u32(ff, &(ff->ph->env.comp_type))) in process_compressed()
3259 if (do_read_u32(ff, &(ff->ph->env.comp_level))) in process_compressed()
3262 if (do_read_u32(ff, &(ff->ph->env.comp_ratio))) in process_compressed()
3265 if (do_read_u32(ff, &(ff->ph->env.comp_mmap_len))) in process_compressed()
3337 int ret = __process_pmu_caps(ff, &ff->ph->env.nr_cpu_pmu_caps, in process_cpu_pmu_caps()
3338 &ff->ph->env.cpu_pmu_caps, in process_cpu_pmu_caps()
3339 &ff->ph->env.max_branches, in process_cpu_pmu_caps()
3340 &ff->ph->env.br_cntr_nr, in process_cpu_pmu_caps()
3341 &ff->ph->env.br_cntr_width); in process_cpu_pmu_caps()
3343 if (!ret && !ff->ph->env.cpu_pmu_caps) in process_cpu_pmu_caps()
3387 ff->ph->env.nr_pmus_with_caps = nr_pmu; in process_pmu_caps()
3388 ff->ph->env.pmu_caps = pmu_caps; in process_pmu_caps()
4254 session->evlist->env = &header->env; in perf_session__read_header()
4255 session->machines.host.env = &header->env; in perf_session__read_header()