/tools/cgroup/ |
D | iocost_coef_gen.py | 62 devname = subprocess.run(f'findmnt -nvo SOURCE -T{path}', 70 rdev = os.stat(f'/dev/{devname}').st_rdev 71 return (devname, f'{os.major(rdev)}:{os.minor(rdev)}') 79 info(f'Creating testfile {path}') 80 subprocess.check_call(f'rm -f {path}', shell=True) 81 subprocess.check_call(f'touch {path}', shell=True) 82 subprocess.call(f'chattr +C {path}', shell=True) 84 f'pv -s {size} -pr /dev/urandom {"-q" if args.quiet else ""} | ' 85 f'dd of={path} count={size} ' 86 f'iflag=count_bytes,fullblock oflag=direct bs=16M status=none', [all …]
|
/tools/perf/util/intel-pt-decoder/ |
D | intel-pt-log.c | 21 static FILE *f; variable 27 return f; in intel_pt_log_fp() 37 if (f) in intel_pt_log_disable() 38 fflush(f); in intel_pt_log_disable() 54 fprintf(f, " "); in intel_pt_print_data() 56 fprintf(f, " %08" PRIx64 ": ", pos); in intel_pt_print_data() 58 fprintf(f, " %02x", buf[i]); in intel_pt_print_data() 60 fprintf(f, " "); in intel_pt_print_data() 61 fprintf(f, " "); in intel_pt_print_data() 69 fprintf(f, " "); in intel_pt_print_no_data() [all …]
|
/tools/testing/selftests/powerpc/pmu/ebb/ |
D | busy_loop.S | 94 bne 1f 96 bne 1f 98 bne 1f 100 bne 1f 102 bne 1f 104 bne 1f 106 bne 1f 108 bne 1f 110 bne 1f 112 bne 1f [all …]
|
/tools/testing/selftests/rseq/ |
D | rseq-arm.h | 156 RSEQ_ASM_DEFINE_TABLE(9, 1f, 2f, 4f) /* start, commit, abort */ in rseq_cmpeqv_storev() 157 RSEQ_ASM_DEFINE_EXIT_POINT(1f, %l[cmpfail]) in rseq_cmpeqv_storev() 159 RSEQ_ASM_DEFINE_EXIT_POINT(1f, %l[error1]) in rseq_cmpeqv_storev() 160 RSEQ_ASM_DEFINE_EXIT_POINT(1f, %l[error2]) in rseq_cmpeqv_storev() 163 RSEQ_ASM_STORE_RSEQ_CS(1, 3f, rseq_cs) in rseq_cmpeqv_storev() 164 RSEQ_ASM_CMP_CPU_ID(cpu_id, current_cpu_id, 4f) in rseq_cmpeqv_storev() 181 RSEQ_ASM_DEFINE_ABORT(3, 4, "", abort, 1b, 2b, 4f) in rseq_cmpeqv_storev() 224 RSEQ_ASM_DEFINE_TABLE(9, 1f, 2f, 4f) /* start, commit, abort */ in rseq_cmpnev_storeoffp_load() 225 RSEQ_ASM_DEFINE_EXIT_POINT(1f, %l[cmpfail]) in rseq_cmpnev_storeoffp_load() 227 RSEQ_ASM_DEFINE_EXIT_POINT(1f, %l[error1]) in rseq_cmpnev_storeoffp_load() [all …]
|
D | rseq-mips.h | 163 RSEQ_ASM_DEFINE_TABLE(9, 1f, 2f, 4f) /* start, commit, abort */ in rseq_cmpeqv_storev() 164 RSEQ_ASM_DEFINE_EXIT_POINT(1f, %l[cmpfail]) in rseq_cmpeqv_storev() 166 RSEQ_ASM_DEFINE_EXIT_POINT(1f, %l[error1]) in rseq_cmpeqv_storev() 167 RSEQ_ASM_DEFINE_EXIT_POINT(1f, %l[error2]) in rseq_cmpeqv_storev() 170 RSEQ_ASM_STORE_RSEQ_CS(1, 3f, rseq_cs) in rseq_cmpeqv_storev() 171 RSEQ_ASM_CMP_CPU_ID(cpu_id, current_cpu_id, 4f) in rseq_cmpeqv_storev() 186 RSEQ_ASM_DEFINE_ABORT(3, 4, "", abort, 1b, 2b, 4f) in rseq_cmpeqv_storev() 224 RSEQ_ASM_DEFINE_TABLE(9, 1f, 2f, 4f) /* start, commit, abort */ in rseq_cmpnev_storeoffp_load() 225 RSEQ_ASM_DEFINE_EXIT_POINT(1f, %l[cmpfail]) in rseq_cmpnev_storeoffp_load() 227 RSEQ_ASM_DEFINE_EXIT_POINT(1f, %l[error1]) in rseq_cmpnev_storeoffp_load() [all …]
|
D | rseq-x86.h | 121 RSEQ_ASM_DEFINE_TABLE(3, 1f, 2f, 4f) /* start, commit, abort */ in rseq_cmpeqv_storev() 122 RSEQ_ASM_DEFINE_EXIT_POINT(1f, %l[cmpfail]) in rseq_cmpeqv_storev() 124 RSEQ_ASM_DEFINE_EXIT_POINT(1f, %l[error1]) in rseq_cmpeqv_storev() 125 RSEQ_ASM_DEFINE_EXIT_POINT(1f, %l[error2]) in rseq_cmpeqv_storev() 129 RSEQ_ASM_CMP_CPU_ID(cpu_id, RSEQ_ASM_TP_SEGMENT:RSEQ_CPU_ID_OFFSET(%[rseq_offset]), 4f) in rseq_cmpeqv_storev() 187 RSEQ_ASM_DEFINE_TABLE(3, 1f, 2f, 4f) /* start, commit, abort */ in rseq_cmpnev_storeoffp_load() 188 RSEQ_ASM_DEFINE_EXIT_POINT(1f, %l[cmpfail]) in rseq_cmpnev_storeoffp_load() 190 RSEQ_ASM_DEFINE_EXIT_POINT(1f, %l[error1]) in rseq_cmpnev_storeoffp_load() 191 RSEQ_ASM_DEFINE_EXIT_POINT(1f, %l[error2]) in rseq_cmpnev_storeoffp_load() 195 RSEQ_ASM_CMP_CPU_ID(cpu_id, RSEQ_ASM_TP_SEGMENT:RSEQ_CPU_ID_OFFSET(%[rseq_offset]), 4f) in rseq_cmpnev_storeoffp_load() [all …]
|
D | rseq-s390.h | 143 RSEQ_ASM_DEFINE_TABLE(3, 1f, 2f, 4f) /* start, commit, abort */ in rseq_cmpeqv_storev() 144 RSEQ_ASM_DEFINE_EXIT_POINT(1f, %l[cmpfail]) in rseq_cmpeqv_storev() 146 RSEQ_ASM_DEFINE_EXIT_POINT(1f, %l[error1]) in rseq_cmpeqv_storev() 147 RSEQ_ASM_DEFINE_EXIT_POINT(1f, %l[error2]) in rseq_cmpeqv_storev() 151 RSEQ_ASM_CMP_CPU_ID(cpu_id, current_cpu_id, 4f) in rseq_cmpeqv_storev() 211 RSEQ_ASM_DEFINE_TABLE(3, 1f, 2f, 4f) /* start, commit, abort */ in rseq_cmpnev_storeoffp_load() 212 RSEQ_ASM_DEFINE_EXIT_POINT(1f, %l[cmpfail]) in rseq_cmpnev_storeoffp_load() 214 RSEQ_ASM_DEFINE_EXIT_POINT(1f, %l[error1]) in rseq_cmpnev_storeoffp_load() 215 RSEQ_ASM_DEFINE_EXIT_POINT(1f, %l[error2]) in rseq_cmpnev_storeoffp_load() 219 RSEQ_ASM_CMP_CPU_ID(cpu_id, current_cpu_id, 4f) in rseq_cmpnev_storeoffp_load() [all …]
|
D | rseq-ppc.h | 218 RSEQ_ASM_DEFINE_TABLE(3, 1f, 2f, 4f) /* start, commit, abort */ in rseq_cmpeqv_storev() 219 RSEQ_ASM_DEFINE_EXIT_POINT(1f, %l[cmpfail]) in rseq_cmpeqv_storev() 221 RSEQ_ASM_DEFINE_EXIT_POINT(1f, %l[error1]) in rseq_cmpeqv_storev() 222 RSEQ_ASM_DEFINE_EXIT_POINT(1f, %l[error2]) in rseq_cmpeqv_storev() 227 RSEQ_ASM_CMP_CPU_ID(cpu_id, current_cpu_id, 4f) in rseq_cmpeqv_storev() 283 RSEQ_ASM_DEFINE_TABLE(3, 1f, 2f, 4f) /* start, commit, abort */ in rseq_cmpnev_storeoffp_load() 284 RSEQ_ASM_DEFINE_EXIT_POINT(1f, %l[cmpfail]) in rseq_cmpnev_storeoffp_load() 286 RSEQ_ASM_DEFINE_EXIT_POINT(1f, %l[error1]) in rseq_cmpnev_storeoffp_load() 287 RSEQ_ASM_DEFINE_EXIT_POINT(1f, %l[error2]) in rseq_cmpnev_storeoffp_load() 292 RSEQ_ASM_CMP_CPU_ID(cpu_id, current_cpu_id, 4f) in rseq_cmpnev_storeoffp_load() [all …]
|
D | rseq-arm64.h | 213 RSEQ_ASM_DEFINE_TABLE(1, 2f, 3f, 4f) in rseq_cmpeqv_storev() 214 RSEQ_ASM_DEFINE_EXIT_POINT(2f, %l[cmpfail]) in rseq_cmpeqv_storev() 216 RSEQ_ASM_DEFINE_EXIT_POINT(2f, %l[error1]) in rseq_cmpeqv_storev() 217 RSEQ_ASM_DEFINE_EXIT_POINT(2f, %l[error2]) in rseq_cmpeqv_storev() 220 RSEQ_ASM_CMP_CPU_ID(cpu_id, current_cpu_id, 4f) in rseq_cmpeqv_storev() 271 RSEQ_ASM_DEFINE_TABLE(1, 2f, 3f, 4f) in rseq_cmpnev_storeoffp_load() 272 RSEQ_ASM_DEFINE_EXIT_POINT(2f, %l[cmpfail]) in rseq_cmpnev_storeoffp_load() 274 RSEQ_ASM_DEFINE_EXIT_POINT(2f, %l[error1]) in rseq_cmpnev_storeoffp_load() 275 RSEQ_ASM_DEFINE_EXIT_POINT(2f, %l[error2]) in rseq_cmpnev_storeoffp_load() 278 RSEQ_ASM_CMP_CPU_ID(cpu_id, current_cpu_id, 4f) in rseq_cmpnev_storeoffp_load() [all …]
|
/tools/testing/selftests/powerpc/switch_endian/ |
D | check.S | 15 bne 1f 18 bne 1f 25 bne 1f 29 bne 1f 32 bne 1f 35 bne 1f 38 bne 1f 41 bne 1f 44 bne 1f 47 bne 1f [all …]
|
/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/ |
D | workqueues.h | 76 #define INIT_WORK(w, f) \ argument 79 (w)->func = (f); \ 82 #define INIT_DELAYED_WORK(w, f) INIT_WORK(&(w)->work, (f)) argument 84 #define __WORK_INITIALIZER(n, f) { \ argument 87 .func = f \ 91 #define __DELAYED_WORK_INITIALIZER(n, f, tflags) { \ argument 92 .work = __WORK_INITIALIZER((n).work, (f)), \ 95 #define DECLARE_WORK(n, f) \ argument 98 #define DECLARE_DELAYED_WORK(n, f) \ argument 99 struct delayed_work n = __DELAYED_WORK_INITIALIZER(n, f, 0)
|
/tools/lib/subcmd/ |
D | sigchain.c | 21 static int sigchain_push(int sig, sigchain_fun f) in sigchain_push() argument 27 s->old[s->n] = signal(sig, f); in sigchain_push() 47 void sigchain_push_common(sigchain_fun f) in sigchain_push_common() argument 49 sigchain_push(SIGINT, f); in sigchain_push_common() 50 sigchain_push(SIGHUP, f); in sigchain_push_common() 51 sigchain_push(SIGTERM, f); in sigchain_push_common() 52 sigchain_push(SIGQUIT, f); in sigchain_push_common() 53 sigchain_push(SIGPIPE, f); in sigchain_push_common()
|
/tools/testing/selftests/powerpc/math/ |
D | fpu_asm.S | 14 bne cr1,1f 17 bne cr1,1f 20 bne cr1,1f 23 bne cr1,1f 26 bne cr1,1f 29 bne cr1,1f 32 bne cr1,1f 35 bne cr1,1f 38 bne cr1,1f 41 bne cr1,1f [all …]
|
D | fpu_denormal.c | 20 volatile float f; in test_denormal_fpu() local 26 memcpy((float *)&f, &m32, sizeof(f)); in test_denormal_fpu() 27 d = f; in test_denormal_fpu()
|
/tools/wmi/ |
D | dell-smbios-example.c | 58 FILE *f; in find_token() local 66 f = fopen(value_sysfs, "rb"); in find_token() 67 if (!f) { in find_token() 71 fread(buf, 1, 4096, f); in find_token() 72 fclose(f); in find_token() 80 f = fopen(location_sysfs, "rb"); in find_token() 81 if (!f) { in find_token() 85 fread(buf, 1, 4096, f); in find_token() 86 fclose(f); in find_token() 145 FILE *f; in query_buffer_size() local [all …]
|
/tools/hv/ |
D | lsvmbus | 48 f = open('%s/%s/%s' % (vmbus_sys_path, dev_name, attr), 'r') 49 lines = f.readlines() 50 f.close() 63 for f in os.listdir(vmbus_sys_path): 64 vmbus_id = get_vmbus_dev_attr(f, 'id')[0].strip() 65 class_id = get_vmbus_dev_attr(f, 'class_id')[0].strip() 66 device_id = get_vmbus_dev_attr(f, 'device_id')[0].strip() 69 chn_vp_mapping = get_vmbus_dev_attr(f, 'channel_vp_mapping') 79 d.sysfs_path = '%s/%s' % (vmbus_sys_path, f)
|
/tools/testing/selftests/bpf/ |
D | trace_helpers.c | 27 FILE *f = fopen("/proc/kallsyms", "r"); in load_kallsyms() local 33 if (!f) in load_kallsyms() 36 while (fgets(buf, sizeof(buf), f)) { in load_kallsyms() 45 fclose(f); in load_kallsyms() 101 FILE *f; in kallsyms_find() local 103 f = fopen("/proc/kallsyms", "r"); in kallsyms_find() 104 if (!f) in kallsyms_find() 107 while (fscanf(f, "%llx %c %499s%*[^\n]\n", &value, &type, name) > 0) { in kallsyms_find() 116 fclose(f); in kallsyms_find()
|
/tools/testing/selftests/arm64/mte/ |
D | check_ksm_options.c | 28 FILE *f; in read_sysfs() local 31 f = fopen(str, "r"); in read_sysfs() 32 if (!f) { in read_sysfs() 36 fscanf(f, "%lu", &val); in read_sysfs() 37 fclose(f); in read_sysfs() 43 FILE *f; in write_sysfs() local 45 f = fopen(str, "w"); in write_sysfs() 46 if (!f) { in write_sysfs() 50 fprintf(f, "%lu", val); in write_sysfs() 51 fclose(f); in write_sysfs()
|
/tools/testing/selftests/bpf/progs/ |
D | test_sockmap_kern.h | 97 int *f, two = 2; in bpf_prog1() local 99 f = bpf_map_lookup_elem(&sock_skb_opts, &two); in bpf_prog1() 100 if (f && *f) { in bpf_prog1() 101 return *f; in bpf_prog1() 111 int len, *f, ret, zero = 0; in bpf_prog2() local 120 f = bpf_map_lookup_elem(&sock_skb_opts, &zero); in bpf_prog2() 121 if (f && *f) { in bpf_prog2() 123 flags = *f; in bpf_prog2() 153 int err, *f, ret = SK_PASS; in bpf_prog3() local 156 f = bpf_map_lookup_elem(&sock_skb_opts, &one); in bpf_prog3() [all …]
|
/tools/perf/util/ |
D | spark.c | 17 unsigned long min = ULONG_MAX, max = 0, f; in print_spark() local 25 f = ((max - min) << SPARK_SHIFT) / (NUM_SPARKS - 1); in print_spark() 26 if (f < 1) in print_spark() 27 f = 1; in print_spark() 30 ticks[((val[i] - min) << SPARK_SHIFT) / f]); in print_spark()
|
/tools/testing/selftests/powerpc/mm/ |
D | tlbie_test.c | 262 FILE *f; in start_verification_log() local 273 f = fopen(path, "w"); in start_verification_log() 275 if (!f) { in start_verification_log() 279 fp[tid] = f; in start_verification_log() 281 fprintf(f, "----------------------------------------------------------\n"); in start_verification_log() 282 fprintf(f, "PID = %d\n", rim_process_pid); in start_verification_log() 283 fprintf(f, "Thread id = %02d\n", tid); in start_verification_log() 284 fprintf(f, "Chunk Start Addr = 0x%016lx\n", (unsigned long)chunk_start); in start_verification_log() 285 fprintf(f, "Chunk Size = %d\n", size); in start_verification_log() 286 fprintf(f, "Next Store Addr = 0x%016lx\n", (unsigned long)addr); in start_verification_log() [all …]
|
/tools/testing/selftests/powerpc/pmu/ |
D | lib.c | 156 FILE *f; in parse_proc_maps() local 159 f = fopen("/proc/self/maps", "r"); in parse_proc_maps() 160 if (!f) { in parse_proc_maps() 167 rc = fscanf(f, "%lx-%lx %*c%*c%c%*c %*x %*d:%*d %*d %127s\n", in parse_proc_maps() 184 fclose(f); in parse_proc_maps() 195 FILE *f; in require_paranoia_below() local 200 f = fopen(PARANOID_PATH, "r"); in require_paranoia_below() 201 if (!f) { in require_paranoia_below() 206 if (!fgets(buf, sizeof(buf), f)) { in require_paranoia_below() 223 fclose(f); in require_paranoia_below()
|
/tools/perf/scripts/python/ |
D | mem-phys-addr.py | 24 f = None variable 31 global f 32 f = open('/proc/iomem', 'r') 33 for i, j in enumerate(f): 60 f.close() 85 f.seek(0, 0) 86 for j in f:
|
/tools/testing/selftests/memfd/ |
D | common.c | 24 FILE *f = fopen("/proc/meminfo", "r"); in default_huge_page_size() local 26 if (!f) in default_huge_page_size() 28 while (getline(&line, &linelen, f) > 0) { in default_huge_page_size() 36 fclose(f); in default_huge_page_size()
|
/tools/bpf/ |
D | bpf_dbg.c | 216 static void bpf_disasm(const struct sock_filter f, unsigned int i) in bpf_disasm() argument 219 int val = f.k; in bpf_disasm() 222 switch (f.code) { in bpf_disasm() 302 val = i + 1 + f.k; in bpf_disasm() 423 val = f.code; in bpf_disasm() 431 if ((BPF_CLASS(f.code) == BPF_JMP && BPF_OP(f.code) != BPF_JA)) in bpf_disasm() 433 i + 1 + f.jt, i + 1 + f.jf); in bpf_disasm() 438 static void bpf_dump_curr(struct bpf_regs *r, struct sock_filter *f) in bpf_dump_curr() argument 444 f->code, f->jt, f->jf, f->k); in bpf_dump_curr() 446 bpf_disasm(*f, r->Pc); in bpf_dump_curr() [all …]
|