/Linux-v5.15/tools/testing/selftests/tc-testing/tc-tests/actions/ |
D | sample.json | 4 "name": "Add valid sample action with mandatory arguments", 7 "sample" 11 "$TC actions flush action sample", 17 "cmdUnderTest": "$TC actions add action sample rate 10 group 1 index 2", 19 "verifyCmd": "$TC actions get action sample index 2", 20 "matchPattern": "action order [0-9]+: sample rate 1/10 group 1.*index 2 ref", 23 "$TC actions flush action sample" 28 "name": "Add valid sample action with mandatory arguments and continue control action", 31 "sample" 35 "$TC actions flush action sample", [all …]
|
/Linux-v5.15/tools/perf/ |
D | builtin-timechart.c | 273 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 …]
|
D | builtin-script.c | 467 pr_err("Display of symbols requested but neither sample IP nor " in evsel__check_attr() 468 "sample address\navailable. Hence, no addresses to convert " in evsel__check_attr() 483 pr_err("Display of source line number requested but sample IP is not\n" in evsel__check_attr() 713 static int perf_sample__fprintf_iregs(struct perf_sample *sample, in perf_sample__fprintf_iregs() argument 716 return perf_sample__fprintf_regs(&sample->intr_regs, in perf_sample__fprintf_iregs() 720 static int perf_sample__fprintf_uregs(struct perf_sample *sample, in perf_sample__fprintf_uregs() argument 723 return perf_sample__fprintf_regs(&sample->user_regs, in perf_sample__fprintf_uregs() 728 struct perf_sample *sample, in perf_sample__fprintf_start() argument 751 printed += fprintf(fp, "%5d/%-5d ", sample->pid, sample->tid); in perf_sample__fprintf_start() 753 printed += fprintf(fp, "%5d ", sample->pid); in perf_sample__fprintf_start() [all …]
|
D | builtin-inject.c | 216 struct perf_sample *sample __maybe_unused, in perf_event__repipe() 224 struct perf_sample *sample __maybe_unused, in perf_event__drop() 232 struct perf_sample *sample, in perf_event__drop_aux() argument 238 inject->aux_id = sample->id; in perf_event__drop_aux() 246 struct perf_sample *sample) in perf_inject__cut_auxtrace_sample() argument 248 size_t sz1 = sample->aux_sample.data - (void *)event; in perf_inject__cut_auxtrace_sample() 249 size_t sz2 = event->header.size - sample->aux_sample.size - sz1; in perf_inject__cut_auxtrace_sample() 267 struct perf_sample *sample, 273 struct perf_sample *sample, in perf_event__repipe_sample() argument 282 return f(tool, event, sample, evsel, machine); in perf_event__repipe_sample() [all …]
|
D | builtin-sched.c | 147 struct perf_sample *sample, struct machine *machine); 150 struct perf_sample *sample, struct machine *machine); 153 struct perf_sample *sample, struct machine *machine); 161 struct perf_sample *sample, 812 struct evsel *evsel, struct perf_sample *sample, in replay_wakeup_event() argument 815 const char *comm = evsel__strval(evsel, sample, "comm"); in replay_wakeup_event() 816 const u32 pid = evsel__intval(evsel, sample, "pid"); in replay_wakeup_event() 822 printf(" ... pid %d woke up %s/%d\n", sample->tid, comm, pid); in replay_wakeup_event() 825 waker = register_pid(sched, sample->tid, "<unknown>"); in replay_wakeup_event() 828 add_sched_event_wakeup(sched, waker, sample->time, wakee); in replay_wakeup_event() [all …]
|
D | builtin-lock.c | 352 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 = evsel__strval(evsel, sample, "name"); in report_lock_acquire_event() 408 u64 tmp = evsel__intval(evsel, sample, "lockdep_addr"); in report_lock_acquire_event() 409 int flag = evsel__intval(evsel, sample, "flags"); 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 …]
|
/Linux-v5.15/tools/perf/scripts/python/ |
D | intel-pt-events.py | 152 def common_start_str(comm, sample): argument 153 ts = sample["time"] 154 cpu = sample["cpu"] 155 pid = sample["pid"] 156 tid = sample["tid"] 159 def print_common_start(comm, sample, name): argument 160 flags_disp = get_optional_null(sample, "flags_disp") 162 # period = sample["period"] 163 # phys_addr = sample["phys_addr"] 164 # weight = sample["weight"] [all …]
|
/Linux-v5.15/drivers/isdn/mISDN/ |
D | dsp_audio.c | 105 static unsigned char linear2ulaw(short sample) in linear2ulaw() argument 127 /* Get the sample into sign-magnitude. */ in linear2ulaw() 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() 180 * the seven bit sample is the number of every second alaw-sample ordered by 187 * generate table for conversion law from/to 7-bit alaw-like sample * 210 /* spl is the source: the law-sample (converted to alaw) */ in dsp_audio_generate_seven() [all …]
|
/Linux-v5.15/samples/ |
D | Kconfig | 3 bool "Sample kernel code" 5 You can build and test sample kernel code here. 10 bool "auxdisplay sample" 35 tristate "Build sample module for kernel access to Ftrace instancess" 45 different kobject sample modules showing how to use kobjects, 72 different kfifo sample modules showing how to use the 85 tristate "Build qmi client sample -- loadable modules only" 91 Build an QMI client sample driver, which demonstrates how to 95 tristate "Build rpmsg client sample -- loadable modules only" 98 Build an rpmsg client sample driver, which demonstrates how [all …]
|
/Linux-v5.15/tools/testing/selftests/bpf/progs/ |
D | test_ringbuf.c | 9 struct sample { struct 42 struct sample *sample; in test_ringbuf() local 48 sample = bpf_ringbuf_reserve(&ringbuf, sizeof(*sample), 0); in test_ringbuf() 49 if (!sample) { in test_ringbuf() 54 sample->pid = pid; in test_ringbuf() 55 bpf_get_current_comm(sample->comm, sizeof(sample->comm)); in test_ringbuf() 56 sample->value = value; in test_ringbuf() 58 sample->seq = seq++; in test_ringbuf() 61 if (sample->seq & 1) { in test_ringbuf() 62 /* copy from reserved sample to a new one... */ in test_ringbuf() [all …]
|
D | test_ringbuf_multi.c | 9 struct sample { struct 58 struct sample *sample; in test_ringbuf() local 71 sample = bpf_ringbuf_reserve(rb, sizeof(*sample), 0); in test_ringbuf() 72 if (!sample) { in test_ringbuf() 77 sample->pid = pid; in test_ringbuf() 78 bpf_get_current_comm(sample->comm, sizeof(sample->comm)); in test_ringbuf() 79 sample->value = value; in test_ringbuf() 81 sample->seq = total; in test_ringbuf() 84 bpf_ringbuf_submit(sample, 0); in test_ringbuf()
|
/Linux-v5.15/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-v5.15/tools/perf/util/ |
D | intel-pt.c | 252 struct perf_sample *sample) in intel_pt_dump_sample() argument 258 intel_pt_dump(pt, sample->aux_sample.data, sample->aux_sample.size); in intel_pt_dump_sample() 1097 struct perf_sample *sample) in intel_pt_add_callchain() argument 1100 sample->pid, in intel_pt_add_callchain() 1101 sample->tid); in intel_pt_add_callchain() 1103 thread_stack__sample_late(thread, sample->cpu, pt->chain, in intel_pt_add_callchain() 1104 pt->synth_opts.callchain_sz + 1, sample->ip, in intel_pt_add_callchain() 1107 sample->callchain = pt->chain; in intel_pt_add_callchain() 1135 struct perf_sample *sample) in intel_pt_add_br_stack() argument 1138 sample->pid, in intel_pt_add_br_stack() [all …]
|
D | event.c | 49 [PERF_RECORD_SAMPLE] = "SAMPLE", 194 struct perf_sample *sample, in perf_event__process_comm() argument 197 return machine__process_comm_event(machine, event, sample); in perf_event__process_comm() 202 struct perf_sample *sample, in perf_event__process_namespaces() argument 205 return machine__process_namespaces_event(machine, event, sample); in perf_event__process_namespaces() 210 struct perf_sample *sample, in perf_event__process_cgroup() argument 213 return machine__process_cgroup_event(machine, event, sample); in perf_event__process_cgroup() 218 struct perf_sample *sample, in perf_event__process_lost() argument 221 return machine__process_lost_event(machine, event, sample); in perf_event__process_lost() 226 struct perf_sample *sample __maybe_unused, in perf_event__process_aux() [all …]
|
D | session.c | 30 #include "sample-raw.h" 346 struct perf_sample *sample __maybe_unused, in process_event_sample_stub() 356 struct perf_sample *sample __maybe_unused, in process_event_stub() 480 if (tool->sample == NULL) in perf_tool__fill_defaults() 481 tool->sample = process_event_sample_stub; in perf_tool__fill_defaults() 1075 static void callchain__lbr_callstack_printf(struct perf_sample *sample) in callchain__lbr_callstack_printf() argument 1077 struct ip_callchain *callchain = sample->callchain; in callchain__lbr_callstack_printf() 1078 struct branch_stack *lbr_stack = sample->branch_stack; in callchain__lbr_callstack_printf() 1079 struct branch_entry *entries = perf_sample__branch_entries(sample); in callchain__lbr_callstack_printf() 1124 struct perf_sample *sample) in callchain__printf() argument [all …]
|
D | event.h | 44 /* perf sample has 16 bits size limit */ 284 static inline void *perf_sample__synth_ptr(struct perf_sample *sample) in perf_sample__synth_ptr() argument 286 return sample->raw_data - 4; in perf_sample__synth_ptr() 315 struct perf_sample *sample, 319 struct perf_sample *sample, 323 struct perf_sample *sample, 327 struct perf_sample *sample, 331 struct perf_sample *sample, 335 struct perf_sample *sample, 339 struct perf_sample *sample, [all …]
|
D | thread-stack.c | 43 * @ref: external reference (e.g. db_id of sample) 560 * Hardware sample records, created some time after the event occurred, need to 674 * Hardware sample records, created some time after the event occurred, need to 704 * User space sample: start copying branch entries when the in thread_stack__br_sample_late() 726 * Kernel space sample: start copying branch entries when the ip in thread_stack__br_sample_late() 859 struct perf_sample *sample, in thread_stack__bottom() argument 868 if (sample->ip) { in thread_stack__bottom() 869 ip = sample->ip; in thread_stack__bottom() 871 } else if (sample->addr) { in thread_stack__bottom() 872 ip = sample->addr; in thread_stack__bottom() [all …]
|
D | arm-spe.c | 232 struct perf_sample *sample) in arm_spe_prep_sample() argument 237 sample->time = tsc_to_perf_time(record->timestamp, &spe->tc); in arm_spe_prep_sample() 239 sample->ip = record->from_ip; in arm_spe_prep_sample() 240 sample->cpumode = arm_spe_cpumode(spe, sample->ip); in arm_spe_prep_sample() 241 sample->pid = speq->pid; in arm_spe_prep_sample() 242 sample->tid = speq->tid; in arm_spe_prep_sample() 243 sample->period = 1; in arm_spe_prep_sample() 244 sample->cpu = speq->cpu; in arm_spe_prep_sample() 246 event->sample.header.type = PERF_RECORD_SAMPLE; in arm_spe_prep_sample() 247 event->sample.header.misc = sample->cpumode; in arm_spe_prep_sample() [all …]
|
/Linux-v5.15/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-v5.15/samples/qmi/ |
D | qmi_sample_client.c | 3 * Sample in-kernel QMI client driver 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() [all …]
|
/Linux-v5.15/tools/perf/util/scripting-engines/ |
D | trace-event-python.c | 394 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() 467 struct branch_entry *entries = perf_sample__branch_entries(sample); in python_process_brstack() 502 thread__find_map_fb(thread, sample->cpumode, in python_process_brstack() 508 thread__find_map_fb(thread, sample->cpumode, in python_process_brstack() 561 static PyObject *python_process_brstacksym(struct perf_sample *sample, in python_process_brstacksym() argument 564 struct branch_stack *br = sample->branch_stack; in python_process_brstacksym() [all …]
|
/Linux-v5.15/tools/testing/selftests/drivers/net/mlxsw/ |
D | tc_sample.sh | 4 # Test that packets are sampled when tc-sample is used and that reported 232 skip_sw action sample rate 32 group 1 247 log_test "tc sample rate ($desc)" 263 skip_sw action sample rate $((35 * 10 ** 8)) group 1 269 skip_sw action sample rate $((35 * 10 ** 8 + 1)) \ 273 log_test "tc sample maximum rate" 284 skip_sw action sample rate 1024 group 1 288 skip_sw action sample rate 1024 group 1 &> /dev/null 297 skip_sw action sample rate 1024 group 1 300 log_test "tc sample conflict test" [all …]
|
/Linux-v5.15/drivers/gpu/drm/i915/ |
D | i915_pmu.c | 185 pmu->sample[__I915_SAMPLE_RC6].cur = val; in get_rc6() 195 val += pmu->sample[__I915_SAMPLE_RC6].cur; in get_rc6() 198 if (val < pmu->sample[__I915_SAMPLE_RC6_LAST_REPORTED].cur) in get_rc6() 199 val = pmu->sample[__I915_SAMPLE_RC6_LAST_REPORTED].cur; in get_rc6() 201 pmu->sample[__I915_SAMPLE_RC6_LAST_REPORTED].cur = val; in get_rc6() 214 pmu->sample[__I915_SAMPLE_RC6].cur = __get_rc6(&i915->gt); in init_rc6() 215 pmu->sample[__I915_SAMPLE_RC6_LAST_REPORTED].cur = in init_rc6() 216 pmu->sample[__I915_SAMPLE_RC6].cur; in init_rc6() 225 pmu->sample[__I915_SAMPLE_RC6].cur = __get_rc6(&i915->gt); in park_rc6() 278 add_sample(struct i915_pmu_sample *sample, u32 val) in add_sample() argument [all …]
|
/Linux-v5.15/tools/perf/Documentation/ |
D | tips.txt | 2 Sample related events with: perf record -e '{cycles,instructions}:S' 18 To show assembler sample contexts use perf record -b / perf script -F +brstackinsn --xed 25 To record callchains for each sample: perf record -g 38 To browse sample contexts use perf report --sample 10 and select in context menu 40 To set sample time separation other than 100ms with --sort time use --time-quantum 41 Add -I to perf record to sample register values, which will be visible in perf report sample contex… 43 To show context switches in perf report sample context add --switch-events to perf record.
|