Home
last modified time | relevance | path

Searched refs:sample (Results 1 – 25 of 544) sorted by relevance

12345678910>>...22

/Linux-v5.4/drivers/isdn/mISDN/
Ddsp_audio.c105 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-v5.4/tools/perf/
Dbuiltin-timechart.c273 struct cpu_sample *sample; in pid_put_sample() local
285 sample = zalloc(sizeof(*sample)); in pid_put_sample()
286 assert(sample != NULL); in pid_put_sample()
287 sample->start_time = start; in pid_put_sample()
288 sample->end_time = end; in pid_put_sample()
289 sample->type = type; in pid_put_sample()
290 sample->next = c->samples; in pid_put_sample()
291 sample->cpu = cpu; in pid_put_sample()
292 sample->backtrace = backtrace; in pid_put_sample()
293 c->samples = sample; in pid_put_sample()
[all …]
Dbuiltin-script.c610 static int perf_sample__fprintf_iregs(struct perf_sample *sample, in perf_sample__fprintf_iregs() argument
613 return perf_sample__fprintf_regs(&sample->intr_regs, in perf_sample__fprintf_iregs()
617 static int perf_sample__fprintf_uregs(struct perf_sample *sample, in perf_sample__fprintf_uregs() argument
620 return perf_sample__fprintf_regs(&sample->user_regs, in perf_sample__fprintf_uregs()
624 static int perf_sample__fprintf_start(struct perf_sample *sample, in perf_sample__fprintf_start() argument
644 printed += fprintf(fp, "%5d/%-5d ", sample->pid, sample->tid); in perf_sample__fprintf_start()
646 printed += fprintf(fp, "%5d ", sample->pid); in perf_sample__fprintf_start()
648 printed += fprintf(fp, "%5d ", sample->tid); in perf_sample__fprintf_start()
652 printed += fprintf(fp, "%3d ", sample->cpu); in perf_sample__fprintf_start()
654 printed += fprintf(fp, "[%03d] ", sample->cpu); in perf_sample__fprintf_start()
[all …]
Dbuiltin-inject.c190 struct perf_sample *sample __maybe_unused, in perf_event__repipe()
198 struct perf_sample *sample __maybe_unused, in perf_event__drop()
206 struct perf_sample *sample, in perf_event__drop_aux() argument
212 inject->aux_id = sample->id; in perf_event__drop_aux()
219 struct perf_sample *sample,
225 struct perf_sample *sample, in perf_event__repipe_sample() argument
231 return f(tool, event, sample, evsel, machine); in perf_event__repipe_sample()
234 build_id__mark_dso_hit(tool, event, sample, evsel, machine); in perf_event__repipe_sample()
241 struct perf_sample *sample, in perf_event__repipe_mmap() argument
246 err = perf_event__process_mmap(tool, event, sample, machine); in perf_event__repipe_mmap()
[all …]
Dbuiltin-lock.c352 struct perf_sample *sample);
355 struct perf_sample *sample);
358 struct perf_sample *sample);
361 struct perf_sample *sample);
401 struct perf_sample *sample) in report_lock_acquire_event() argument
407 const char *name = perf_evsel__strval(evsel, sample, "name"); in report_lock_acquire_event()
408 u64 tmp = perf_evsel__intval(evsel, sample, "lockdep_addr"); in report_lock_acquire_event()
409 int flag = perf_evsel__intval(evsel, sample, "flag"); in report_lock_acquire_event()
419 ts = thread_stat_findnew(sample->tid); in report_lock_acquire_event()
467 seq->prev_event_time = sample->time; in report_lock_acquire_event()
[all …]
Dbuiltin-sched.c143 struct perf_sample *sample, struct machine *machine);
146 struct perf_sample *sample, struct machine *machine);
149 struct perf_sample *sample, struct machine *machine);
157 struct perf_sample *sample,
808 struct evsel *evsel, struct perf_sample *sample, in replay_wakeup_event() argument
811 const char *comm = perf_evsel__strval(evsel, sample, "comm"); in replay_wakeup_event()
812 const u32 pid = perf_evsel__intval(evsel, sample, "pid"); in replay_wakeup_event()
818 printf(" ... pid %d woke up %s/%d\n", sample->tid, comm, pid); in replay_wakeup_event()
821 waker = register_pid(sched, sample->tid, "<unknown>"); in replay_wakeup_event()
824 add_sched_event_wakeup(sched, waker, sample->time, wakee); in replay_wakeup_event()
[all …]
Dbuiltin-mem.c155 struct perf_sample *sample, in dump_raw_samples() argument
162 if (machine__resolve(machine, &al, sample) < 0) { in dump_raw_samples()
186 sample->pid, in dump_raw_samples()
188 sample->tid, in dump_raw_samples()
190 sample->ip, in dump_raw_samples()
192 sample->addr, in dump_raw_samples()
194 sample->phys_addr, in dump_raw_samples()
196 sample->weight, in dump_raw_samples()
198 sample->data_src, in dump_raw_samples()
213 sample->pid, in dump_raw_samples()
[all …]
/Linux-v5.4/tools/perf/scripts/python/
Dintel-pt-events.py80 def print_common_start(comm, sample, name): argument
81 ts = sample["time"]
82 cpu = sample["cpu"]
83 pid = sample["pid"]
84 tid = sample["tid"]
89 def print_common_ip(sample, symbol, dso): argument
90 ip = sample["ip"]
95 sample = param_dict["sample"]
112 print_common_start(comm, sample, name)
114 print_common_ip(sample, symbol, dso)
[all …]
/Linux-v5.4/tools/perf/arch/x86/util/
Dkvm-stat.c31 static void mmio_event_get_key(struct evsel *evsel, struct perf_sample *sample, in mmio_event_get_key() argument
34 key->key = perf_evsel__intval(evsel, sample, "gpa"); in mmio_event_get_key()
35 key->info = perf_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 perf_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 perf_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 …]
Darchinsn.c9 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()
22 insn_init(&insn, sample->insn, len, is64bit); in arch_fetch_insn()
25 sample->insn_len = insn.length; in arch_fetch_insn()
/Linux-v5.4/net/netfilter/
Dxt_rateest.c18 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-v5.4/drivers/oprofile/
Dcpu_buffer.c148 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-v5.4/tools/perf/util/
Dthread-stack.c607 struct perf_sample *sample, in thread_stack__bottom() argument
616 if (sample->ip) { in thread_stack__bottom()
617 ip = sample->ip; in thread_stack__bottom()
619 } else if (sample->addr) { in thread_stack__bottom()
620 ip = sample->addr; in thread_stack__bottom()
629 return thread_stack__push_cp(ts, ip, sample->time, ref, cp, in thread_stack__bottom()
634 struct perf_sample *sample, u64 ref) in thread_stack__pop_ks() argument
636 u64 tm = sample->time; in thread_stack__pop_ks()
652 struct perf_sample *sample, in thread_stack__no_call_return() argument
662 u64 addr = sample->addr; in thread_stack__no_call_return()
[all …]
Dintel-pt.c1204 struct perf_sample *sample) in intel_pt_prep_a_sample() argument
1206 event->sample.header.type = PERF_RECORD_SAMPLE; in intel_pt_prep_a_sample()
1207 event->sample.header.size = sizeof(struct perf_event_header); in intel_pt_prep_a_sample()
1209 sample->pid = ptq->pid; in intel_pt_prep_a_sample()
1210 sample->tid = ptq->tid; in intel_pt_prep_a_sample()
1211 sample->cpu = ptq->cpu; in intel_pt_prep_a_sample()
1212 sample->insn_len = ptq->insn_len; in intel_pt_prep_a_sample()
1213 memcpy(sample->insn, ptq->insn, INTEL_PT_INSN_BUF_SZ); in intel_pt_prep_a_sample()
1219 struct perf_sample *sample) in intel_pt_prep_b_sample() argument
1221 intel_pt_prep_a_sample(ptq, event, sample); in intel_pt_prep_b_sample()
[all …]
Devent.c185 struct perf_sample *sample, in perf_event__process_comm() argument
188 return machine__process_comm_event(machine, event, sample); in perf_event__process_comm()
193 struct perf_sample *sample, in perf_event__process_namespaces() argument
196 return machine__process_namespaces_event(machine, event, sample); in perf_event__process_namespaces()
201 struct perf_sample *sample, in perf_event__process_lost() argument
204 return machine__process_lost_event(machine, event, sample); in perf_event__process_lost()
209 struct perf_sample *sample __maybe_unused, in perf_event__process_aux()
217 struct perf_sample *sample __maybe_unused, in perf_event__process_itrace_start()
225 struct perf_sample *sample, in perf_event__process_lost_samples() argument
228 return machine__process_lost_samples_event(machine, event, sample); in perf_event__process_lost_samples()
[all …]
Devent.h261 static inline void *perf_sample__synth_ptr(struct perf_sample *sample) in perf_sample__synth_ptr() argument
263 return sample->raw_data - 4; in perf_sample__synth_ptr()
292 struct perf_sample *sample,
296 struct perf_sample *sample,
300 struct perf_sample *sample,
304 struct perf_sample *sample,
308 struct perf_sample *sample,
312 struct perf_sample *sample,
316 struct perf_sample *sample,
320 struct perf_sample *sample,
[all …]
Dsession.c336 struct perf_sample *sample __maybe_unused, in process_event_sample_stub()
346 struct perf_sample *sample __maybe_unused, in process_event_stub()
460 if (tool->sample == NULL) in perf_tool__fill_defaults()
461 tool->sample = process_event_sample_stub; in perf_tool__fill_defaults()
1001 static void callchain__lbr_callstack_printf(struct perf_sample *sample) in callchain__lbr_callstack_printf() argument
1003 struct ip_callchain *callchain = sample->callchain; in callchain__lbr_callstack_printf()
1004 struct branch_stack *lbr_stack = sample->branch_stack; in callchain__lbr_callstack_printf()
1049 struct perf_sample *sample) in callchain__printf() argument
1052 struct ip_callchain *callchain = sample->callchain; in callchain__printf()
1055 callchain__lbr_callstack_printf(sample); in callchain__printf()
[all …]
/Linux-v5.4/samples/qmi/
Dqmi_sample_client.c456 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-v5.4/drivers/gpu/drm/i915/
Di915_pmu.c162 add_sample(struct i915_pmu_sample *sample, u32 val) in add_sample() argument
164 sample->cur += val; in add_sample()
193 add_sample(&pmu->sample[I915_SAMPLE_WAIT], period_ns); in engines_sample()
195 add_sample(&pmu->sample[I915_SAMPLE_SEMA], period_ns); in engines_sample()
210 add_sample(&pmu->sample[I915_SAMPLE_BUSY], period_ns); in engines_sample()
219 add_sample_mult(struct i915_pmu_sample *sample, u32 val, u32 mul) in add_sample_mult() argument
221 sample->cur += mul_u32_u32(val, mul); in add_sample_mult()
241 add_sample_mult(&pmu->sample[__I915_SAMPLE_FREQ_ACT], in frequency_sample()
247 add_sample_mult(&pmu->sample[__I915_SAMPLE_FREQ_REQ], in frequency_sample()
326 enum drm_i915_pmu_engine_sample sample) in engine_event_status() argument
[all …]
/Linux-v5.4/samples/
DKconfig5 You can build and test sample kernel code here.
26 different kobject sample modules showing how to use kobjects,
53 different kfifo sample modules showing how to use the
66 tristate "Build qmi client sample -- loadable modules only"
72 Build an QMI client sample driver, which demonstrates how to
76 tristate "Build rpmsg client sample -- loadable modules only"
79 Build an rpmsg client sample driver, which demonstrates how
87 Build sample live patch demonstrations.
90 tristate "Build configfs patching sample -- loadable modules only"
93 Builds a sample configfs interface.
[all …]
/Linux-v5.4/tools/perf/arch/s390/util/
Dkvm-stat.c28 struct perf_sample *sample, in event_icpt_insn_get_key() argument
33 insn = perf_evsel__intval(evsel, sample, "instruction"); in event_icpt_insn_get_key()
39 struct perf_sample *sample, in event_sigp_get_key() argument
42 key->key = perf_evsel__intval(evsel, sample, "order_code"); in event_sigp_get_key()
47 struct perf_sample *sample, in event_diag_get_key() argument
50 key->key = perf_evsel__intval(evsel, sample, "code"); in event_diag_get_key()
55 struct perf_sample *sample, in event_icpt_prog_get_key() argument
58 key->key = perf_evsel__intval(evsel, sample, "code"); in event_icpt_prog_get_key()
/Linux-v5.4/tools/perf/util/scripting-engines/
Dtrace-event-python.c394 static PyObject *python_process_callchain(struct perf_sample *sample, in python_process_callchain() argument
404 if (!symbol_conf.use_callchain || !sample->callchain) in python_process_callchain()
408 sample, NULL, NULL, in python_process_callchain()
463 static PyObject *python_process_brstack(struct perf_sample *sample, in python_process_brstack() argument
466 struct branch_stack *br = sample->branch_stack; in python_process_brstack()
501 thread__find_map_fb(thread, sample->cpumode, in python_process_brstack()
507 thread__find_map_fb(thread, sample->cpumode, in python_process_brstack()
560 static PyObject *python_process_brstacksym(struct perf_sample *sample, in python_process_brstacksym() argument
563 struct branch_stack *br = sample->branch_stack; in python_process_brstacksym()
583 thread__find_symbol_fb(thread, sample->cpumode, in python_process_brstacksym()
[all …]
/Linux-v5.4/tools/perf/tests/
Dhists_link.c15 struct sample { struct
24 static struct sample fake_common_samples[] = { argument
37 static struct sample fake_samples[][5] = {
69 struct perf_sample sample = { .period = 1, .weight = 1, }; in add_hist_entries() local
81 sample.cpumode = PERF_RECORD_MISC_USER; in add_hist_entries()
82 sample.pid = fake_common_samples[k].pid; in add_hist_entries()
83 sample.tid = fake_common_samples[k].pid; in add_hist_entries()
84 sample.ip = fake_common_samples[k].ip; in add_hist_entries()
86 if (machine__resolve(machine, &al, &sample) < 0) in add_hist_entries()
90 NULL, NULL, &sample, true); in add_hist_entries()
[all …]
/Linux-v5.4/drivers/power/supply/
Dcpcap-battery.c85 s32 sample; /* 24 or 32 bits */ member
216 s32 sample, s32 accumulator, in cpcap_battery_cc_raw_div() argument
239 acc = acc - ((s64)sample * offset); in cpcap_battery_cc_raw_div()
259 s32 sample, s32 accumulator, in cpcap_battery_cc_to_uah() argument
262 return cpcap_battery_cc_raw_div(ddata, sample, in cpcap_battery_cc_to_uah()
268 s32 sample, s32 accumulator, in cpcap_battery_cc_to_ua() argument
271 return cpcap_battery_cc_raw_div(ddata, sample, in cpcap_battery_cc_to_ua()
273 sample * in cpcap_battery_cc_to_ua()
299 ccd->sample = 0; in cpcap_battery_read_accumulated()
310 ccd->sample = (buf[1] & 0x0fff) << 16; in cpcap_battery_read_accumulated()
[all …]
/Linux-v5.4/sound/core/oss/
Dmulaw.c157 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 …]

12345678910>>...22