/Linux-v6.1/drivers/isdn/mISDN/ |
D | dsp_audio.c | 105 static unsigned char linear2ulaw(short sample) in linear2ulaw() argument 128 sign = (sample >> 8) & 0x80; /* set aside the sign */ in linear2ulaw() 130 sample = -sample; /* get magnitude */ in linear2ulaw() 133 sample = sample + BIAS; in linear2ulaw() 134 exponent = exp_lut[(sample >> 7) & 0xFF]; in linear2ulaw() 135 mantissa = (sample >> (exponent + 3)) & 0x0F; in linear2ulaw() 242 s32 sample; in dsp_audio_generate_mix_table() local 248 sample = dsp_audio_law_to_s32[i]; in dsp_audio_generate_mix_table() 249 sample += dsp_audio_law_to_s32[j]; in dsp_audio_generate_mix_table() 250 if (sample > 32767) in dsp_audio_generate_mix_table() [all …]
|
/Linux-v6.1/tools/perf/ |
D | builtin-timechart.c | 285 struct cpu_sample *sample; in pid_put_sample() local 294 sample = zalloc(sizeof(*sample)); in pid_put_sample() 295 assert(sample != NULL); in pid_put_sample() 296 sample->start_time = start; in pid_put_sample() 297 sample->end_time = end; in pid_put_sample() 298 sample->type = type; in pid_put_sample() 299 sample->next = c->samples; in pid_put_sample() 300 sample->cpu = cpu; in pid_put_sample() 301 sample->backtrace = backtrace; in pid_put_sample() 302 c->samples = sample; in pid_put_sample() [all …]
|
D | builtin-script.c | 732 static int perf_sample__fprintf_iregs(struct perf_sample *sample, in perf_sample__fprintf_iregs() argument 735 return perf_sample__fprintf_regs(&sample->intr_regs, in perf_sample__fprintf_iregs() 739 static int perf_sample__fprintf_uregs(struct perf_sample *sample, in perf_sample__fprintf_uregs() argument 742 return perf_sample__fprintf_regs(&sample->user_regs, in perf_sample__fprintf_uregs() 747 struct perf_sample *sample, in perf_sample__fprintf_start() argument 758 if (PRINT_FIELD(MACHINE_PID) && sample->machine_pid) in perf_sample__fprintf_start() 759 printed += fprintf(fp, "VM:%5d ", sample->machine_pid); in perf_sample__fprintf_start() 762 if (PRINT_FIELD(VCPU) && sample->machine_pid) in perf_sample__fprintf_start() 763 printed += fprintf(fp, "VCPU:%03d ", sample->vcpu); in perf_sample__fprintf_start() 777 printed += fprintf(fp, "%5d/%-5d ", sample->pid, sample->tid); in perf_sample__fprintf_start() [all …]
|
D | builtin-lock.c | 507 struct perf_sample *sample); 511 struct perf_sample *sample); 515 struct perf_sample *sample); 519 struct perf_sample *sample); 523 struct perf_sample *sample); 527 struct perf_sample *sample); 583 static u64 callchain_id(struct evsel *evsel, struct perf_sample *sample); 586 struct perf_sample *sample) in get_key_by_aggr_mode() argument 589 *key = callchain_id(evsel, sample); in get_key_by_aggr_mode() 592 return get_key_by_aggr_mode_simple(key, addr, sample->tid); in get_key_by_aggr_mode() [all …]
|
D | builtin-kwork.c | 190 struct perf_sample *sample) in atom_new() argument 220 atom->time = sample->time; in atom_new() 345 struct perf_sample *sample) in profile_update_timespan() argument 350 if ((kwork->timestart == 0) || (kwork->timestart > sample->time)) in profile_update_timespan() 351 kwork->timestart = sample->time; in profile_update_timespan() 353 if (kwork->timeend < sample->time) in profile_update_timespan() 354 kwork->timeend = sample->time; in profile_update_timespan() 359 struct perf_sample *sample) in profile_event_match() argument 362 u64 time = sample->time; in profile_event_match() 377 profile_update_timespan(kwork, sample); in profile_event_match() [all …]
|
D | builtin-sched.c | 148 struct perf_sample *sample, struct machine *machine); 151 struct perf_sample *sample, struct machine *machine); 154 struct perf_sample *sample, struct machine *machine); 162 struct perf_sample *sample, 834 struct evsel *evsel, struct perf_sample *sample, in replay_wakeup_event() argument 837 const char *comm = evsel__strval(evsel, sample, "comm"); in replay_wakeup_event() 838 const u32 pid = evsel__intval(evsel, sample, "pid"); in replay_wakeup_event() 844 printf(" ... pid %d woke up %s/%d\n", sample->tid, comm, pid); in replay_wakeup_event() 847 waker = register_pid(sched, sample->tid, "<unknown>"); in replay_wakeup_event() 850 add_sched_event_wakeup(sched, waker, sample->time, wakee); in replay_wakeup_event() [all …]
|
/Linux-v6.1/tools/perf/scripts/python/ |
D | intel-pt-events.py | 195 def common_start_str(comm, sample): argument 196 ts = sample["time"] 197 cpu = sample["cpu"] 198 pid = sample["pid"] 199 tid = sample["tid"] 200 if "machine_pid" in sample: 201 machine_pid = sample["machine_pid"] 202 vcpu = sample["vcpu"] 207 def print_common_start(comm, sample, name): argument 208 flags_disp = get_optional_null(sample, "flags_disp") [all …]
|
D | arm-cs-trace-disasm.py | 114 def print_sample(sample): argument 117 (sample['cpu'], sample['addr'], sample['phys_addr'], \ 118 sample['ip'], sample['pid'], sample['tid'], \ 119 sample['period'], sample['time'])) 130 def common_start_str(comm, sample): argument 131 sec = int(sample["time"] / 1000000000) 132 ns = sample["time"] % 1000000000 133 cpu = sample["cpu"] 134 pid = sample["pid"] 135 tid = sample["tid"] [all …]
|
/Linux-v6.1/tools/testing/selftests/bpf/progs/ |
D | test_ringbuf.c | 10 struct sample { struct 43 struct sample *sample; in test_ringbuf() local 49 sample = bpf_ringbuf_reserve(&ringbuf, sizeof(*sample), 0); in test_ringbuf() 50 if (!sample) { in test_ringbuf() 55 sample->pid = pid; in test_ringbuf() 56 bpf_get_current_comm(sample->comm, sizeof(sample->comm)); in test_ringbuf() 57 sample->value = value; in test_ringbuf() 59 sample->seq = seq++; in test_ringbuf() 62 if (sample->seq & 1) { in test_ringbuf() 64 bpf_ringbuf_output(&ringbuf, sample, sizeof(*sample), flags); in test_ringbuf() [all …]
|
D | dynptr_fail.c | 38 struct sample { struct 84 struct sample *sample; in ringbuf_missing_release2() local 86 bpf_ringbuf_reserve_dynptr(&ringbuf, sizeof(*sample), 0, &ptr1); in ringbuf_missing_release2() 87 bpf_ringbuf_reserve_dynptr(&ringbuf, sizeof(*sample), 0, &ptr2); in ringbuf_missing_release2() 89 sample = bpf_dynptr_data(&ptr1, 0, sizeof(*sample)); in ringbuf_missing_release2() 90 if (!sample) { in ringbuf_missing_release2() 158 struct sample *sample; in ringbuf_invalid_api() local 160 bpf_ringbuf_reserve_dynptr(&ringbuf, sizeof(*sample), 0, &ptr); in ringbuf_invalid_api() 161 sample = bpf_dynptr_data(&ptr, 0, sizeof(*sample)); in ringbuf_invalid_api() 162 if (!sample) in ringbuf_invalid_api() [all …]
|
D | test_ringbuf_multi.c | 9 struct sample { struct 60 struct sample *sample; in test_ringbuf() local 73 sample = bpf_ringbuf_reserve(rb, sizeof(*sample), 0); in test_ringbuf() 74 if (!sample) { in test_ringbuf() 79 sample->pid = pid; in test_ringbuf() 80 bpf_get_current_comm(sample->comm, sizeof(sample->comm)); in test_ringbuf() 81 sample->value = value; in test_ringbuf() 83 sample->seq = total; in test_ringbuf() 86 bpf_ringbuf_submit(sample, 0); in test_ringbuf()
|
D | dynptr_success.c | 14 struct sample { struct 120 struct sample *sample; in ringbuf_callback() local 124 sample = bpf_dynptr_data(ptr, 0, sizeof(*sample)); in ringbuf_callback() 125 if (!sample) in ringbuf_callback() 128 sample->pid += index; in ringbuf_callback() 137 struct sample *sample; in test_ringbuf() local 147 sample = err ? NULL : bpf_dynptr_data(&ptr, 0, sizeof(*sample)); in test_ringbuf() 148 if (!sample) { in test_ringbuf() 153 sample->pid = 10; in test_ringbuf() 158 if (sample->pid != 55) in test_ringbuf()
|
D | user_ringbuf_fail.c | 10 struct sample { struct 24 const struct sample *sample; in bad_access1() argument 26 sample = bpf_dynptr_data(dynptr - 1, 0, sizeof(*sample)); in bad_access1() 46 const struct sample *sample; in bad_access2() local 48 sample = bpf_dynptr_data(dynptr + 1, 0, sizeof(*sample)); in bad_access2()
|
D | user_ringbuf_success.c | 40 const struct sample *sample = NULL; in record_sample() local 41 struct sample stack_sample; in record_sample() 53 sample = bpf_dynptr_data(dynptr, 0, sizeof(*sample)); in record_sample() 54 if (!sample) { in record_sample() 59 stack_sample = *sample; in record_sample() 165 struct sample *sample = NULL; in test_user_ringbuf_protocol() local 187 struct sample *sample = NULL; in test_user_ringbuf() local
|
/Linux-v6.1/tools/perf/util/ |
D | arm64-frame-pointer-unwind-support.c | 17 static bool get_leaf_frame_caller_enabled(struct perf_sample *sample) in get_leaf_frame_caller_enabled() argument 19 return callchain_param.record_mode == CALLCHAIN_FP && sample->user_regs.regs in get_leaf_frame_caller_enabled() 20 && sample->user_regs.mask & SMPL_REG_MASK(PERF_REG_ARM64_LR); in get_leaf_frame_caller_enabled() 31 u64 get_leaf_frame_caller_aarch64(struct perf_sample *sample, struct thread *thread, int usr_idx) in get_leaf_frame_caller_aarch64() argument 35 struct regs_dump old_regs = sample->user_regs; in get_leaf_frame_caller_aarch64() 37 if (!get_leaf_frame_caller_enabled(sample)) in get_leaf_frame_caller_aarch64() 46 if (!(sample->user_regs.mask & SMPL_REG_MASK(PERF_REG_ARM64_PC))) { in get_leaf_frame_caller_aarch64() 47 sample->user_regs.cache_mask |= SMPL_REG_MASK(PERF_REG_ARM64_PC); in get_leaf_frame_caller_aarch64() 48 sample->user_regs.cache_regs[PERF_REG_ARM64_PC] = sample->callchain->ips[usr_idx+1]; in get_leaf_frame_caller_aarch64() 51 if (!(sample->user_regs.mask & SMPL_REG_MASK(PERF_REG_ARM64_SP))) { in get_leaf_frame_caller_aarch64() [all …]
|
D | intel-pt.c | 282 struct perf_sample *sample) in intel_pt_dump_sample() argument 288 intel_pt_dump(pt, sample->aux_sample.data, sample->aux_sample.size); in intel_pt_dump_sample() 1206 struct perf_sample *sample) in intel_pt_add_callchain() argument 1209 sample->pid, in intel_pt_add_callchain() 1210 sample->tid); in intel_pt_add_callchain() 1212 thread_stack__sample_late(thread, sample->cpu, pt->chain, in intel_pt_add_callchain() 1213 pt->synth_opts.callchain_sz + 1, sample->ip, in intel_pt_add_callchain() 1216 sample->callchain = pt->chain; in intel_pt_add_callchain() 1244 struct perf_sample *sample) in intel_pt_add_br_stack() argument 1247 sample->pid, in intel_pt_add_br_stack() [all …]
|
D | event.c | 196 struct perf_sample *sample, in perf_event__process_comm() argument 199 return machine__process_comm_event(machine, event, sample); in perf_event__process_comm() 204 struct perf_sample *sample, in perf_event__process_namespaces() argument 207 return machine__process_namespaces_event(machine, event, sample); in perf_event__process_namespaces() 212 struct perf_sample *sample, in perf_event__process_cgroup() argument 215 return machine__process_cgroup_event(machine, event, sample); in perf_event__process_cgroup() 220 struct perf_sample *sample, in perf_event__process_lost() argument 223 return machine__process_lost_event(machine, event, sample); in perf_event__process_lost() 228 struct perf_sample *sample __maybe_unused, in perf_event__process_aux() 236 struct perf_sample *sample __maybe_unused, in perf_event__process_itrace_start() [all …]
|
D | event.h | 351 static inline void *perf_sample__synth_ptr(struct perf_sample *sample) in perf_sample__synth_ptr() argument 353 return sample->raw_data - 4; in perf_sample__synth_ptr() 382 struct perf_sample *sample, 386 struct perf_sample *sample, 390 struct perf_sample *sample, 394 struct perf_sample *sample, 398 struct perf_sample *sample, 402 struct perf_sample *sample, 406 struct perf_sample *sample, 410 struct perf_sample *sample, [all …]
|
/Linux-v6.1/tools/perf/arch/x86/util/ |
D | kvm-stat.c | 31 static void mmio_event_get_key(struct evsel *evsel, struct perf_sample *sample, in mmio_event_get_key() argument 34 key->key = evsel__intval(evsel, sample, "gpa"); in mmio_event_get_key() 35 key->info = evsel__intval(evsel, sample, "type"); in mmio_event_get_key() 43 struct perf_sample *sample, struct event_key *key) in mmio_event_begin() argument 51 evsel__intval(evsel, sample, "type") == KVM_TRACE_MMIO_WRITE) { in mmio_event_begin() 52 mmio_event_get_key(evsel, sample, key); in mmio_event_begin() 59 static bool mmio_event_end(struct evsel *evsel, struct perf_sample *sample, in mmio_event_end() argument 68 evsel__intval(evsel, sample, "type") == KVM_TRACE_MMIO_READ) { in mmio_event_end() 69 mmio_event_get_key(evsel, sample, key); in mmio_event_end() 94 struct perf_sample *sample, in ioport_event_get_key() argument [all …]
|
D | archinsn.c | 9 void arch_fetch_insn(struct perf_sample *sample, in arch_fetch_insn() argument 17 if (!sample->ip) in arch_fetch_insn() 19 len = thread__memcpy(thread, machine, sample->insn, sample->ip, sizeof(sample->insn), &is64bit); in arch_fetch_insn() 23 ret = insn_decode(&insn, sample->insn, len, in arch_fetch_insn() 26 sample->insn_len = insn.length; in arch_fetch_insn()
|
/Linux-v6.1/net/netfilter/ |
D | xt_rateest.c | 18 struct gnet_stats_rate_est64 sample = {0}; in xt_rateest_mt() local 22 gen_estimator_read(&info->est1->rate_est, &sample); in xt_rateest_mt() 25 bps1 = info->bps1 >= sample.bps ? info->bps1 - sample.bps : 0; in xt_rateest_mt() 26 pps1 = info->pps1 >= sample.pps ? info->pps1 - sample.pps : 0; in xt_rateest_mt() 28 bps1 = sample.bps; in xt_rateest_mt() 29 pps1 = sample.pps; in xt_rateest_mt() 36 gen_estimator_read(&info->est2->rate_est, &sample); in xt_rateest_mt() 39 bps2 = info->bps2 >= sample.bps ? info->bps2 - sample.bps : 0; in xt_rateest_mt() 40 pps2 = info->pps2 >= sample.pps ? info->pps2 - sample.pps : 0; in xt_rateest_mt() 42 bps2 = sample.bps; in xt_rateest_mt() [all …]
|
/Linux-v6.1/samples/qmi/ |
D | qmi_sample_client.c | 456 struct qmi_sample *sample; in qmi_sample_probe() local 460 sample = devm_kzalloc(&pdev->dev, sizeof(*sample), GFP_KERNEL); in qmi_sample_probe() 461 if (!sample) in qmi_sample_probe() 464 ret = qmi_handle_init(&sample->qmi, TEST_DATA_REQ_MAX_MSG_LEN_V01, in qmi_sample_probe() 471 ret = kernel_connect(sample->qmi.sock, (struct sockaddr *)sq, in qmi_sample_probe() 480 sample->de_dir = debugfs_create_dir(path, qmi_debug_dir); in qmi_sample_probe() 481 if (IS_ERR(sample->de_dir)) { in qmi_sample_probe() 482 ret = PTR_ERR(sample->de_dir); in qmi_sample_probe() 486 sample->de_data = debugfs_create_file("data", 0600, sample->de_dir, in qmi_sample_probe() 487 sample, &data_fops); in qmi_sample_probe() [all …]
|
/Linux-v6.1/tools/perf/util/scripting-engines/ |
D | trace-event-python.c | 407 static PyObject *python_process_callchain(struct perf_sample *sample, in python_process_callchain() argument 417 if (!symbol_conf.use_callchain || !sample->callchain) in python_process_callchain() 421 sample, NULL, NULL, in python_process_callchain() 495 static PyObject *python_process_brstack(struct perf_sample *sample, in python_process_brstack() argument 498 struct branch_stack *br = sample->branch_stack; in python_process_brstack() 499 struct branch_entry *entries = perf_sample__branch_entries(sample); in python_process_brstack() 534 thread__find_map_fb(thread, sample->cpumode, in python_process_brstack() 540 thread__find_map_fb(thread, sample->cpumode, in python_process_brstack() 581 static PyObject *python_process_brstacksym(struct perf_sample *sample, in python_process_brstacksym() argument 584 struct branch_stack *br = sample->branch_stack; in python_process_brstacksym() [all …]
|
/Linux-v6.1/tools/perf/dlfilters/ |
D | dlfilter-show-cycles.c | 80 int filter_event_early(void *data, const struct perf_dlfilter_sample *sample, void *ctx) in filter_event_early() argument 82 __s32 cpu = sample->cpu; in filter_event_early() 83 __s32 tid = sample->tid; in filter_event_early() 86 if (!sample->cyc_cnt) in filter_event_early() 89 pos = event_entry(sample->event); in filter_event_early() 92 cycles[cpu][pos] += sample->cyc_cnt; in filter_event_early() 94 add_entry(tid, pos, sample->cyc_cnt); in filter_event_early() 106 int filter_event(void *data, const struct perf_dlfilter_sample *sample, void *ctx) in filter_event() argument 108 __s32 cpu = sample->cpu; in filter_event() 109 __s32 tid = sample->tid; in filter_event() [all …]
|
/Linux-v6.1/samples/ |
D | Kconfig | 5 You can build and test sample kernel code here. 10 bool "auxdisplay sample" 50 tristate "Build sample module for kernel access to Ftrace instancess" 60 different kobject sample modules showing how to use kobjects, 94 different kfifo sample modules showing how to use the 107 tristate "Build qmi client sample -- loadable modules only" 113 Build an QMI client sample driver, which demonstrates how to 117 tristate "Build rpmsg client sample -- loadable modules only" 120 Build an rpmsg client sample driver, which demonstrates how 128 Build sample live patch demonstrations. [all …]
|