Lines Matching refs:str
88 #define string_size(str) \ argument
89 (PERF_ALIGN((strlen(str) + 1), NAME_ALIGN) + sizeof(u32))
91 static int do_write_string(int fd, const char *str) in do_write_string() argument
96 olen = strlen(str) + 1; in do_write_string()
104 return write_padded(fd, str, olen, len); in do_write_string()
624 char str[MAXPATHLEN]; in write_topo_node() local
632 sprintf(str, "/sys/devices/system/node/node%d/meminfo", node); in write_topo_node()
633 fp = fopen(str, "r"); in write_topo_node()
661 sprintf(str, "/sys/devices/system/node/node%d/cpulist", node); in write_topo_node()
663 fp = fopen(str, "r"); in write_topo_node()
925 char *str; in print_cpu_topology() local
929 str = ph->env.sibling_cores; in print_cpu_topology()
932 fprintf(fp, "# sibling cores : %s\n", str); in print_cpu_topology()
933 str += strlen(str) + 1; in print_cpu_topology()
937 str = ph->env.sibling_threads; in print_cpu_topology()
940 fprintf(fp, "# sibling threads : %s\n", str); in print_cpu_topology()
941 str += strlen(str) + 1; in print_cpu_topology()
1108 char *str, *tmp; in print_numa_topology() local
1113 str = ph->env.numa_nodes; in print_numa_topology()
1117 c = strtoul(str, &tmp, 0); in print_numa_topology()
1121 str = tmp + 1; in print_numa_topology()
1122 mem_total = strtoull(str, &tmp, 0); in print_numa_topology()
1126 str = tmp + 1; in print_numa_topology()
1127 mem_free = strtoull(str, &tmp, 0); in print_numa_topology()
1135 str = tmp + 1; in print_numa_topology()
1136 fprintf(fp, "# node%u cpu list : %s\n", c, str); in print_numa_topology()
1138 str += strlen(str) + 1; in print_numa_topology()
1166 char *str, *tmp; in print_pmu_mappings() local
1176 str = ph->env.pmu_mappings; in print_pmu_mappings()
1179 type = strtoul(str, &tmp, 0); in print_pmu_mappings()
1183 str = tmp + 1; in print_pmu_mappings()
1184 fprintf(fp, "%s%s = %" PRIu32, delimiter, str, type); in print_pmu_mappings()
1187 str += strlen(str) + 1; in print_pmu_mappings()
1538 char *str, *cmdline = NULL, **argv = NULL; in process_cmdline() local
1559 str = do_read_string(fd, ph); in process_cmdline()
1560 if (!str) in process_cmdline()
1564 memcpy(argv[i], str, strlen(str) + 1); in process_cmdline()
1565 len += strlen(str) + 1; in process_cmdline()
1566 free(str); in process_cmdline()
1584 char *str; in process_cpu_topology() local
1605 str = do_read_string(fd, ph); in process_cpu_topology()
1606 if (!str) in process_cpu_topology()
1610 strbuf_add(&sb, str, strlen(str) + 1); in process_cpu_topology()
1611 size += string_size(str); in process_cpu_topology()
1612 free(str); in process_cpu_topology()
1627 str = do_read_string(fd, ph); in process_cpu_topology()
1628 if (!str) in process_cpu_topology()
1632 strbuf_add(&sb, str, strlen(str) + 1); in process_cpu_topology()
1633 size += string_size(str); in process_cpu_topology()
1634 free(str); in process_cpu_topology()
1693 char *str; in process_numa_topology() local
1731 str = do_read_string(fd, ph); in process_numa_topology()
1732 if (!str) in process_numa_topology()
1736 strbuf_add(&sb, str, strlen(str) + 1); in process_numa_topology()
1737 free(str); in process_numa_topology()