Home
last modified time | relevance | path

Searched full:sample (Results 1 – 25 of 1696) sorted by relevance

12345678910>>...68

/linux/tools/testing/selftests/tc-testing/tc-tests/actions/
H A Dsample.json4 "name": "Add valid sample action with mandatory arguments",
7 "sample"
14 "$TC actions flush action sample",
20 "cmdUnderTest": "$TC actions add action sample rate 10 group 1 index 2",
22 "verifyCmd": "$TC actions get action sample index 2",
23 "matchPattern": "action order [0-9]+: sample rate 1/10 group 1.*index 2 ref",
26 "$TC actions flush action sample"
31 "name": "Add valid sample action with mandatory arguments and continue control action",
34 "sample"
41 "$TC actions flush action sample",
[all …]
/linux/tools/testing/selftests/ftrace/test.d/event/
H A Devent-mod.tc7 rmmod trace-events-sample ||:
8 if ! modprobe trace-events-sample ; then
9 echo "No trace-events sample module - please make CONFIG_SAMPLE_TRACE_EVENTS=m"
12 trap "rmmod trace-events-sample" EXIT
15 echo ":mod:trace-events-sample" > set_event
20 grep -q sample-trace:foo_bar set_event
21 grep -q sample-trace:foo_bar_with_cond set_event
22 grep -q sample-trace:foo_bar_with_fn set_event
25 val=`cat events/sample-trace/enable`
49 val=`cat events/sample-trace/enable`
[all …]
/linux/drivers/isdn/mISDN/
H A Ddsp_audio.c105 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/tools/perf/scripts/python/
H A Dintel-pt-events.py231 def common_start_str(comm, sample): argument
232 ts = sample["time"]
233 cpu = sample["cpu"]
234 pid = sample["pid"]
235 tid = sample["tid"]
236 if "machine_pid" in sample:
237 machine_pid = sample["machine_pid"]
238 vcpu = sample["vcpu"]
243 def print_common_start(comm, sample, name): argument
244 flags_disp = get_optional_null(sample, "flags_disp")
[all …]
/linux/tools/testing/selftests/bpf/progs/
H A Dtest_ringbuf_map_key.c10 struct sample { struct
24 __type(key, struct sample); argument
38 struct sample *sample, sample_copy; in test_ringbuf_mem_map_key() local
44 sample = bpf_ringbuf_reserve(&ringbuf, sizeof(*sample), 0); in test_ringbuf_mem_map_key()
45 if (!sample) in test_ringbuf_mem_map_key()
48 sample->pid = pid; in test_ringbuf_mem_map_key()
49 bpf_get_current_comm(sample->comm, sizeof(sample->comm)); in test_ringbuf_mem_map_key()
50 sample->seq = ++seq; in test_ringbuf_mem_map_key()
51 sample->value = 42; in test_ringbuf_mem_map_key()
53 /* test using 'sample' (PTR_TO_MEM | MEM_ALLOC) as map key arg in test_ringbuf_mem_map_key()
[all …]
H A Dtest_ringbuf.c10 struct sample { struct
43 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 …]
H A Dtest_ringbuf_n.c14 struct sample { struct
31 struct sample *sample; in test_ringbuf_n() argument
36 sample = bpf_ringbuf_reserve(&ringbuf, sizeof(*sample), 0); in test_ringbuf_n()
37 if (!sample) in test_ringbuf_n()
40 sample->pid = pid; in test_ringbuf_n()
41 sample->value = value; in test_ringbuf_n()
42 bpf_get_current_comm(sample->comm, sizeof(sample->comm)); in test_ringbuf_n()
44 bpf_ringbuf_submit(sample, 0); in test_ringbuf_n()
H A Dtest_ringbuf_multi.c9 struct sample { struct
60 struct sample *sample; in test_ringbuf() local
72 sample = bpf_ringbuf_reserve(rb, sizeof(*sample), 0); in test_ringbuf()
73 if (!sample) { in test_ringbuf()
78 sample->pid = pid; in test_ringbuf()
79 bpf_get_current_comm(sample->comm, sizeof(sample->comm)); in test_ringbuf()
80 sample->value = value; in test_ringbuf()
82 sample->seq = total; in test_ringbuf()
85 bpf_ringbuf_submit(sample, 0); in test_ringbuf()
/linux/samples/
H A DKconfig3 bool "Sample kernel code"
5 You can build and test sample kernel code here.
10 bool "auxdisplay sample"
57 tristate "Build sample module for kernel access to Ftrace instancess"
67 different kobject sample modules showing how to use kobjects,
101 different kfifo sample modules showing how to use the
114 tristate "Build qmi client sample -- loadable modules only"
120 Build an QMI client sample driver, which demonstrates how to
124 tristate "Build rpmsg client sample -- loadable modules only"
127 Build an rpmsg client sample drive
[all...]
/linux/tools/perf/util/
H A Darm64-frame-pointer-unwind-support.c17 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 …]
H A Dbpf-filter.l14 static int sample(enum perf_bpf_filter_term term) in sample() function
17 perf_bpf_filter_lval.sample.term = term; in sample()
18 perf_bpf_filter_lval.sample.part = 0; in sample()
25 perf_bpf_filter_lval.sample.term = term; in sample_part()
26 perf_bpf_filter_lval.sample.part = part; in sample_part()
33 perf_bpf_filter_lval.sample.term = term; in sample_path()
34 perf_bpf_filter_lval.sample.part = 0; in sample_path()
88 ip { return sample(PBF_TERM_IP); }
89 id { return sample(PBF_TERM_ID); }
90 tid { return sample(PBF_TERM_TID); }
[all …]
H A Devent.c49 [PERF_RECORD_SAMPLE] = "SAMPLE",
221 struct perf_sample *sample, in perf_event__process_comm() argument
224 return machine__process_comm_event(machine, event, sample); in perf_event__process_comm()
229 struct perf_sample *sample, in perf_event__process_namespaces() argument
232 return machine__process_namespaces_event(machine, event, sample); in perf_event__process_namespaces()
237 struct perf_sample *sample, in perf_event__process_cgroup() argument
240 return machine__process_cgroup_event(machine, event, sample); in perf_event__process_cgroup()
245 struct perf_sample *sample, in perf_event__process_lost() argument
248 return machine__process_lost_event(machine, event, sample); in perf_event__process_lost()
253 struct perf_sample *sample __maybe_unused, in perf_event__process_aux()
[all …]
H A Dthread-stack.c43 * @ref: external reference (e.g. db_id of sample)
561 * Hardware sample records, created some time after the event occurred, need to
675 * Hardware sample records, created some time after the event occurred, need to
705 * User space sample: start copying branch entries when the in thread_stack__br_sample_late()
727 * Kernel space sample: start copying branch entries when the ip in thread_stack__br_sample_late()
860 struct perf_sample *sample, in thread_stack__bottom() argument
869 if (sample->ip) { in thread_stack__bottom()
870 ip = sample->ip; in thread_stack__bottom()
872 } else if (sample->addr) { in thread_stack__bottom()
873 ip = sample->addr; in thread_stack__bottom()
[all …]
H A Dmachine.h106 struct perf_sample *sample);
108 struct perf_sample *sample);
110 struct perf_sample *sample);
112 struct perf_sample *sample);
114 struct perf_sample *sample);
125 struct perf_sample *sample);
128 struct perf_sample *sample);
130 struct perf_sample *sample);
132 struct perf_sample *sample);
135 struct perf_sample *sample);
[all …]
H A Dprint_insn.c11 #include "sample.h"
20 size_t sample__fprintf_insn_raw(struct perf_sample *sample, FILE *fp) in sample__fprintf_insn_raw() argument
24 for (int i = 0; i < sample->insn_len; i++) { in sample__fprintf_insn_raw()
25 printed += fprintf(fp, "%02x", (unsigned char)sample->insn[i]); in sample__fprintf_insn_raw()
26 if (sample->insn_len - i > 1) in sample__fprintf_insn_raw()
154 size_t sample__fprintf_insn_asm(struct perf_sample *sample, struct thread *thread, in sample__fprintf_insn_asm() argument
161 printed = fprintf_insn_asm(machine, thread, sample->cpumode, is64bit, in sample__fprintf_insn_asm()
162 (uint8_t *)sample->insn, sample->insn_len, in sample__fprintf_insn_asm()
163 sample->ip, NULL, 0, fp); in sample__fprintf_insn_asm()
165 return sample__fprintf_insn_raw(sample, fp); in sample__fprintf_insn_asm()
[all …]
/linux/tools/perf/arch/x86/util/
H A Dkvm-stat.c30 static void mmio_event_get_key(struct evsel *evsel, struct perf_sample *sample, in mmio_event_get_key() argument
33 key->key = evsel__intval(evsel, sample, "gpa"); in mmio_event_get_key()
34 key->info = evsel__intval(evsel, sample, "type"); in mmio_event_get_key()
42 struct perf_sample *sample, struct event_key *key) in mmio_event_begin() argument
50 evsel__intval(evsel, sample, "type") == KVM_TRACE_MMIO_WRITE) { in mmio_event_begin()
51 mmio_event_get_key(evsel, sample, key); in mmio_event_begin()
58 static bool mmio_event_end(struct evsel *evsel, struct perf_sample *sample, in mmio_event_end() argument
67 evsel__intval(evsel, sample, "type") == KVM_TRACE_MMIO_READ) { in mmio_event_end()
68 mmio_event_get_key(evsel, sample, key); in mmio_event_end()
93 struct perf_sample *sample, in ioport_event_get_key() argument
[all …]
/linux/net/netfilter/
H A 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/samples/qmi/
H A Dqmi_sample_client.c3 * 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/tools/perf/Documentation/
H A Dperf-mem.txt26 On Arm64 this uses SPE to sample load and store operations, therefore hardware
47 Record/Report sample physical addresses
50 Record/Report sample data address page size
88 one sample per line.
97 - symbol_daddr: name of data symbol being executed on at the time of sample
98 - symbol_iaddr: name of code symbol being executed on at the time of sample
100 on at the time of the sample
101 - locked: whether the bus was locked at the time of the sample
102 - tlb: type of tlb access for the data at the time of the sample
103 - mem: type of memory access for the data at the time of the sample
[all …]
/linux/tools/perf/
H A Dbuiltin-inject.c48 struct perf_sample sample; member
145 struct perf_sample *sample,
152 struct perf_sample *sample,
313 struct perf_sample *sample __maybe_unused, in perf_event__repipe()
321 struct perf_sample *sample __maybe_unused, in perf_event__drop()
329 struct perf_sample *sample, in perf_event__drop_aux() argument
335 inject->aux_id = sample->id; in perf_event__drop_aux()
343 struct perf_sample *sample) in perf_inject__cut_auxtrace_sample() argument
345 size_t sz1 = sample->aux_sample.data - (void *)event; in perf_inject__cut_auxtrace_sample()
346 size_t sz2 = event->header.size - sample in perf_inject__cut_auxtrace_sample()
376 perf_event__repipe_sample(const struct perf_tool * tool,union perf_event * event,struct perf_sample * sample,struct evsel * evsel,struct machine * machine) perf_event__repipe_sample() argument
468 perf_event__repipe_common_mmap(const struct perf_tool * tool,union perf_event * event,struct perf_sample * sample,struct machine * machine,__u32 pid,__u32 tid,__u64 start,__u64 len,__u64 pgoff,__u32 flags,__u32 prot,const char * filename,const struct dso_id * dso_id,int (* perf_event_process)(const struct perf_tool * tool,union perf_event * event,struct perf_sample * sample,struct machine * machine)) perf_event__repipe_common_mmap() argument
573 perf_event__repipe_mmap(const struct perf_tool * tool,union perf_event * event,struct perf_sample * sample,struct machine * machine) perf_event__repipe_mmap() argument
587 perf_event__repipe_mmap2(const struct perf_tool * tool,union perf_event * event,struct perf_sample * sample,struct machine * machine) perf_event__repipe_mmap2() argument
612 perf_event__repipe_fork(const struct perf_tool * tool,union perf_event * event,struct perf_sample * sample,struct machine * machine) perf_event__repipe_fork() argument
625 perf_event__repipe_comm(const struct perf_tool * tool,union perf_event * event,struct perf_sample * sample,struct machine * machine) perf_event__repipe_comm() argument
638 perf_event__repipe_namespaces(const struct perf_tool * tool,union perf_event * event,struct perf_sample * sample,struct machine * machine) perf_event__repipe_namespaces() argument
650 perf_event__repipe_exit(const struct perf_tool * tool,union perf_event * event,struct perf_sample * sample,struct machine * machine) perf_event__repipe_exit() argument
758 tool__inject_build_id(const struct perf_tool * tool,struct perf_sample * sample,struct machine * machine,const struct evsel * evsel,__u16 misc,const char * filename,struct dso * dso,u32 flags) tool__inject_build_id() argument
795 tool__inject_mmap2_build_id(const struct perf_tool * tool,struct perf_sample * sample,struct machine * machine,const struct evsel * evsel,__u16 misc,__u32 pid,__u32 tid,__u64 start,__u64 len,__u64 pgoff,struct dso * dso,__u32 prot,__u32 flags,const char * filename) tool__inject_mmap2_build_id() argument
835 mark_dso_hit(const struct perf_inject * inject,const struct perf_tool * tool,struct perf_sample * sample,struct machine * machine,const struct evsel * mmap_evsel,struct map * map,bool sample_in_dso) mark_dso_hit() argument
897 struct perf_sample *sample; global() member
912 perf_event__inject_buildid(const struct perf_tool * tool,union perf_event * event,struct perf_sample * sample,struct evsel * evsel __maybe_unused,struct machine * machine) perf_event__inject_buildid() argument
956 perf_inject__sched_process_exit(const struct perf_tool * tool,union perf_event * event __maybe_unused,struct perf_sample * sample,struct evsel * evsel __maybe_unused,struct machine * machine __maybe_unused) perf_inject__sched_process_exit() argument
976 perf_inject__sched_switch(const struct perf_tool * tool,union perf_event * event,struct perf_sample * sample,struct evsel * evsel,struct machine * machine) perf_inject__sched_switch() argument
1001 perf_inject__sched_stat(const struct perf_tool * tool,union perf_event * event __maybe_unused,struct perf_sample * sample,struct evsel * evsel,struct machine * machine) perf_inject__sched_stat() argument
1620 evlist__append_id_sample(struct evlist * evlist,union perf_event * ev,const struct perf_sample * sample) evlist__append_id_sample() argument
1658 struct perf_sample *sample; guest_session__inject_events() local
1764 host__repipe(const struct perf_tool * tool,union perf_event * event,struct perf_sample * sample,struct machine * machine) host__repipe() argument
1855 host__context_switch(const struct perf_tool * tool,union perf_event * event,struct perf_sample * sample,struct machine * machine) host__context_switch() argument
[all...]
/linux/tools/testing/selftests/rust/
H A Dtest_probe_samples.sh6 # This script tests whether the rust sample modules can
23 for sample in "${rust_sample_modules[@]}"; do
24 if ! /sbin/modprobe -n -q "$sample"; then
25 ktap_skip_all "module $sample is not found in /lib/modules/$(uname -r)"
32 for sample in "${rust_sample_modules[@]}"; do
33 if /sbin/modprobe -q "$sample"; then
34 /sbin/modprobe -q -r "$sample"
35 ktap_test_pass "$sample"
37 ktap_test_fail "$sample"
/linux/tools/perf/dlfilters/
H A Ddlfilter-show-cycles.c80 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/fs/smb/client/
H A Dcompress.c36 * The algorithms are ran in a collected sample of the input (uncompressed) data.
37 * The sample is formed of 2K reads in PAGE_SIZE intervals, with a maximum size of 4M.
39 * Parsing the sample goes from "low-hanging fruits" (fastest algorithms, likely compressible)
49 * @bkt: Bytes counts of the sample.
50 * @slen: Size of the sample.
87 * @bkt: Byte counts of the sample.
88 * @slen: Size of the sample.
139 static bool has_repeated_data(const u8 *sample, size_t len) in has_repeated_data() argument
143 return (!memcmp(&sample[0], &sample[s], s)); in has_repeated_data()
162 static int collect_sample(const struct iov_iter *iter, ssize_t max, u8 *sample) in collect_sample() argument
[all …]
/linux/tools/perf/arch/x86/tests/
H A Dsample-parsing.c13 #include "util/sample.h"
50 struct perf_sample sample = { in do_test() local
59 sz = perf_event__sample_event_size(&sample, sample_type, 0); in do_test()
72 err = perf_event__synthesize_sample(event, sample_type, 0, &sample); in do_test()
99 if (!samples_same(&sample, &sample_out, sample_type)) { in do_test()
113 * test__x86_sample_parsing - test X86 specific sample parsing
115 * This function implements a test that synthesizes a sample event, parses it
116 * and then checks that the parsed sample matches the original sample. If the
119 * For now, the PERF_SAMPLE_WEIGHT_STRUCT is the only X86 specific sample type.
/linux/include/uapi/sound/
H A Dsfnt_info.h42 #define SNDRV_SFNT_PROBE_DATA 8 /* optarg=sample */
58 unsigned short type; /* sample type */
63 #define SNDRV_SFNT_PAT_SHARED 0x200 /* sample is shared */
103 unsigned short sample; /* sample id */ member
104 int start, end; /* sample offset correction */
106 short rate_offset; /* sample rate pitch offset */
107 unsigned short mode; /* sample mode */
121 unsigned char amplitude; /* sample volume (127 max) */
125 unsigned short sample_mode; /* sample mode_flag (set by driver) */
142 * sample wave information
[all …]

12345678910>>...68