/Linux-v4.19/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-v4.19/tools/perf/ |
D | builtin-timechart.c | 275 struct cpu_sample *sample; in pid_put_sample() local 287 sample = zalloc(sizeof(*sample)); in pid_put_sample() 288 assert(sample != NULL); in pid_put_sample() 289 sample->start_time = start; in pid_put_sample() 290 sample->end_time = end; in pid_put_sample() 291 sample->type = type; in pid_put_sample() 292 sample->next = c->samples; in pid_put_sample() 293 sample->cpu = cpu; in pid_put_sample() 294 sample->backtrace = backtrace; in pid_put_sample() 295 c->samples = sample; in pid_put_sample() [all …]
|
D | builtin-inject.c | 189 struct perf_sample *sample __maybe_unused, in perf_event__repipe() 197 struct perf_sample *sample __maybe_unused, in perf_event__drop() 205 struct perf_sample *sample, in perf_event__drop_aux() argument 211 inject->aux_id = sample->id; in perf_event__drop_aux() 218 struct perf_sample *sample, 224 struct perf_sample *sample, in perf_event__repipe_sample() argument 230 return f(tool, event, sample, evsel, machine); in perf_event__repipe_sample() 233 build_id__mark_dso_hit(tool, event, sample, evsel, machine); in perf_event__repipe_sample() 240 struct perf_sample *sample, in perf_event__repipe_mmap() argument 245 err = perf_event__process_mmap(tool, event, sample, machine); in perf_event__repipe_mmap() [all …]
|
D | builtin-script.c | 568 static int perf_sample__fprintf_iregs(struct perf_sample *sample, in perf_sample__fprintf_iregs() argument 571 struct regs_dump *regs = &sample->intr_regs; in perf_sample__fprintf_iregs() 587 static int perf_sample__fprintf_uregs(struct perf_sample *sample, in perf_sample__fprintf_uregs() argument 590 struct regs_dump *regs = &sample->user_regs; in perf_sample__fprintf_uregs() 608 static int perf_sample__fprintf_start(struct perf_sample *sample, in perf_sample__fprintf_start() argument 628 printed += fprintf(fp, "%5d/%-5d ", sample->pid, sample->tid); in perf_sample__fprintf_start() 630 printed += fprintf(fp, "%5d ", sample->pid); in perf_sample__fprintf_start() 632 printed += fprintf(fp, "%5d ", sample->tid); in perf_sample__fprintf_start() 636 printed += fprintf(fp, "%3d ", sample->cpu); in perf_sample__fprintf_start() 638 printed += fprintf(fp, "[%03d] ", sample->cpu); in perf_sample__fprintf_start() [all …]
|
D | builtin-lock.c | 351 struct perf_sample *sample); 354 struct perf_sample *sample); 357 struct perf_sample *sample); 360 struct perf_sample *sample); 400 struct perf_sample *sample) in report_lock_acquire_event() argument 406 const char *name = perf_evsel__strval(evsel, sample, "name"); in report_lock_acquire_event() 407 u64 tmp = perf_evsel__intval(evsel, sample, "lockdep_addr"); in report_lock_acquire_event() 408 int flag = perf_evsel__intval(evsel, sample, "flag"); in report_lock_acquire_event() 418 ts = thread_stat_findnew(sample->tid); in report_lock_acquire_event() 466 seq->prev_event_time = sample->time; in report_lock_acquire_event() [all …]
|
D | builtin-sched.c | 136 struct perf_sample *sample, struct machine *machine); 139 struct perf_sample *sample, struct machine *machine); 142 struct perf_sample *sample, struct machine *machine); 150 struct perf_sample *sample, 801 struct perf_evsel *evsel, struct perf_sample *sample, in replay_wakeup_event() argument 804 const char *comm = perf_evsel__strval(evsel, sample, "comm"); in replay_wakeup_event() 805 const u32 pid = perf_evsel__intval(evsel, sample, "pid"); in replay_wakeup_event() 811 printf(" ... pid %d woke up %s/%d\n", sample->tid, comm, pid); in replay_wakeup_event() 814 waker = register_pid(sched, sample->tid, "<unknown>"); in replay_wakeup_event() 817 add_sched_event_wakeup(sched, waker, sample->time, wakee); in replay_wakeup_event() [all …]
|
D | builtin-mem.c | 151 struct perf_sample *sample, in dump_raw_samples() argument 158 if (machine__resolve(machine, &al, sample) < 0) { in dump_raw_samples() 182 sample->pid, in dump_raw_samples() 184 sample->tid, in dump_raw_samples() 186 sample->ip, in dump_raw_samples() 188 sample->addr, in dump_raw_samples() 190 sample->phys_addr, in dump_raw_samples() 192 sample->weight, in dump_raw_samples() 194 sample->data_src, in dump_raw_samples() 209 sample->pid, in dump_raw_samples() [all …]
|
D | builtin-annotate.c | 125 struct perf_sample *sample) in process_branch_stack() argument 134 bi = sample__resolve_bstack(sample, al); in process_branch_stack() 157 struct perf_sample *sample = iter->sample; in hist_iter__branch_callback() local 161 hist__account_cycles(sample->branch_stack, al, sample, false); in hist_iter__branch_callback() 164 err = addr_map_symbol__inc_samples(&bi->from, sample, evsel); in hist_iter__branch_callback() 169 err = addr_map_symbol__inc_samples(&bi->to, sample, evsel); in hist_iter__branch_callback() 176 struct perf_sample *sample, in process_branch_callback() argument 183 .sample = sample, in process_branch_callback() 192 if (machine__resolve(machine, &a, sample) < 0) in process_branch_callback() 211 struct perf_sample *sample, in perf_evsel__add_sample() argument [all …]
|
/Linux-v4.19/tools/perf/scripts/python/ |
D | intel-pt-events.py | 76 def print_common_start(comm, sample, name): argument 77 ts = sample["time"] 78 cpu = sample["cpu"] 79 pid = sample["pid"] 80 tid = sample["tid"] 83 def print_common_ip(sample, symbol, dso): argument 84 ip = sample["ip"] 89 sample = param_dict["sample"] 106 print_common_start(comm, sample, name) 108 print_common_ip(sample, symbol, dso) [all …]
|
/Linux-v4.19/tools/perf/util/ |
D | thread-stack.c | 401 struct perf_sample *sample, in thread_stack__bottom() argument 410 if (sample->ip) { in thread_stack__bottom() 411 ip = sample->ip; in thread_stack__bottom() 413 } else if (sample->addr) { in thread_stack__bottom() 414 ip = sample->addr; in thread_stack__bottom() 425 return thread_stack__push_cp(thread->ts, ip, sample->time, ref, cp, in thread_stack__bottom() 431 struct perf_sample *sample, in thread_stack__no_call_return() argument 440 if (sample->ip >= ks && sample->addr < ks) { in thread_stack__no_call_return() 444 sample->time, ref, in thread_stack__no_call_return() 453 to_al->sym, sample->addr, in thread_stack__no_call_return() [all …]
|
D | intel-pt.c | 1054 struct perf_sample *sample) in intel_pt_prep_b_sample() argument 1056 event->sample.header.type = PERF_RECORD_SAMPLE; in intel_pt_prep_b_sample() 1057 event->sample.header.misc = PERF_RECORD_MISC_USER; in intel_pt_prep_b_sample() 1058 event->sample.header.size = sizeof(struct perf_event_header); in intel_pt_prep_b_sample() 1061 sample->time = tsc_to_perf_time(ptq->timestamp, &pt->tc); in intel_pt_prep_b_sample() 1063 sample->cpumode = PERF_RECORD_MISC_USER; in intel_pt_prep_b_sample() 1064 sample->ip = ptq->state->from_ip; in intel_pt_prep_b_sample() 1065 sample->pid = ptq->pid; in intel_pt_prep_b_sample() 1066 sample->tid = ptq->tid; in intel_pt_prep_b_sample() 1067 sample->addr = ptq->state->to_ip; in intel_pt_prep_b_sample() [all …]
|
D | session.c | 236 struct perf_sample *sample __maybe_unused, in process_event_sample_stub() 246 struct perf_sample *sample __maybe_unused, in process_event_stub() 362 if (tool->sample == NULL) in perf_tool__fill_defaults() 363 tool->sample = process_event_sample_stub; in perf_tool__fill_defaults() 873 static void callchain__lbr_callstack_printf(struct perf_sample *sample) in callchain__lbr_callstack_printf() argument 875 struct ip_callchain *callchain = sample->callchain; in callchain__lbr_callstack_printf() 876 struct branch_stack *lbr_stack = sample->branch_stack; in callchain__lbr_callstack_printf() 921 struct perf_sample *sample) in callchain__printf() argument 924 struct ip_callchain *callchain = sample->callchain; in callchain__printf() 927 callchain__lbr_callstack_printf(sample); in callchain__printf() [all …]
|
/Linux-v4.19/tools/perf/arch/x86/util/ |
D | kvm-stat.c | 29 static void mmio_event_get_key(struct perf_evsel *evsel, struct perf_sample *sample, in mmio_event_get_key() argument 32 key->key = perf_evsel__intval(evsel, sample, "gpa"); in mmio_event_get_key() 33 key->info = perf_evsel__intval(evsel, sample, "type"); in mmio_event_get_key() 41 struct perf_sample *sample, struct event_key *key) in mmio_event_begin() argument 49 perf_evsel__intval(evsel, sample, "type") == KVM_TRACE_MMIO_WRITE) { in mmio_event_begin() 50 mmio_event_get_key(evsel, sample, key); in mmio_event_begin() 57 static bool mmio_event_end(struct perf_evsel *evsel, struct perf_sample *sample, in mmio_event_end() argument 66 perf_evsel__intval(evsel, sample, "type") == KVM_TRACE_MMIO_READ) { in mmio_event_end() 67 mmio_event_get_key(evsel, sample, key); in mmio_event_end() 92 struct perf_sample *sample, in ioport_event_get_key() argument [all …]
|
/Linux-v4.19/net/netfilter/ |
D | xt_rateest.c | 21 struct gnet_stats_rate_est64 sample = {0}; in xt_rateest_mt() local 25 gen_estimator_read(&info->est1->rate_est, &sample); in xt_rateest_mt() 28 bps1 = info->bps1 >= sample.bps ? info->bps1 - sample.bps : 0; in xt_rateest_mt() 29 pps1 = info->pps1 >= sample.pps ? info->pps1 - sample.pps : 0; in xt_rateest_mt() 31 bps1 = sample.bps; in xt_rateest_mt() 32 pps1 = sample.pps; in xt_rateest_mt() 39 gen_estimator_read(&info->est2->rate_est, &sample); in xt_rateest_mt() 42 bps2 = info->bps2 >= sample.bps ? info->bps2 - sample.bps : 0; in xt_rateest_mt() 43 pps2 = info->pps2 >= sample.pps ? info->pps2 - sample.pps : 0; in xt_rateest_mt() 45 bps2 = sample.bps; in xt_rateest_mt() [all …]
|
/Linux-v4.19/drivers/oprofile/ |
D | cpu_buffer.c | 148 size * sizeof(entry->sample->data[0])); in op_cpu_buffer_write_reserve() 151 entry->sample = ring_buffer_event_data(entry->event); in op_cpu_buffer_write_reserve() 153 entry->data = entry->sample->data; in op_cpu_buffer_write_reserve() 155 return entry->sample; in op_cpu_buffer_write_reserve() 171 entry->sample = ring_buffer_event_data(e); in op_cpu_buffer_read_entry() 173 / sizeof(entry->sample->data[0]); in op_cpu_buffer_read_entry() 174 entry->data = entry->sample->data; in op_cpu_buffer_read_entry() 175 return entry->sample; in op_cpu_buffer_read_entry() 188 struct op_sample *sample; in op_add_code() local 221 sample = op_cpu_buffer_write_reserve(&entry, size); in op_add_code() [all …]
|
/Linux-v4.19/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-v4.19/samples/ |
D | Kconfig | 5 You can build and test sample kernel code here. 27 different kobject sample modules showing how to use kobjects, 54 different kfifo sample modules showing how to use the 67 tristate "Build qmi client sample -- loadable modules only" 73 Build an QMI client sample driver, which demonstrates how to 77 tristate "Build rpmsg client sample -- loadable modules only" 80 Build an rpmsg client sample driver, which demonstrates how 88 Build sample live patch demonstrations. 91 tristate "Build configfs patching sample -- loadable modules only" 94 Builds a sample configfs interface. [all …]
|
/Linux-v4.19/drivers/gpu/drm/i915/ |
D | i915_pmu.c | 160 add_sample(struct i915_pmu_sample *sample, u32 val) in add_sample() argument 162 sample->cur += val; in add_sample() 189 add_sample(&engine->pmu.sample[I915_SAMPLE_BUSY], in engines_sample() 202 add_sample(&engine->pmu.sample[I915_SAMPLE_WAIT], in engines_sample() 206 add_sample(&engine->pmu.sample[I915_SAMPLE_SEMA], in engines_sample() 217 add_sample_mult(struct i915_pmu_sample *sample, u32 val, u32 mul) in add_sample_mult() argument 219 sample->cur += mul_u32_u32(val, mul); in add_sample_mult() 237 add_sample_mult(&dev_priv->pmu.sample[__I915_SAMPLE_FREQ_ACT], in frequency_sample() 244 add_sample_mult(&dev_priv->pmu.sample[__I915_SAMPLE_FREQ_REQ], in frequency_sample() 322 enum drm_i915_pmu_engine_sample sample) in engine_event_status() argument [all …]
|
/Linux-v4.19/tools/perf/arch/s390/util/ |
D | kvm-stat.c | 29 struct perf_sample *sample, in event_icpt_insn_get_key() argument 34 insn = perf_evsel__intval(evsel, sample, "instruction"); in event_icpt_insn_get_key() 40 struct perf_sample *sample, in event_sigp_get_key() argument 43 key->key = perf_evsel__intval(evsel, sample, "order_code"); in event_sigp_get_key() 48 struct perf_sample *sample, in event_diag_get_key() argument 51 key->key = perf_evsel__intval(evsel, sample, "code"); in event_diag_get_key() 56 struct perf_sample *sample, in event_icpt_prog_get_key() argument 59 key->key = perf_evsel__intval(evsel, sample, "code"); in event_icpt_prog_get_key()
|
/Linux-v4.19/tools/perf/tests/ |
D | hists_link.c | 16 struct sample { struct 25 static struct sample fake_common_samples[] = { argument 38 static struct sample fake_samples[][5] = { 70 struct perf_sample sample = { .period = 1, .weight = 1, }; in add_hist_entries() local 82 sample.cpumode = PERF_RECORD_MISC_USER; in add_hist_entries() 83 sample.pid = fake_common_samples[k].pid; in add_hist_entries() 84 sample.tid = fake_common_samples[k].pid; in add_hist_entries() 85 sample.ip = fake_common_samples[k].ip; in add_hist_entries() 87 if (machine__resolve(machine, &al, &sample) < 0) in add_hist_entries() 91 NULL, NULL, &sample, true); in add_hist_entries() [all …]
|
D | perf-record.c | 55 struct perf_sample sample; in test__PERF_RECORD() local 181 err = perf_evlist__parse_sample(evlist, event, &sample); in test__PERF_RECORD() 190 pr_info("%" PRIu64" %d ", sample.time, sample.cpu); in test__PERF_RECORD() 194 if (prev_time > sample.time) { in test__PERF_RECORD() 196 name, prev_time, sample.time); in test__PERF_RECORD() 200 prev_time = sample.time; in test__PERF_RECORD() 202 if (sample.cpu != cpu) { in test__PERF_RECORD() 204 name, cpu, sample.cpu); in test__PERF_RECORD() 208 if ((pid_t)sample.pid != evlist->workload.pid) { in test__PERF_RECORD() 210 name, evlist->workload.pid, sample.pid); in test__PERF_RECORD() [all …]
|
D | dwarf-unwind.c | 25 struct perf_sample *sample, in mmap_handler() argument 28 return machine__process_mmap2_event(machine, event, sample); in mmap_handler() 95 struct perf_sample sample; in test_dwarf_unwind__thread() local 99 memset(&sample, 0, sizeof(sample)); in test_dwarf_unwind__thread() 101 if (test__arch_unwind_sample(&sample, thread)) { in test_dwarf_unwind__thread() 107 &sample, MAX_STACK); in test_dwarf_unwind__thread() 117 free(sample.user_stack.data); in test_dwarf_unwind__thread() 118 free(sample.user_regs.regs); in test_dwarf_unwind__thread()
|
/Linux-v4.19/sound/core/oss/ |
D | mulaw.c | 157 unsigned char *dst, u16 sample) in cvt_s16_to_native() argument 159 sample ^= data->flip; in cvt_s16_to_native() 161 sample = swab16(sample); in cvt_s16_to_native() 164 memcpy(dst + data->native_ofs, (char *)&sample + data->copy_ofs, in cvt_s16_to_native() 194 signed short sample = ulaw2linear(*src); in mulaw_decode() local 195 cvt_s16_to_native(data, dst, sample); in mulaw_decode() 205 u16 sample = 0; in cvt_native_to_s16() local 206 memcpy((char *)&sample + data->copy_ofs, src + data->native_ofs, in cvt_native_to_s16() 209 sample = swab16(sample); in cvt_native_to_s16() 210 sample ^= data->flip; in cvt_native_to_s16() [all …]
|
/Linux-v4.19/tools/perf/util/scripting-engines/ |
D | trace-event-python.c | 390 static PyObject *python_process_callchain(struct perf_sample *sample, in python_process_callchain() argument 400 if (!symbol_conf.use_callchain || !sample->callchain) in python_process_callchain() 404 sample, NULL, NULL, in python_process_callchain() 459 static PyObject *python_process_brstack(struct perf_sample *sample, in python_process_brstack() argument 462 struct branch_stack *br = sample->branch_stack; in python_process_brstack() 497 thread__find_map(thread, sample->cpumode, in python_process_brstack() 503 thread__find_map(thread, sample->cpumode, in python_process_brstack() 556 static PyObject *python_process_brstacksym(struct perf_sample *sample, in python_process_brstacksym() argument 559 struct branch_stack *br = sample->branch_stack; in python_process_brstacksym() 579 thread__find_symbol(thread, sample->cpumode, in python_process_brstacksym() [all …]
|
/Linux-v4.19/drivers/media/pci/cx25821/ |
D | cx25821-biffuncs.h | 24 static inline u8 getBit(u32 sample, u8 index) in getBit() argument 26 return (u8) ((sample >> index) & 1); in getBit() 34 static inline u32 setBitAtPos(u32 sample, u8 bit) in setBitAtPos() argument 36 sample |= (1 << bit); in setBitAtPos() 37 return sample; in setBitAtPos()
|