Home
last modified time | relevance | path

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

12345678910>>...61

/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 driver, which demonstrates how
[all …]
/linux/tools/perf/util/
H A Darm64-frame-pointer-unwind-support.c18 static bool get_leaf_frame_caller_enabled(struct perf_sample *sample) in get_leaf_frame_caller_enabled()
25 regs = perf_sample__user_regs(sample); in add_entry()
37 u64 get_leaf_frame_caller_aarch64(struct perf_sample *sample, struct thread *thread, int usr_idx) in get_leaf_frame_caller_aarch64()
43 if (!get_leaf_frame_caller_enabled(sample)) in get_leaf_frame_caller_aarch64()
51 regs = perf_sample__user_regs(sample); in get_leaf_frame_caller_aarch64()
55 regs->cache_regs[PERF_REG_ARM64_PC] = sample->callchain->ips[usr_idx+1]; in get_leaf_frame_caller_aarch64()
63 ret = unwind__get_entries(add_entry, &entries, thread, sample, 2, true); in get_leaf_frame_caller_aarch64()
17 get_leaf_frame_caller_enabled(struct perf_sample * sample) get_leaf_frame_caller_enabled() argument
31 get_leaf_frame_caller_aarch64(struct perf_sample * sample,struct thread * thread,int usr_idx) get_leaf_frame_caller_aarch64() argument
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_TI
[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 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 …]
H A 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()
23 ret = insn_decode(&insn, sample->insn, len, in arch_fetch_insn()
26 sample->insn_len = insn.length; in arch_fetch_insn()
/linux/tools/perf/Documentation/
H A Dperf-mem.txt26 On Arm64 this uses SPE to sample load and store operations, therefore hardware
31 On AMD this use IBS Op PMU to sample load-store operations.
49 Record/Report sample physical addresses
52 Record/Report sample data address page size
97 one sample per line.
106 - symbol_daddr: name of data symbol being executed on at the time of sample
107 - symbol_iaddr: name of code symbol being executed on at the time of sample
109 on at the time of the sample
110 - locked: whether the bus was locked at the time of the sample
111 - tlb: type of tlb access for the data at the time of the sample
[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/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/arch/s390/kernel/
H A Dperf_cpum_sf.c43 /* Minimum number of sample-data-block-tables:
45 * A single table contains up to 511 pointers to sample-data-blocks.
49 /* Number of sample-data-blocks per sample-data-block-table (SDBT):
68 * the number of sample-data-block-tables into account. Note that these
88 unsigned long *sdbt; /* Sample-data-block-table origin */
90 unsigned long num_sdb; /* Number of sample-data-blocks */
91 unsigned long num_sdbt; /* Number of sample-data-block-tables */
92 unsigned long *tail; /* last sample-data-block-table */
132 /* Return pointer to trailer entry of an sample data block */
145 * Return true if the entry in the sample data block table (sdbt)
[all …]
/linux/drivers/gpu/drm/i915/
H A Di915_pmu.c201 static u64 read_sample(struct i915_pmu *pmu, unsigned int gt_id, int sample) in read_sample() argument
203 return pmu->sample[gt_id][sample].cur; in read_sample()
207 store_sample(struct i915_pmu *pmu, unsigned int gt_id, int sample, u64 val) in store_sample() argument
209 pmu->sample[gt_id][sample].cur = val; in store_sample()
213 add_sample_mult(struct i915_pmu *pmu, unsigned int gt_id, int sample, u32 val, u32 mul) in add_sample_mult() argument
215 pmu->sample[gt_id][sample].cur += mul_u32_u32(val, mul); in add_sample_mult()
341 add_sample(struct i915_pmu_sample *sample, u32 val) in add_sample() argument
343 sample->cur += val; in add_sample()
367 add_sample(&pmu->sample[I915_SAMPLE_WAIT], period_ns); in gen3_engine_sample()
369 add_sample(&pmu->sample[I915_SAMPLE_SEMA], period_ns); in gen3_engine_sample()
[all …]
/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>>...61