Home
last modified time | relevance | path

Searched refs:st (Results 1 – 25 of 73) sorted by relevance

123

/tools/perf/util/
Dbranch.c18 void branch_type_count(struct branch_type_stat *st, struct branch_flags *flags, in branch_type_count() argument
24 st->counts[flags->type]++; in branch_type_count()
28 st->cond_fwd++; in branch_type_count()
30 st->cond_bwd++; in branch_type_count()
34 st->cross_2m++; in branch_type_count()
36 st->cross_4k++; in branch_type_count()
61 void branch_type_stat_display(FILE *fp, struct branch_type_stat *st) in branch_type_stat_display() argument
67 total += st->counts[i]; in branch_type_stat_display()
76 if (st->cond_fwd > 0) { in branch_type_stat_display()
79 100.0 * (double)st->cond_fwd / (double)total); in branch_type_stat_display()
[all …]
Dstat-shadow.c103 struct runtime_stat *st) in saved_value_lookup() argument
112 .stat = st, in saved_value_lookup()
115 rblist = &st->value_list; in saved_value_lookup()
129 void runtime_stat__init(struct runtime_stat *st) in runtime_stat__init() argument
131 struct rblist *rblist = &st->value_list; in runtime_stat__init()
139 void runtime_stat__exit(struct runtime_stat *st) in runtime_stat__exit() argument
141 rblist__exit(&st->value_list); in runtime_stat__exit()
167 static void reset_stat(struct runtime_stat *st) in reset_stat() argument
172 rblist = &st->value_list; in reset_stat()
189 void perf_stat__reset_shadow_per_stat(struct runtime_stat *st) in perf_stat__reset_shadow_per_stat() argument
[all …]
Dpath.c75 struct stat st; in is_regular_file() local
77 if (stat(file, &st)) in is_regular_file()
80 return S_ISREG(st.st_mode); in is_regular_file()
87 struct stat st; in is_directory() local
90 if (stat(path, &st)) in is_directory()
93 return S_ISDIR(st.st_mode); in is_directory()
Ddata.c93 struct stat st; in perf_data__open_dir() local
96 if (stat(path, &st)) in perf_data__open_dir()
99 if (!S_ISREG(st.st_mode) || strncmp(dent->d_name, "data", 4)) in perf_data__open_dir()
120 file->size = st.st_size; in perf_data__open_dir()
146 struct stat st; in perf_data__update_dir() local
148 if (fstat(file->fd, &st)) in perf_data__update_dir()
151 file->size = st.st_size; in perf_data__update_dir()
159 struct stat st; in check_pipe() local
165 if (!fstat(fd, &st) && S_ISFIFO(st.st_mode)) in check_pipe()
180 struct stat st; in check_backup() local
[all …]
Dbranch.h54 void branch_type_count(struct branch_type_stat *st, struct branch_flags *flags,
58 void branch_type_stat_display(FILE *fp, struct branch_type_stat *st);
59 int branch_type_str(struct branch_type_stat *st, char *bf, int bfsize);
Dstat.c409 struct perf_record_stat *st = &event->stat; in perf_event__process_stat_event() local
412 count.val = st->val; in perf_event__process_stat_event()
413 count.ena = st->ena; in perf_event__process_stat_event()
414 count.run = st->run; in perf_event__process_stat_event()
416 counter = perf_evlist__id2evsel(session->evlist, st->id); in perf_event__process_stat_event()
422 *perf_counts(counter->counts, st->cpu, st->thread) = count; in perf_event__process_stat_event()
429 struct perf_record_stat *st = (struct perf_record_stat *)event; in perf_event__fprintf_stat() local
433 st->id, st->cpu, st->thread); in perf_event__fprintf_stat()
435 st->val, st->ena, st->run); in perf_event__fprintf_stat()
Dtrace-event-info.c91 struct stat st; in record_header_files() local
99 if (stat(path, &st) < 0) { in record_header_files()
123 if (stat(path, &st) < 0) { in record_header_files()
164 struct stat st; in copy_event_system() local
185 ret = stat(format, &st); in copy_event_system()
207 ret = stat(format, &st); in copy_event_system()
256 struct stat st; in record_event_files() local
301 ret = stat(sys, &st); in record_event_files()
338 struct stat st; in record_ftrace_printk() local
347 ret = stat(path, &st); in record_ftrace_printk()
[all …]
Dstat.h171 void runtime_stat__init(struct runtime_stat *st);
172 void runtime_stat__exit(struct runtime_stat *st);
175 void perf_stat__reset_shadow_per_stat(struct runtime_stat *st);
177 int cpu, struct runtime_stat *st);
190 struct runtime_stat *st);
Dcopyfile.c77 struct stat st; in copyfile_mode_ns() local
83 err = stat(from, &st); in copyfile_mode_ns()
104 if (st.st_size == 0) { /* /proc? do it slowly... */ in copyfile_mode_ns()
120 err = copyfile_offset(fromfd, 0, tofd, 0, st.st_size); in copyfile_mode_ns()
Djitdump.c394 struct stat st; in jit_repipe_code_load() local
449 if (stat(filename, &st)) in jit_repipe_code_load()
450 memset(&st, 0, sizeof(st)); in jit_repipe_code_load()
462 event->mmap2.ino = st.st_ino; in jit_repipe_code_load()
463 event->mmap2.maj = major(st.st_dev); in jit_repipe_code_load()
464 event->mmap2.min = minor(st.st_dev); in jit_repipe_code_load()
465 event->mmap2.prot = st.st_mode; in jit_repipe_code_load()
509 struct stat st; in jit_repipe_code_move() local
539 if (stat(filename, &st)) in jit_repipe_code_move()
540 memset(&st, 0, sizeof(st)); in jit_repipe_code_move()
[all …]
/tools/testing/vsock/
Dvsock_diag_test.c102 static void print_vsock_stat(FILE *fp, struct vsock_stat *st) in print_vsock_stat() argument
104 print_vsock_addr(fp, st->msg.vdiag_src_cid, st->msg.vdiag_src_port); in print_vsock_stat()
106 print_vsock_addr(fp, st->msg.vdiag_dst_cid, st->msg.vdiag_dst_port); in print_vsock_stat()
108 sock_type_str(st->msg.vdiag_type), in print_vsock_stat()
109 sock_state_str(st->msg.vdiag_state), in print_vsock_stat()
110 sock_shutdown_str(st->msg.vdiag_shutdown), in print_vsock_stat()
111 st->msg.vdiag_ino); in print_vsock_stat()
116 struct vsock_stat *st; in print_vsock_stats() local
118 list_for_each_entry(st, head, list) in print_vsock_stats()
119 print_vsock_stat(fp, st); in print_vsock_stats()
[all …]
/tools/testing/selftests/memfd/
Dfuse_mnt.c27 static int memfd_getattr(const char *path, struct stat *st) in memfd_getattr() argument
29 memset(st, 0, sizeof(*st)); in memfd_getattr()
32 st->st_mode = S_IFDIR | 0755; in memfd_getattr()
33 st->st_nlink = 2; in memfd_getattr()
35 st->st_mode = S_IFREG | 0444; in memfd_getattr()
36 st->st_nlink = 1; in memfd_getattr()
37 st->st_size = strlen(memfd_content); in memfd_getattr()
/tools/perf/
Dbuiltin-lock.c126 struct thread_stat *st; in thread_stat_find() local
130 st = container_of(node, struct thread_stat, rb); in thread_stat_find()
131 if (st->tid == tid) in thread_stat_find()
132 return st; in thread_stat_find()
133 else if (tid < st->tid) in thread_stat_find()
166 struct thread_stat *st; in thread_stat_findnew_after_first() local
168 st = thread_stat_find(tid); in thread_stat_findnew_after_first()
169 if (st) in thread_stat_findnew_after_first()
170 return st; in thread_stat_findnew_after_first()
172 st = zalloc(sizeof(struct thread_stat)); in thread_stat_findnew_after_first()
[all …]
Dbuiltin-stat.c404 struct stat st; in is_target_alive() local
416 if (!stat(path, &st)) in is_target_alive()
1046 static int perf_stat_init_aggr_mode_file(struct perf_stat *st) in perf_stat_init_aggr_mode_file() argument
1048 struct perf_env *env = &st->session->header.env; in perf_stat_init_aggr_mode_file()
1483 struct perf_stat *st = container_of(tool, struct perf_stat, tool); in process_stat_config_event() local
1487 if (perf_cpu_map__empty(st->cpus)) { in process_stat_config_event()
1488 if (st->aggr_mode != AGGR_UNSET) in process_stat_config_event()
1493 if (st->aggr_mode != AGGR_UNSET) in process_stat_config_event()
1494 stat_config.aggr_mode = st->aggr_mode; in process_stat_config_event()
1499 perf_stat_init_aggr_mode_file(st); in process_stat_config_event()
[all …]
/tools/perf/tests/
Dstat.c69 struct perf_record_stat *st = &event->stat; in process_stat_event() local
71 TEST_ASSERT_VAL("wrong cpu", st->cpu == 1); in process_stat_event()
72 TEST_ASSERT_VAL("wrong thread", st->thread == 2); in process_stat_event()
73 TEST_ASSERT_VAL("wrong id", st->id == 3); in process_stat_event()
74 TEST_ASSERT_VAL("wrong val", st->val == 100); in process_stat_event()
75 TEST_ASSERT_VAL("wrong run", st->ena == 200); in process_stat_event()
76 TEST_ASSERT_VAL("wrong ena", st->run == 300); in process_stat_event()
Dbuiltin-test.c458 struct stat st; in shell_tests__dir() local
459 if (!lstat(devel_dirs[i], &st)) { in shell_tests__dir()
461 if (!lstat(devel_dirs[i], &st)) in shell_tests__dir()
513 struct shell_test *st = test->priv; in shell_test__run() local
515 path__join(script, sizeof(script), st->dir, st->file); in shell_test__run()
529 struct shell_test st = { in run_shell_tests() local
533 if (st.dir == NULL) in run_shell_tests()
536 dir = opendir(st.dir); in run_shell_tests()
540 for_each_shell_test(dir, st.dir, ent) { in run_shell_tests()
544 .desc = shell_test__description(desc, sizeof(desc), st.dir, ent->d_name), in run_shell_tests()
[all …]
Dattr.c182 struct stat st; in test__attr() local
187 if (!lstat("./tests", &st)) in test__attr()
194 if (!lstat(path_dir, &st) && in test__attr()
195 !lstat(path_perf, &st)) in test__attr()
/tools/build/
Dfixdep.c123 struct stat st; in print_deps() local
133 if (fstat(fd, &st) < 0) { in print_deps()
138 if (st.st_size == 0) { in print_deps()
143 map = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); in print_deps()
150 parse_dep_file(map, st.st_size); in print_deps()
152 munmap(map, st.st_size); in print_deps()
/tools/testing/scatterlist/
Dmain.c57 struct sg_table st; in main() local
62 ret = __sg_alloc_table_from_pages(&st, pages, test->num_pages, in main()
70 assert(st.nents == test->expected_segments); in main()
71 assert(st.orig_nents == test->expected_segments); in main()
73 sg_free_table(&st); in main()
/tools/testing/selftests/proc/
Dfd-001-lookup.c35 struct stat st; in test_lookup_pass() local
38 memset(&st, 0, sizeof(struct stat)); in test_lookup_pass()
39 rv = lstat(pathname, &st); in test_lookup_pass()
41 assert(S_ISLNK(st.st_mode)); in test_lookup_pass()
46 struct stat st; in test_lookup_fail() local
49 rv = lstat(pathname, &st); in test_lookup_fail()
Dproc-pid-vm.c296 struct stat st; in main() local
297 if (fstat(exec_fd, &st) == -1) { in main()
307 MAJOR(st.st_dev), MINOR(st.st_dev), in main()
308 (unsigned long long)st.st_ino); in main()
311 "/tmp/#%llu (deleted)\n", (unsigned long long)st.st_ino); in main()
/tools/perf/pmu-events/
Djson.c47 struct stat st; in mapfile() local
59 err = fstat(fd, &st); in mapfile()
62 *size = st.st_size; in mapfile()
64 (st.st_size + ps - 1) & ~(ps - 1), in mapfile()
/tools/vm/
Dpage-types.c933 static void show_file(const char *name, const struct stat *st) in show_file() argument
935 unsigned long long size = st->st_size; in show_file()
940 name, (unsigned)st->st_ino, in show_file()
943 strftime(atime, sizeof(atime), "%c", localtime(&st->st_atime)); in show_file()
944 strftime(mtime, sizeof(mtime), "%c", localtime(&st->st_mtime)); in show_file()
947 mtime, now - st->st_mtime, in show_file()
948 atime, now - st->st_atime); in show_file()
968 static void walk_file(const char *name, const struct stat *st) in walk_file() argument
975 off_t off, end = st->st_size; in walk_file()
1038 show_file(name, st); in walk_file()
[all …]
Dpage_owner_sort.c93 struct stat st; in main() local
109 fstat(fileno(fin), &st); in main()
110 max_size = st.st_size / 100; /* hack ... */ in main()
/tools/io_uring/
Dio_uring-cp.c49 struct stat st; in get_file_size() local
51 if (fstat(fd, &st) < 0) in get_file_size()
53 if (S_ISREG(st.st_mode)) { in get_file_size()
54 *size = st.st_size; in get_file_size()
56 } else if (S_ISBLK(st.st_mode)) { in get_file_size()

123