Lines Matching refs:str
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()
639 char str[MAXPATHLEN]; in write_topo_node() local
647 sprintf(str, "/sys/devices/system/node/node%d/meminfo", node); in write_topo_node()
648 fp = fopen(str, "r"); in write_topo_node()
676 sprintf(str, "/sys/devices/system/node/node%d/cpulist", node); in write_topo_node()
678 fp = fopen(str, "r"); in write_topo_node()
912 char *str; in print_cmdline() local
915 str = ph->env.cmdline; in print_cmdline()
920 fprintf(fp, "%s ", str); in print_cmdline()
921 str += strlen(str) + 1; in print_cmdline()
930 char *str; in print_cpu_topology() local
933 str = ph->env.sibling_cores; in print_cpu_topology()
936 fprintf(fp, "# sibling cores : %s\n", str); in print_cpu_topology()
937 str += strlen(str) + 1; in print_cpu_topology()
941 str = ph->env.sibling_threads; in print_cpu_topology()
944 fprintf(fp, "# sibling threads : %s\n", str); in print_cpu_topology()
945 str += strlen(str) + 1; in print_cpu_topology()
1106 char *str, *tmp; in print_numa_topology() local
1111 str = ph->env.numa_nodes; in print_numa_topology()
1115 c = strtoul(str, &tmp, 0); in print_numa_topology()
1119 str = tmp + 1; in print_numa_topology()
1120 mem_total = strtoull(str, &tmp, 0); in print_numa_topology()
1124 str = tmp + 1; in print_numa_topology()
1125 mem_free = strtoull(str, &tmp, 0); in print_numa_topology()
1133 str = tmp + 1; in print_numa_topology()
1134 fprintf(fp, "# node%u cpu list : %s\n", c, str); in print_numa_topology()
1136 str += strlen(str) + 1; in print_numa_topology()
1158 char *str, *tmp; in print_pmu_mappings() local
1168 str = ph->env.pmu_mappings; in print_pmu_mappings()
1171 type = strtoul(str, &tmp, 0); in print_pmu_mappings()
1175 str = tmp + 1; in print_pmu_mappings()
1176 fprintf(fp, "%s%s = %" PRIu32, delimiter, str, type); in print_pmu_mappings()
1179 str += strlen(str) + 1; in print_pmu_mappings()
1533 char *str; in process_cmdline() local
1548 str = do_read_string(fd, ph); in process_cmdline()
1549 if (!str) in process_cmdline()
1553 strbuf_add(&sb, str, strlen(str) + 1); in process_cmdline()
1554 free(str); in process_cmdline()
1570 char *str; in process_cpu_topology() local
1584 str = do_read_string(fd, ph); in process_cpu_topology()
1585 if (!str) in process_cpu_topology()
1589 strbuf_add(&sb, str, strlen(str) + 1); in process_cpu_topology()
1590 free(str); in process_cpu_topology()
1604 str = do_read_string(fd, ph); in process_cpu_topology()
1605 if (!str) in process_cpu_topology()
1609 strbuf_add(&sb, str, strlen(str) + 1); in process_cpu_topology()
1610 free(str); in process_cpu_topology()
1626 char *str; in process_numa_topology() local
1664 str = do_read_string(fd, ph); in process_numa_topology()
1665 if (!str) in process_numa_topology()
1669 strbuf_add(&sb, str, strlen(str) + 1); in process_numa_topology()
1670 free(str); in process_numa_topology()