| /tools/perf/util/ |
| A D | evsel_fprintf.c | 26 ret += fprintf(fp, ","); in comma_fprintf() 28 ret += fprintf(fp, ":"); in comma_fprintf() 33 ret += vfprintf(fp, fmt, args); in comma_fprintf() 62 printed += fprintf(fp, "}"); in evsel__fprintf() 108 fputc('\n', fp); in evsel__fprintf() 155 printed += fprintf(fp, " <-"); in sample__fprintf_callchain() 167 printed += fprintf(fp, " "); in sample__fprintf_callchain() 174 true, fp); in sample__fprintf_callchain() 192 printed += fprintf(fp, "\n"); in sample__fprintf_callchain() 232 printed += fprintf(fp, " "); in sample__fprintf_sym() [all …]
|
| A D | symbol_fprintf.c | 10 size_t symbol__fprintf(struct symbol *sym, FILE *fp) in symbol__fprintf() argument 12 return fprintf(fp, " %" PRIx64 "-%" PRIx64 " %c %s\n", in symbol__fprintf() 22 bool print_offsets, FILE *fp) in __symbol__fprintf_symname_offs() argument 28 length = fprintf(fp, "%s", sym->name); in __symbol__fprintf_symname_offs() 34 length += fprintf(fp, "+0x%lx", offset); in __symbol__fprintf_symname_offs() 38 return fprintf(fp, "[%#" PRIx64 "]", al->addr); in __symbol__fprintf_symname_offs() 40 return fprintf(fp, "[unknown]"); in __symbol__fprintf_symname_offs() 45 FILE *fp) in symbol__fprintf_symname_offs() argument 52 bool unknown_as_addr, FILE *fp) in __symbol__fprintf_symname() argument 63 FILE *fp) in dso__fprintf_symbols_by_name() argument [all …]
|
| A D | cputopo.c | 37 FILE *fp; in build_cpu_topology() local 52 if (!fp) in build_cpu_topology() 56 fclose(fp); in build_cpu_topology() 83 if (!fp) in build_cpu_topology() 115 if (!fp) in build_cpu_topology() 136 if (fp) in build_cpu_topology() 330 if (!fp) in load_numa_node() 354 if (!fp) in load_numa_node() 370 if (fp) in load_numa_node() 390 if (!fp) in numa_topology__new() [all …]
|
| A D | print_binary.c | 8 void *extra, FILE *fp) in binary__fprintf() argument 19 printed += printer(BINARY_PRINT_DATA_BEGIN, 0, extra, fp); in binary__fprintf() 22 printed += printer(BINARY_PRINT_LINE_BEGIN, -1, extra, fp); in binary__fprintf() 23 printed += printer(BINARY_PRINT_ADDR, i, extra, fp); in binary__fprintf() 26 printed += printer(BINARY_PRINT_NUM_DATA, data[i], extra, fp); in binary__fprintf() 30 printed += printer(BINARY_PRINT_NUM_PAD, -1, extra, fp); in binary__fprintf() 32 printer(BINARY_PRINT_SEP, i, extra, fp); in binary__fprintf() 34 printed += printer(BINARY_PRINT_CHAR_DATA, data[j], extra, fp); in binary__fprintf() 36 printed += printer(BINARY_PRINT_CHAR_PAD, i, extra, fp); in binary__fprintf() 37 printed += printer(BINARY_PRINT_LINE_END, -1, extra, fp); in binary__fprintf() [all …]
|
| A D | bpf-trace-summary.c | 157 printed += fprintf(fp, " %-15s", name); in print_common_stats() 216 printed += print_common_stats(data, fp); in print_thread_stat() 217 printed += fprintf(fp, "\n\n"); in print_thread_stat() 227 printed += print_thread_stat(data[i], fp); in print_thread_stats() 295 printed += print_common_stats(data[i], fp); in print_total_stats() 297 printed += fprintf(fp, "\n\n"); in print_total_stats() 354 printed += print_common_stats(data, fp); in print_cgroup_stat() 355 printed += fprintf(fp, "\n\n"); in print_cgroup_stat() 365 printed += print_cgroup_stat(data[i], fp); in print_cgroup_stats() 370 int trace_print_bpf_summary(FILE *fp) in trace_print_bpf_summary() argument [all …]
|
| A D | event.c | 207 ret += fprintf(fp, "\n\t\t "); in perf_event__fprintf_namespaces() 368 ret = fprintf(fp, " nr: "); in perf_event__fprintf_thread_map() 384 ret = fprintf(fp, ": "); in perf_event__fprintf_cpu_map() 387 ret += cpu_map__fprintf(cpus, fp); in perf_event__fprintf_cpu_map() 485 return fprintf(fp, " %s\n", in_out); in perf_event__fprintf_switch() 527 void *extra, FILE *fp) in text_poke_printer() argument 535 return fprintf(fp, " %02x", val); in text_poke_printer() 537 return fprintf(fp, "\n"); in text_poke_printer() 566 &old, fp); in perf_event__fprintf_text_poke() 569 text_poke_printer, &old, fp); in perf_event__fprintf_text_poke() [all …]
|
| A D | print_insn.c | 25 printed += fprintf(fp, "%02x", (unsigned char)sample->insn[i]); in sample__fprintf_insn_raw() 27 printed += fprintf(fp, " "); in sample__fprintf_insn_raw() 85 int print_opts, FILE *fp) in print_insn_x86() argument 96 printed += fprintf(fp, "%s ", insn[0].mnemonic); in print_insn_x86() 97 printed += symbol__fprintf_symname_offs(al.sym, &al, fp); in print_insn_x86() 99 printed += fprintf(fp, " [%#" PRIx64 "]", op->imm); in print_insn_x86() 124 uint64_t ip, int *lenp, int print_opts, FILE *fp) in fprintf_insn_asm() argument 155 struct machine *machine, FILE *fp, in sample__fprintf_insn_asm() argument 163 sample->ip, NULL, 0, fp); in sample__fprintf_insn_asm() 165 return sample__fprintf_insn_raw(sample, fp); in sample__fprintf_insn_asm() [all …]
|
| A D | evswitch.c | 34 static int evswitch__fprintf_enoent(FILE *fp, const char *evtype, const char *evname) in evswitch__fprintf_enoent() argument 36 int printed = fprintf(fp, "ERROR: switch-%s event not found (%s)\n", evtype, evname); in evswitch__fprintf_enoent() 38 return printed += fprintf(fp, "HINT: use 'perf evlist' to see the available event names\n"); in evswitch__fprintf_enoent() 41 int evswitch__init(struct evswitch *evswitch, struct evlist *evlist, FILE *fp) in evswitch__init() argument 46 evswitch__fprintf_enoent(fp, "on", evswitch->on_name); in evswitch__init() 55 evswitch__fprintf_enoent(fp, "off", evswitch->off_name); in evswitch__init()
|
| A D | color.c | 39 static int __color_vfprintf(FILE *fp, const char *color, const char *fmt, in __color_vfprintf() argument 48 if (isatty(fileno(fp)) || pager_in_use()) in __color_vfprintf() 55 fprintf(fp, "%s", color); in __color_vfprintf() 56 r += vfprintf(fp, fmt, args); in __color_vfprintf() 58 fprintf(fp, "%s", PERF_COLOR_RESET); in __color_vfprintf() 68 int color_vfprintf(FILE *fp, const char *color, const char *fmt, va_list args) in color_vfprintf() argument 70 return __color_vfprintf(fp, color, fmt, args); in color_vfprintf() 85 int color_fprintf(FILE *fp, const char *color, const char *fmt, ...) in color_fprintf() argument 91 r = color_vfprintf(fp, color, fmt, args); in color_fprintf() 114 int percent_color_fprintf(FILE *fp, const char *fmt, double percent) in percent_color_fprintf() argument [all …]
|
| A D | event.h | 359 size_t perf_event__fprintf_comm(union perf_event *event, FILE *fp); 360 size_t perf_event__fprintf_mmap(union perf_event *event, FILE *fp); 361 size_t perf_event__fprintf_mmap2(union perf_event *event, FILE *fp); 362 size_t perf_event__fprintf_task(union perf_event *event, FILE *fp); 363 size_t perf_event__fprintf_aux(union perf_event *event, FILE *fp); 366 size_t perf_event__fprintf_switch(union perf_event *event, FILE *fp); 367 size_t perf_event__fprintf_thread_map(union perf_event *event, FILE *fp); 368 size_t perf_event__fprintf_cpu_map(union perf_event *event, FILE *fp); 370 size_t perf_event__fprintf_cgroup(union perf_event *event, FILE *fp); 371 size_t perf_event__fprintf_ksymbol(union perf_event *event, FILE *fp); [all …]
|
| A D | branch.c | 112 void branch_type_stat_display(FILE *fp, const struct branch_type_stat *st) in branch_type_stat_display() argument 123 fprintf(fp, "\n#"); in branch_type_stat_display() 124 fprintf(fp, "\n# Branch Statistics:"); in branch_type_stat_display() 125 fprintf(fp, "\n#"); in branch_type_stat_display() 128 fprintf(fp, "\n%8s: %5.1f%%", in branch_type_stat_display() 134 fprintf(fp, "\n%8s: %5.1f%%", in branch_type_stat_display() 140 fprintf(fp, "\n%8s: %5.1f%%", in branch_type_stat_display() 146 fprintf(fp, "\n%8s: %5.1f%%", in branch_type_stat_display() 153 fprintf(fp, "\n%8s: %5.1f%%", in branch_type_stat_display() 161 fprintf(fp, "\n%8s: %5.1f%%", in branch_type_stat_display()
|
| /tools/perf/ |
| A D | builtin-list.c | 36 FILE *fp; member 128 FILE *fp = print_state->fp; in default_print_event() local 210 FILE *fp = print_state->fp; in default_print_metric() local 287 FILE *fp; member 295 FILE *fp = print_state->fp; in json_print_start() local 303 FILE *fp = print_state->fp; in json_print_end() local 373 FILE *fp = print_state->fp; in json_print_event() local 449 FILE *fp = print_state->fp; in json_print_metric() local 521 .fp = stdout, in cmd_list() 525 .fp = stdout, in cmd_list() [all …]
|
| A D | builtin-script.c | 341 FILE *fp; member 376 fclose(es->fp); in evsel_script__delete() 377 es->fp = NULL; in evsel_script__delete() 1225 FILE *fp) in any_dump_insn() argument 2075 FILE *fp; member 2121 .fp = fp, in perf_sample__fprint_metric() 2197 FILE *fp = es->fp; in process_event() local 2326 fflush(fp); in process_event() 3270 FILE *fp; in read_script_info() local 3273 if (!fp) in read_script_info() [all …]
|
| /tools/perf/ui/stdio/ |
| A D | hist.c | 91 fputs(str, fp); in ipchain__fprintf_graph() 92 fputc('\n', fp); in ipchain__fprintf_graph() 387 FILE *fp) in hist_entry_callchain__fprintf() argument 464 FILE *fp) in hist_entry__hierarchy_fprintf() argument 544 FILE *fp) in hist_entry__block_fprintf() argument 568 FILE *fp) in hist_entry__individual_block_fprintf() argument 697 fprintf(fp, "# "); in hists__fprintf_hierarchy_headers() 772 FILE *fp) in hists__fprintf_standard_headers() argument 794 fprintf(fp, "# "); in hists__fprintf_standard_headers() 812 fprintf(fp, "\n"); in hists__fprintf_standard_headers() [all …]
|
| /tools/testing/selftests/resctrl/ |
| A D | resctrlfs.c | 136 FILE *fp; in get_domain_id() local 145 if (!fp) { in get_domain_id() 156 fclose(fp); in get_domain_id() 169 if (!fp) in count_sys_bitmap_bits() 190 fclose(fp); in count_sys_bitmap_bits() 198 FILE *fp; in cpus_offline_empty() local 201 if (!fp) { in cpus_offline_empty() 265 FILE *fp; in get_cache_size() local 274 if (!fp) { in get_cache_size() 333 FILE *fp; in get_bit_mask() local [all …]
|
| A D | cache.c | 76 FILE *fp; in get_llc_occu_resctrl() local 78 fp = fopen(llc_occup_path, "r"); in get_llc_occu_resctrl() 79 if (!fp) { in get_llc_occu_resctrl() 84 if (fscanf(fp, "%lu", llc_occupancy) <= 0) { in get_llc_occu_resctrl() 86 fclose(fp); in get_llc_occu_resctrl() 90 fclose(fp); in get_llc_occu_resctrl() 106 FILE *fp; in print_results_cache() local 111 fp = fopen(filename, "a"); in print_results_cache() 112 if (!fp) { in print_results_cache() 117 fprintf(fp, "Pid: %d \t llc_value: %llu\n", (int)bm_pid, llc_value); in print_results_cache() [all …]
|
| A D | resctrl_val.c | 117 FILE *fp; in read_from_imc_dir() local 122 if (!fp) { in read_from_imc_dir() 129 fclose(fp); in read_from_imc_dir() 133 fclose(fp); in read_from_imc_dir() 138 if (!fp) { in read_from_imc_dir() 145 fclose(fp); in read_from_imc_dir() 149 fclose(fp); in read_from_imc_dir() 355 FILE *fp; in open_mem_bw_resctrl() local 358 if (!fp) in open_mem_bw_resctrl() 361 return fp; in open_mem_bw_resctrl() [all …]
|
| /tools/perf/jvmti/ |
| A D | jvmti_agent.c | 251 FILE *fp; in jvmti_open() local 297 if (!fp) { in jvmti_open() 324 return fp; in jvmti_open() 326 fclose(fp); in jvmti_open() 336 if (!fp) { in jvmti_close() 349 fclose(fp); in jvmti_close() 351 fp = NULL; in jvmti_close() 372 if (!fp) { in jvmti_write_code() 396 flockfile(fp); in jvmti_write_code() 433 if (!fp) { in jvmti_write_debug_info() [all …]
|
| /tools/testing/selftests/acct/ |
| A D | acct_syscall.c | 17 FILE *fp; in main() local 32 fp = fopen(filename, "w"); in main() 34 if (!fp) { in main() 45 fclose(fp); in main() 60 fseek(fp, 0L, SEEK_END); in main() 61 sz = ftell(fp); in main() 72 fclose(fp); in main()
|
| /tools/bpf/ |
| A D | bpf_asm.c | 26 extern void bpf_asm_compile(FILE *fp, bool cstyle); 30 FILE *fp = stdin; in main() local 40 fp = fopen(argv[i], "r"); in main() 41 if (!fp) { in main() 42 fp = stdin; in main() 49 bpf_asm_compile(fp, cstyle); in main()
|
| /tools/testing/selftests/bpf/prog_tests/ |
| A D | arg_parsing.c | 120 FILE *fp; in test_parse_test_list_file() local 128 fp = fdopen(fd, "w"); in test_parse_test_list_file() 129 if (!ASSERT_NEQ(fp, NULL, "fdopen tmp")) { in test_parse_test_list_file() 134 fprintf(fp, "# comment\n"); in test_parse_test_list_file() 135 fprintf(fp, " test_with_spaces \n"); in test_parse_test_list_file() 138 fprintf(fp, "testB # duplicate\n"); in test_parse_test_list_file() 140 fprintf(fp, "testA/subtest2\n"); in test_parse_test_list_file() 141 fprintf(fp, "testC_no_eof_newline"); in test_parse_test_list_file() 142 fflush(fp); in test_parse_test_list_file() 144 if (!ASSERT_OK(ferror(fp), "prepare tmp")) in test_parse_test_list_file() [all …]
|
| A D | kmem_cache_iter.c | 32 FILE *fp; in subtest_kmem_cache_iter_check_slabinfo() local 40 fp = fopen("/proc/slabinfo", "r"); in subtest_kmem_cache_iter_check_slabinfo() 41 if (fp == NULL) { in subtest_kmem_cache_iter_check_slabinfo() 49 fscanf(fp, "slabinfo - version: %*d.%*d\n"); in subtest_kmem_cache_iter_check_slabinfo() 50 fscanf(fp, "# %*s %*s %*s %*s %*s %*s : %[^\n]\n", rest_of_line); in subtest_kmem_cache_iter_check_slabinfo() 53 while (fscanf(fp, "%s %*u %*u %lu %*u %*u : %[^\n]\n", in subtest_kmem_cache_iter_check_slabinfo() 68 fclose(fp); in subtest_kmem_cache_iter_check_slabinfo()
|
| /tools/testing/selftests/lsm/ |
| A D | common.c | 55 FILE *fp; in read_sysfs_lsms() local 58 fp = fopen("/sys/kernel/security/lsm", "r"); in read_sysfs_lsms() 59 if (fp == NULL) in read_sysfs_lsms() 61 red = fread(lsms, 1, size, fp); in read_sysfs_lsms() 62 fclose(fp); in read_sysfs_lsms()
|
| /tools/testing/selftests/arm64/fp/ |
| A D | Makefile | 9 fp-ptrace \ 10 fp-stress \ 14 TEST_GEN_PROGS_EXTENDED := fp-pidbench fpsimd-test \ 28 $(OUTPUT)/fp-pidbench: fp-pidbench.S $(OUTPUT)/asm-utils.o 30 $(OUTPUT)/fp-ptrace: fp-ptrace.c fp-ptrace-asm.S
|
| /tools/lib/api/fs/ |
| A D | cgroup.c | 21 FILE *fp; in cgroupfs_find_mountpoint() local 35 fp = fopen("/proc/mounts", "r"); in cgroupfs_find_mountpoint() 36 if (!fp) in cgroupfs_find_mountpoint() 53 while (getline(&line, &len, fp) != -1) { in cgroupfs_find_mountpoint() 92 fclose(fp); in cgroupfs_find_mountpoint()
|