Lines Matching defs:ph
286 if (ff->ph->needs_swap)
299 if (ff->ph->needs_swap)
401 session = container_of(ff->ph, struct perf_session, header);
660 struct perf_env *env = &ff->ph->env;
690 struct perf_env *env = &ff->ph->env;
1016 session = container_of(ff->ph, struct perf_session, header);
1027 return do_write(ff, &ff->ph->env.clock.clockid_res_ns,
1028 sizeof(ff->ph->env.clock.clockid_res_ns));
1046 data32 = ff->ph->env.clock.clockid;
1053 data64 = &ff->ph->env.clock.tod_ns;
1060 data64 = &ff->ph->env.clock.clockid_ns;
1105 session = container_of(ff->ph, struct perf_session, header);
1118 struct perf_env *env = &ff->ph->env;
1165 struct perf_env *env = &ff->ph->env;
1408 ff->ph->env.cln_size = cln_size;
1628 ret = do_write(ff, &(ff->ph->env.comp_ver), sizeof(ff->ph->env.comp_ver));
1632 ret = do_write(ff, &(ff->ph->env.comp_type), sizeof(ff->ph->env.comp_type));
1636 ret = do_write(ff, &(ff->ph->env.comp_level), sizeof(ff->ph->env.comp_level));
1640 ret = do_write(ff, &(ff->ph->env.comp_ratio), sizeof(ff->ph->env.comp_ratio));
1644 return do_write(ff, &(ff->ph->env.comp_mmap_len), sizeof(ff->ph->env.comp_mmap_len));
1896 fprintf(fp, "# hostname : %s\n", ff->ph->env.hostname);
1901 fprintf(fp, "# os release : %s\n", ff->ph->env.os_release);
1906 fprintf(fp, "# arch : %s\n", ff->ph->env.arch);
1911 fprintf(fp, "# e_machine : %u\n", ff->ph->env.e_machine);
1912 fprintf(fp, "# e_flags : %u\n", ff->ph->env.e_flags);
1917 fprintf(fp, "# cpudesc : %s\n", ff->ph->env.cpu_desc);
1922 fprintf(fp, "# nrcpus online : %u\n", ff->ph->env.nr_cpus_online);
1923 fprintf(fp, "# nrcpus avail : %u\n", ff->ph->env.nr_cpus_avail);
1928 fprintf(fp, "# perf version : %s\n", ff->ph->env.version);
1935 nr = ff->ph->env.nr_cmdline;
1940 char *argv_i = strdup(ff->ph->env.cmdline_argv[i]);
1942 fprintf(fp, "%s ", ff->ph->env.cmdline_argv[i]);
1962 struct perf_header *ph = ff->ph;
1963 int cpu_nr = ph->env.nr_cpus_avail;
1967 nr = ph->env.nr_sibling_cores;
1968 str = ph->env.sibling_cores;
1975 if (ph->env.nr_sibling_dies) {
1976 nr = ph->env.nr_sibling_dies;
1977 str = ph->env.sibling_dies;
1985 nr = ph->env.nr_sibling_threads;
1986 str = ph->env.sibling_threads;
1993 if (ph->env.nr_sibling_dies) {
1994 if (ph->env.cpu != NULL) {
1998 i, ph->env.cpu[i].core_id,
1999 ph->env.cpu[i].die_id,
2000 ph->env.cpu[i].socket_id);
2005 if (ph->env.cpu != NULL) {
2009 i, ph->env.cpu[i].core_id,
2010 ph->env.cpu[i].socket_id);
2020 ff->ph->env.clock.clockid_res_ns * 1000);
2032 if (!ff->ph->env.clock.enabled) {
2038 ref = ff->ph->env.clock.tod_ns;
2044 ref = ff->ph->env.clock.clockid_ns;
2049 clockid = ff->ph->env.clock.clockid;
2072 for (i = 0; i < ff->ph->env.nr_hybrid_nodes; i++) {
2073 n = &ff->ph->env.hybrid_nodes[i];
2083 session = container_of(ff->ph, struct perf_session, header);
2092 struct perf_env *env = &ff->ph->env;
2122 struct perf_env *env = &ff->ph->env;
2259 attr_size = ff->ph->needs_swap ? bswap_32(attr->size) : attr->size;
2275 if (!ff->ph->needs_swap)
2284 if (ff->ph->needs_swap)
2295 if (ff->ph->needs_swap)
2378 fprintf(fp, "# total memory : %llu kB\n", ff->ph->env.total_mem);
2386 for (i = 0; i < ff->ph->env.nr_numa_nodes; i++) {
2387 n = &ff->ph->env.numa_nodes[i];
2400 fprintf(fp, "# cpuid : %s\n", ff->ph->env.cpuid);
2423 for (i = 0; i < ff->ph->env.caches_cnt; i++) {
2425 cpu_cache_level__fprintf(fp, &ff->ph->env.caches[i]);
2431 fprintf(fp, "# cacheline size: %u\n", ff->ph->env.cln_size);
2437 ff->ph->env.comp_type == PERF_COMP_ZSTD ? "Zstd" : "Unknown",
2438 ff->ph->env.comp_level, ff->ph->env.comp_ratio);
2462 __print_pmu_caps(fp, ff->ph->env.nr_cpu_pmu_caps,
2463 ff->ph->env.cpu_pmu_caps, (char *)"cpu");
2468 struct perf_env *env = &ff->ph->env;
2489 struct perf_env *env = &ff->ph->env;
2530 session = container_of(ff->ph, struct perf_session, header);
2552 session = container_of(ff->ph, struct perf_session, header);
2583 struct perf_env *env = &ff->ph->env;
2600 struct cpu_domain_map **cd_map = ff->ph->env.cpu_domain;
2601 u32 nr = ff->ph->env.nr_cpus_avail;
2605 fprintf(fp, "# schedstat version : %u\n", ff->ph->env.schedstat_version);
2606 fprintf(fp, "# Maximum sched domains : %u\n", ff->ph->env.max_sched_domains);
2622 if (ff->ph->env.schedstat_version >= 17)
2846 free(ff->ph->env.__feat_env); \
2847 ff->ph->env.__feat_env = do_read_string(ff); \
2848 return ff->ph->env.__feat_env ? 0 : -ENOMEM; \
2859 free(ff->ph->env.arch);
2860 ff->ph->env.arch = do_read_string(ff);
2861 if (!ff->ph->env.arch)
2870 ret = do_read_u32(ff, &ff->ph->env.e_machine);
2874 return do_read_u32(ff, &ff->ph->env.e_flags);
2898 if (perf_header__read_build_ids(ff->ph, ff->fd, offset, ff->size))
2905 struct perf_env *env = &ff->ph->env;
2941 struct perf_env *env = &ff->ph->env;
2990 session = container_of(ff->ph, struct perf_session, header);
3015 struct perf_env *env = &ff->ph->env;
3060 struct perf_env *env = &ff->ph->env;
3199 struct perf_env *env = &ff->ph->env;
3257 struct perf_env *env = &ff->ph->env;
3319 struct perf_env *env = &ff->ph->env;
3371 session = container_of(ff->ph, struct perf_session, header);
3419 session = container_of(ff->ph, struct perf_session, header);
3422 ff->ph->needs_swap);
3430 struct perf_env *env = &ff->ph->env;
3498 struct perf_env *env = &ff->ph->env;
3512 session = container_of(ff->ph, struct perf_session, header);
3530 struct perf_env *env = &ff->ph->env;
3596 struct perf_env *env = &ff->ph->env;
3607 struct perf_env *env = &ff->ph->env;
3642 struct perf_env *env = &ff->ph->env;
3698 session = container_of(ff->ph, struct perf_session, header);
3711 struct perf_env *env = &ff->ph->env;
3716 if (ff->ph->needs_swap) {
3807 struct perf_env *env = &ff->ph->env;
3812 if (ff->ph->needs_swap) {
3877 struct perf_env *env = &ff->ph->env;
3986 struct perf_env *env = &ff->ph->env;
4000 struct perf_env *env = &ff->ph->env;
4069 struct perf_env *env = &ff->ph->env;
4283 struct perf_header *ph,
4294 if (feat >= ph->last_feat) {
4303 .ph = ph,
4376 if (perf_header__has_feat(ff->ph, type)) {
4423 .ph = header,
4494 .ph = header,
4657 struct perf_header *ph,
4731 static int try_all_file_abis(uint64_t hdr_sz, struct perf_header *ph)
4744 ph->needs_swap = true;
4748 ph->needs_swap);
4769 static int try_all_pipe_abis(uint64_t hdr_sz, struct perf_header *ph)
4780 ph->needs_swap = true;
4799 bool is_pipe, struct perf_header *ph)
4806 ph->version = PERF_HEADER_VERSION_1;
4809 return try_all_pipe_abis(hdr_sz, ph);
4811 return try_all_file_abis(hdr_sz, ph);
4818 ph->version = PERF_HEADER_VERSION_2;
4828 ph->needs_swap = true;
4834 struct perf_header *ph, int fd)
4845 header->attr_size, false, ph) < 0) {
4850 if (ph->needs_swap) {
4879 } else if (ph->needs_swap) {
4914 memcpy(&ph->adds_features, &header->adds_features,
4915 sizeof(ph->adds_features));
4917 ph->data_offset = header->data.offset;
4918 ph->data_size = header->data.size;
4919 ph->feat_offset = header->data.offset + header->data.size;
4920 ph->last_feat = HEADER_LAST_FEATURE;
4925 struct perf_header *ph,
4930 .ph = ph,
4953 struct perf_header *ph,
4962 if (check_magic_endian(header->magic, header->size, true, ph) < 0) {
4967 if (ph->needs_swap)
4971 ph->last_feat = 0;
4988 static int read_attr(int fd, struct perf_header *ph,
5011 if (ph->needs_swap)
5367 ff.ph = header;