Symbol: sample
arch/s390/kernel/perf_cpum_sf.c
1108
struct hws_basic_entry *sample;
arch/s390/kernel/perf_cpum_sf.c
1111
sample = (struct hws_basic_entry *)sdbt;
arch/s390/kernel/perf_cpum_sf.c
1112
while ((unsigned long *)sample < (unsigned long *)te) {
arch/s390/kernel/perf_cpum_sf.c
1114
if (!sample->def || sample->LS)
arch/s390/kernel/perf_cpum_sf.c
1121
if (sample->def == 0x0001) {
arch/s390/kernel/perf_cpum_sf.c
1128
if (sample->I == 0 && sample->W == 0) {
arch/s390/kernel/perf_cpum_sf.c
1131
sample);
arch/s390/kernel/perf_cpum_sf.c
1152
sample->def = 0;
arch/s390/kernel/perf_cpum_sf.c
1153
sample++;
arch/s390/kernel/perf_cpum_sf.c
663
static unsigned long getrate(bool freq, unsigned long sample,
arch/s390/kernel/perf_cpum_sf.c
669
rate = freq_to_sample_rate(si, sample);
arch/s390/kernel/perf_cpum_sf.c
676
rate = hw_limit_rate(si, sample);
arch/x86/kernel/cpu/rdrand.c
27
unsigned long sample, prev;
arch/x86/kernel/cpu/rdrand.c
35
if (!rdrand_long(&sample)) {
arch/x86/kernel/cpu/rdrand.c
39
changed += i && sample != prev;
arch/x86/kernel/cpu/rdrand.c
40
prev = sample;
drivers/comedi/drivers/adv_pci1710.c
306
unsigned short sample;
drivers/comedi/drivers/adv_pci1710.c
309
sample = inw(dev->iobase + PCI171X_AD_DATA_REG);
drivers/comedi/drivers/adv_pci1710.c
316
chan = sample >> 12;
drivers/comedi/drivers/adv_pci1710.c
324
*val = sample & s->maxdata;
drivers/comedi/drivers/comedi_test.c
215
unsigned short sample;
drivers/comedi/drivers/comedi_test.c
217
sample = fake_waveform(dev, CR_CHAN(chanspec),
drivers/comedi/drivers/comedi_test.c
219
if (comedi_buf_write_samples(s, &sample, 1) == 0)
drivers/comedi/drivers/ni_mio_common.c
4833
unsigned short sample;
drivers/comedi/drivers/ni_mio_common.c
4850
retval = cs5529_do_conversion(dev, &sample);
drivers/comedi/drivers/ni_mio_common.c
4853
data[n] = sample;
drivers/cpufreq/intel_pstate.c
2415
cpu->last_update = cpu->sample.time;
drivers/cpufreq/intel_pstate.c
2424
expired = time_after64(cpu->sample.time, cpu->last_update +
drivers/cpufreq/intel_pstate.c
2431
cpu->last_update = cpu->sample.time;
drivers/cpufreq/intel_pstate.c
2437
cpu->sample.time = time;
drivers/cpufreq/intel_pstate.c
245
struct sample sample;
drivers/cpufreq/intel_pstate.c
2476
struct sample *sample = &cpu->sample;
drivers/cpufreq/intel_pstate.c
2478
sample->core_avg_perf = div_ext_fp(sample->aperf, sample->mperf);
drivers/cpufreq/intel_pstate.c
2497
cpu->last_sample_time = cpu->sample.time;
drivers/cpufreq/intel_pstate.c
2498
cpu->sample.time = time;
drivers/cpufreq/intel_pstate.c
2499
cpu->sample.aperf = aperf;
drivers/cpufreq/intel_pstate.c
2500
cpu->sample.mperf = mperf;
drivers/cpufreq/intel_pstate.c
2501
cpu->sample.tsc = tsc;
drivers/cpufreq/intel_pstate.c
2502
cpu->sample.aperf -= cpu->prev_aperf;
drivers/cpufreq/intel_pstate.c
2503
cpu->sample.mperf -= cpu->prev_mperf;
drivers/cpufreq/intel_pstate.c
2504
cpu->sample.tsc -= cpu->prev_tsc;
drivers/cpufreq/intel_pstate.c
2525
return mul_ext_fp(cpu->sample.core_avg_perf, cpu_khz);
drivers/cpufreq/intel_pstate.c
2531
cpu->sample.core_avg_perf);
drivers/cpufreq/intel_pstate.c
2536
struct sample *sample = &cpu->sample;
drivers/cpufreq/intel_pstate.c
2540
busy_frac = div_fp(sample->mperf << cpu->aperf_mperf_shift,
drivers/cpufreq/intel_pstate.c
2541
sample->tsc);
drivers/cpufreq/intel_pstate.c
2546
sample->busy_scaled = busy_frac * 100;
drivers/cpufreq/intel_pstate.c
2589
struct sample *sample;
drivers/cpufreq/intel_pstate.c
2597
sample = &cpu->sample;
drivers/cpufreq/intel_pstate.c
2598
trace_pstate_sample(mul_ext_fp(100, sample->core_avg_perf),
drivers/cpufreq/intel_pstate.c
2599
fp_toint(sample->busy_scaled),
drivers/cpufreq/intel_pstate.c
2602
sample->mperf,
drivers/cpufreq/intel_pstate.c
2603
sample->aperf,
drivers/cpufreq/intel_pstate.c
2604
sample->tsc,
drivers/cpufreq/intel_pstate.c
2639
delta_ns = time - cpu->sample.time;
drivers/cpufreq/intel_pstate.c
2798
cpu->sample.time = 0;
drivers/cpufreq/intel_pstate.c
3127
struct sample *sample;
drivers/cpufreq/intel_pstate.c
3135
sample = &cpu->sample;
drivers/cpufreq/intel_pstate.c
3140
sample->mperf,
drivers/cpufreq/intel_pstate.c
3141
sample->aperf,
drivers/cpufreq/intel_pstate.c
3142
sample->tsc,
drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c
162
u32 b, sample = *src++;
drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c
164
b = (sample & 8) << (28 - 3);
drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c
166
sample >>= 4;
drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c
168
*dst++ = sample | b;
drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c
172
static u32 parity(u32 sample)
drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c
174
sample ^= sample >> 16;
drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c
175
sample ^= sample >> 8;
drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c
176
sample ^= sample >> 4;
drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c
177
sample ^= sample >> 2;
drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c
178
sample ^= sample >> 1;
drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c
179
return (sample & 1) << 27;
drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c
199
u32 sample = *src++;
drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c
201
sample &= ~0xff000000;
drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c
202
sample |= *cs++ << 24;
drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c
203
sample |= parity(sample & ~0xf8000000);
drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c
205
*dst++ = sample;
drivers/gpu/drm/etnaviv/etnaviv_perfmon.c
18
u32 (*sample)(struct etnaviv_gpu *gpu,
drivers/gpu/drm/etnaviv/etnaviv_perfmon.c
584
val = sig->sample(gpu, dom, sig);
drivers/gpu/drm/i915/gt/intel_engine_types.h
495
struct i915_pmu_sample sample[I915_ENGINE_SAMPLE_COUNT];
drivers/gpu/drm/i915/i915_pmu.c
1025
engine_events[i].sample))
drivers/gpu/drm/i915/i915_pmu.c
1091
engine_events[i].sample))
drivers/gpu/drm/i915/i915_pmu.c
1104
engine_events[i].sample));
drivers/gpu/drm/i915/i915_pmu.c
203
static u64 read_sample(struct i915_pmu *pmu, unsigned int gt_id, int sample)
drivers/gpu/drm/i915/i915_pmu.c
205
return pmu->sample[gt_id][sample].cur;
drivers/gpu/drm/i915/i915_pmu.c
209
store_sample(struct i915_pmu *pmu, unsigned int gt_id, int sample, u64 val)
drivers/gpu/drm/i915/i915_pmu.c
211
pmu->sample[gt_id][sample].cur = val;
drivers/gpu/drm/i915/i915_pmu.c
215
add_sample_mult(struct i915_pmu *pmu, unsigned int gt_id, int sample, u32 val, u32 mul)
drivers/gpu/drm/i915/i915_pmu.c
217
pmu->sample[gt_id][sample].cur += mul_u32_u32(val, mul);
drivers/gpu/drm/i915/i915_pmu.c
343
add_sample(struct i915_pmu_sample *sample, u32 val)
drivers/gpu/drm/i915/i915_pmu.c
345
sample->cur += val;
drivers/gpu/drm/i915/i915_pmu.c
369
add_sample(&pmu->sample[I915_SAMPLE_WAIT], period_ns);
drivers/gpu/drm/i915/i915_pmu.c
371
add_sample(&pmu->sample[I915_SAMPLE_SEMA], period_ns);
drivers/gpu/drm/i915/i915_pmu.c
390
add_sample(&pmu->sample[I915_SAMPLE_BUSY], period_ns);
drivers/gpu/drm/i915/i915_pmu.c
403
add_sample(&pmu->sample[I915_SAMPLE_WAIT], period_ns);
drivers/gpu/drm/i915/i915_pmu.c
407
add_sample(&pmu->sample[I915_SAMPLE_BUSY], period_ns);
drivers/gpu/drm/i915/i915_pmu.c
553
enum drm_i915_pmu_engine_sample sample)
drivers/gpu/drm/i915/i915_pmu.c
555
switch (sample) {
drivers/gpu/drm/i915/i915_pmu.c
666
u8 sample = engine_event_sample(event);
drivers/gpu/drm/i915/i915_pmu.c
675
} else if (sample == I915_SAMPLE_BUSY &&
drivers/gpu/drm/i915/i915_pmu.c
682
val = engine->pmu.sample[sample].cur;
drivers/gpu/drm/i915/i915_pmu.c
768
u8 sample = engine_event_sample(event);
drivers/gpu/drm/i915/i915_pmu.c
777
BUILD_BUG_ON(ARRAY_SIZE(engine->pmu.sample) !=
drivers/gpu/drm/i915/i915_pmu.c
779
GEM_BUG_ON(sample >= ARRAY_SIZE(engine->pmu.enable_count));
drivers/gpu/drm/i915/i915_pmu.c
780
GEM_BUG_ON(sample >= ARRAY_SIZE(engine->pmu.sample));
drivers/gpu/drm/i915/i915_pmu.c
781
GEM_BUG_ON(engine->pmu.enable_count[sample] == ~0);
drivers/gpu/drm/i915/i915_pmu.c
783
engine->pmu.enable |= BIT(sample);
drivers/gpu/drm/i915/i915_pmu.c
784
engine->pmu.enable_count[sample]++;
drivers/gpu/drm/i915/i915_pmu.c
811
u8 sample = engine_event_sample(event);
drivers/gpu/drm/i915/i915_pmu.c
818
GEM_BUG_ON(sample >= ARRAY_SIZE(engine->pmu.enable_count));
drivers/gpu/drm/i915/i915_pmu.c
819
GEM_BUG_ON(sample >= ARRAY_SIZE(engine->pmu.sample));
drivers/gpu/drm/i915/i915_pmu.c
820
GEM_BUG_ON(engine->pmu.enable_count[sample] == 0);
drivers/gpu/drm/i915/i915_pmu.c
826
if (--engine->pmu.enable_count[sample] == 0)
drivers/gpu/drm/i915/i915_pmu.c
827
engine->pmu.enable &= ~BIT(sample);
drivers/gpu/drm/i915/i915_pmu.c
951
.sample = (__sample), \
drivers/gpu/drm/i915/i915_pmu.c
997
enum drm_i915_pmu_engine_sample sample;
drivers/gpu/drm/i915/i915_pmu.h
123
struct i915_pmu_sample sample[I915_PMU_MAX_GT][__I915_NUM_PMU_SAMPLERS];
drivers/gpu/drm/nouveau/dispnv04/dac.c
242
uint32_t sample, testval, regoffset = nv04_dac_output_offset(encoder);
drivers/gpu/drm/nouveau/dispnv04/dac.c
311
sample = NVReadRAMDAC(dev, 0, NV_PRAMDAC_TEST_CONTROL + regoffset);
drivers/gpu/drm/nouveau/dispnv04/dac.c
313
sample &= NVReadRAMDAC(dev, 0, NV_PRAMDAC_TEST_CONTROL + regoffset);
drivers/gpu/drm/nouveau/dispnv04/dac.c
332
return sample;
drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
105
sample |= NVReadRAMDAC(dev, 0, NV_PRAMDAC_TEST_CONTROL + regoffset)
drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
111
sample |= NVReadRAMDAC(dev, 0, NV_PRAMDAC_TEST_CONTROL + regoffset)
drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
127
return sample;
drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
54
uint32_t sample = 0;
drivers/gpu/drm/vc4/vc4_validate.c
573
struct vc4_texture_sample_info *sample,
drivers/gpu/drm/vc4/vc4_validate.c
577
uint32_t p0 = *(uint32_t *)(uniform_data_u + sample->p_offset[0]);
drivers/gpu/drm/vc4/vc4_validate.c
578
uint32_t p1 = *(uint32_t *)(uniform_data_u + sample->p_offset[1]);
drivers/gpu/drm/vc4/vc4_validate.c
579
uint32_t p2 = (sample->p_offset[2] != ~0 ?
drivers/gpu/drm/vc4/vc4_validate.c
580
*(uint32_t *)(uniform_data_u + sample->p_offset[2]) : 0);
drivers/gpu/drm/vc4/vc4_validate.c
581
uint32_t p3 = (sample->p_offset[3] != ~0 ?
drivers/gpu/drm/vc4/vc4_validate.c
582
*(uint32_t *)(uniform_data_u + sample->p_offset[3]) : 0);
drivers/gpu/drm/vc4/vc4_validate.c
583
uint32_t *validated_p0 = exec->uniforms_v + sample->p_offset[0];
drivers/gpu/drm/vc4/vc4_validate.c
597
if (sample->is_direct) {
drivers/gpu/drm/vc4/vc4_validate.c
741
DRM_INFO("Texture p0 at %d: 0x%08x\n", sample->p_offset[0], p0);
drivers/gpu/drm/vc4/vc4_validate.c
742
DRM_INFO("Texture p1 at %d: 0x%08x\n", sample->p_offset[1], p1);
drivers/gpu/drm/vc4/vc4_validate.c
743
DRM_INFO("Texture p2 at %d: 0x%08x\n", sample->p_offset[2], p2);
drivers/gpu/drm/vc4/vc4_validate.c
744
DRM_INFO("Texture p3 at %d: 0x%08x\n", sample->p_offset[3], p3);
drivers/gpu/drm/xe/xe_oa.c
1089
if (stream->sample)
drivers/gpu/drm/xe/xe_oa.c
1220
param->sample = value;
drivers/gpu/drm/xe/xe_oa.c
1480
if (stream->sample)
drivers/gpu/drm/xe/xe_oa.c
1490
if (stream->sample)
drivers/gpu/drm/xe/xe_oa.c
1754
stream->sample = param->sample;
drivers/gpu/drm/xe/xe_oa.c
1770
stream->oa_unit->type == DRM_XE_OA_UNIT_TYPE_OAG && stream->sample)
drivers/gpu/drm/xe/xe_oa.c
1892
if (stream->sample)
drivers/gpu/drm/xe/xe_oa.c
2071
if (param.exec_q && !param.sample)
drivers/gpu/drm/xe/xe_oa.c
2089
if (!param.exec_q && !param.sample) {
drivers/gpu/drm/xe/xe_oa.c
2111
if (!param.sample) {
drivers/gpu/drm/xe/xe_oa.c
565
if (!stream->sample)
drivers/gpu/drm/xe/xe_oa.c
835
if (enable && stream && stream->sample)
drivers/gpu/drm/xe/xe_oa.c
889
if (stream->sample)
drivers/gpu/drm/xe/xe_oa.c
91
bool sample;
drivers/gpu/drm/xe/xe_oa_types.h
206
bool sample;
drivers/hwmon/mc13783-adc.c
45
unsigned int sample[4];
drivers/hwmon/mc13783-adc.c
50
channel, 0, 0, sample);
drivers/hwmon/mc13783-adc.c
60
*val = (sample[channel % 4] >> (channel > 3 ? 14 : 2)) & 0x3ff;
drivers/iio/accel/adxl367.c
718
u16 sample;
drivers/iio/accel/adxl367.c
732
sample = FIELD_GET(ADXL367_DATA_MASK, be16_to_cpu(st->sample_buf));
drivers/iio/accel/adxl367.c
733
*val = sign_extend32(sample, chan->scan_type.realbits - 1);
drivers/iio/accel/adxl372.c
667
static void adxl372_arrange_axis_data(struct adxl372_state *st, __be16 *sample)
drivers/iio/accel/adxl372.c
673
axis_sample[i++] = sample[0];
drivers/iio/accel/adxl372.c
675
axis_sample[i++] = sample[1];
drivers/iio/accel/adxl372.c
677
axis_sample[i++] = sample[2];
drivers/iio/accel/adxl372.c
679
memcpy(sample, axis_sample, 3 * sizeof(__be16));
drivers/iio/adc/ad4000.c
638
u32 sample;
drivers/iio/adc/ad4000.c
647
sample = be32_to_cpu(st->scan.data.sample_buf32_be);
drivers/iio/adc/ad4000.c
649
sample = be16_to_cpu(st->scan.data.sample_buf16_be);
drivers/iio/adc/ad4000.c
652
sample = st->scan.data.sample_buf32;
drivers/iio/adc/ad4000.c
654
sample = st->scan.data.sample_buf16;
drivers/iio/adc/ad4000.c
657
sample >>= chan->scan_type.shift;
drivers/iio/adc/ad4000.c
660
*val = sign_extend32(sample, chan->scan_type.realbits - 1);
drivers/iio/adc/ad4000.c
662
*val = sample;
drivers/iio/adc/ad7266.c
141
*val = be16_to_cpu(st->data.sample[address % 2]);
drivers/iio/adc/ad7266.c
431
st->single_xfer[0].rx_buf = &st->data.sample[0];
drivers/iio/adc/ad7266.c
435
st->single_xfer[1].rx_buf = st->data.sample;
drivers/iio/adc/ad7266.c
439
st->single_xfer[2].tx_buf = &st->data.sample[0];
drivers/iio/adc/ad7266.c
47
__be16 sample[2];
drivers/iio/adc/ad7266.c
55
return spi_read(st->spi, &st->data.sample[0], 2);
drivers/iio/adc/ad7266.c
61
return spi_read(st->spi, &st->data.sample[0], 1);
drivers/iio/adc/ad7266.c
88
ret = spi_read(st->spi, st->data.sample, 4);
drivers/iio/adc/ad7944.c
208
xfers[2].rx_buf = &adc->sample.raw;
drivers/iio/adc/ad7944.c
232
xfers[1].rx_buf = &adc->sample.raw;
drivers/iio/adc/ad7944.c
362
*val = adc->sample.raw.u32;
drivers/iio/adc/ad7944.c
364
*val = adc->sample.raw.u16;
drivers/iio/adc/ad7944.c
538
iio_push_to_buffers_with_timestamp(indio_dev, &adc->sample.raw,
drivers/iio/adc/ad7944.c
88
} sample __aligned(IIO_DMA_MINALIGN);
drivers/iio/adc/ad_sigma_delta.c
428
unsigned int sample, raw_sample;
drivers/iio/adc/ad_sigma_delta.c
483
sample = raw_sample >> chan->scan_type.shift;
drivers/iio/adc/ad_sigma_delta.c
484
sample &= (1 << chan->scan_type.realbits) - 1;
drivers/iio/adc/ad_sigma_delta.c
485
*val = sample;
drivers/iio/adc/sophgo-cv1800b-adc.c
102
u32 sample;
drivers/iio/adc/sophgo-cv1800b-adc.c
112
sample = readl(saradc->regs + CV1800B_ADC_CH_RESULT_REG(chan->scan_index));
drivers/iio/adc/sophgo-cv1800b-adc.c
114
if (!(sample & CV1800B_ADC_CH_VALID))
drivers/iio/adc/sophgo-cv1800b-adc.c
117
*val = sample & CV1800B_ADC_CH_RESULT;
drivers/iio/adc/ti-ads1119.c
269
unsigned int sample;
drivers/iio/adc/ti-ads1119.c
290
ret = ads1119_read_data(st, chan, &sample);
drivers/iio/adc/ti-ads1119.c
294
*val = sign_extend32(sample, chan->scan_type.realbits - 1);
drivers/iio/adc/ti-ads1119.c
513
s16 sample;
drivers/iio/adc/ti-ads1119.c
538
scan.sample = ret;
drivers/iio/imu/bmi160/bmi160_core.c
372
__le16 sample;
drivers/iio/imu/bmi160/bmi160_core.c
375
reg = bmi160_regs[t].data + (axis - IIO_MOD_X) * sizeof(sample);
drivers/iio/imu/bmi160/bmi160_core.c
377
ret = regmap_bulk_read(data->regmap, reg, &sample, sizeof(sample));
drivers/iio/imu/bmi160/bmi160_core.c
381
*val = sign_extend32(le16_to_cpu(sample), 15);
drivers/iio/imu/bmi160/bmi160_core.c
436
__le16 sample;
drivers/iio/imu/bmi160/bmi160_core.c
439
ret = regmap_bulk_read(data->regmap, base + i * sizeof(sample),
drivers/iio/imu/bmi160/bmi160_core.c
440
&sample, sizeof(sample));
drivers/iio/imu/bmi160/bmi160_core.c
443
data->buf[j++] = sample;
drivers/iio/imu/bmi270/bmi270_core.c
864
__le16 sample;
drivers/iio/imu/bmi270/bmi270_core.c
884
ret = regmap_bulk_read(data->regmap, reg, &sample, sizeof(sample));
drivers/iio/imu/bmi270/bmi270_core.c
888
*val = sign_extend32(le16_to_cpu(sample), 15);
drivers/iio/imu/smi240.c
343
int ret, sample;
drivers/iio/imu/smi240.c
359
ret = regmap_read(data->regmap, reg, &sample);
drivers/iio/imu/smi240.c
363
*val = sign_extend32(sample, 15);
drivers/iio/imu/smi240.c
374
int ret, chan, sample;
drivers/iio/imu/smi240.c
379
ret = regmap_read(data->regmap, base + chan, &sample);
drivers/iio/imu/smi240.c
383
data->buf[i++] = sample;
drivers/iio/imu/smi330/smi330_core.c
429
int ret, sample;
drivers/iio/imu/smi330/smi330_core.c
445
ret = regmap_read(data->regmap, reg, &sample);
drivers/iio/imu/smi330/smi330_core.c
449
*val = sign_extend32(sample, 15);
drivers/iio/magnetometer/af8133j.c
364
} sample = { };
drivers/iio/magnetometer/af8133j.c
367
ret = af8133j_read_measurement(data, sample.values);
drivers/iio/magnetometer/af8133j.c
371
iio_push_to_buffers_with_ts(indio_dev, &sample, sizeof(sample),
drivers/iio/pressure/zpa2326.c
586
} sample = { };
drivers/iio/pressure/zpa2326.c
591
err = zpa2326_dequeue_pressure(indio_dev, &sample.pressure);
drivers/iio/pressure/zpa2326.c
602
&sample.temperature, 2);
drivers/iio/pressure/zpa2326.c
619
iio_push_to_buffers_with_ts(indio_dev, &sample, sizeof(sample),
drivers/iio/resolver/ad2s1200.c
145
st->sample = devm_gpiod_get(&spi->dev, "adi,sample", GPIOD_OUT_LOW);
drivers/iio/resolver/ad2s1200.c
146
if (IS_ERR(st->sample)) {
drivers/iio/resolver/ad2s1200.c
148
PTR_ERR(st->sample));
drivers/iio/resolver/ad2s1200.c
149
return PTR_ERR(st->sample);
drivers/iio/resolver/ad2s1200.c
40
struct gpio_desc *sample;
drivers/iio/resolver/ad2s1200.c
73
gpiod_set_value(st->sample, 0);
drivers/iio/resolver/ad2s1200.c
77
gpiod_set_value(st->sample, 1);
drivers/iio/resolver/ad2s1210.c
1296
&st->sample.raw, 2);
drivers/iio/resolver/ad2s1210.c
1304
ret = spi_read(st->sdev, &st->sample, 3);
drivers/iio/resolver/ad2s1210.c
1309
memcpy(&st->scan.chan[chan++], &st->sample.raw, 2);
drivers/iio/resolver/ad2s1210.c
1316
&st->sample.raw, 2);
drivers/iio/resolver/ad2s1210.c
1324
ret = spi_read(st->sdev, &st->sample, 3);
drivers/iio/resolver/ad2s1210.c
1329
memcpy(&st->scan.chan[chan++], &st->sample.raw, 2);
drivers/iio/resolver/ad2s1210.c
1339
st->sample.fault = reg_val;
drivers/iio/resolver/ad2s1210.c
1342
ad2s1210_push_events(indio_dev, st->sample.fault, pf->timestamp);
drivers/iio/resolver/ad2s1210.c
163
} sample __aligned(IIO_DMA_MINALIGN);
drivers/iio/resolver/ad2s1210.c
466
&st->sample.raw, 2);
drivers/iio/resolver/ad2s1210.c
474
&st->sample.raw, 2);
drivers/iio/resolver/ad2s1210.c
487
st->sample.fault = reg_val;
drivers/iio/resolver/ad2s1210.c
502
ret = spi_read(st->sdev, &st->sample, 3);
drivers/iio/resolver/ad2s1210.c
509
*val = be16_to_cpu(st->sample.raw);
drivers/iio/resolver/ad2s1210.c
513
*val = (s16)be16_to_cpu(st->sample.raw);
drivers/iio/resolver/ad2s1210.c
520
ad2s1210_push_events(indio_dev, st->sample.fault, timestamp);
drivers/input/touchscreen/ad7877.c
153
u16 sample ____cacheline_aligned;
drivers/input/touchscreen/ad7877.c
216
req->xfer[1].rx_buf = &req->sample;
drivers/input/touchscreen/ad7877.c
223
ret = status ? : req->sample;
drivers/input/touchscreen/ad7877.c
259
int sample;
drivers/input/touchscreen/ad7877.c
294
req->xfer[3].rx_buf = &req->sample;
drivers/input/touchscreen/ad7877.c
312
sample = req->sample;
drivers/input/touchscreen/ad7877.c
316
return status ? : sample;
drivers/input/touchscreen/ads7846.c
337
__be16 sample ____cacheline_aligned;
drivers/input/touchscreen/ads7846.c
349
u8 sample[3] ____cacheline_aligned;
drivers/input/touchscreen/ads7846.c
392
req->xfer[3].rx_buf = &req->sample;
drivers/input/touchscreen/ads7846.c
426
status = be16_to_cpu(req->sample);
drivers/input/touchscreen/ads7846.c
448
req->xfer[0].rx_buf = req->sample;
drivers/input/touchscreen/ads7846.c
460
status = get_unaligned_be16(&req->sample[1]);
drivers/input/touchscreen/mc13783_ts.c
127
priv->sample) == 0)
drivers/input/touchscreen/mc13783_ts.c
37
unsigned int sample[4];
drivers/input/touchscreen/mc13783_ts.c
75
x0 = priv->sample[0] & 0xfff;
drivers/input/touchscreen/mc13783_ts.c
76
x1 = priv->sample[1] & 0xfff;
drivers/input/touchscreen/mc13783_ts.c
77
x2 = priv->sample[2] & 0xfff;
drivers/input/touchscreen/mc13783_ts.c
78
y0 = priv->sample[3] & 0xfff;
drivers/input/touchscreen/mc13783_ts.c
79
y1 = (priv->sample[0] >> 12) & 0xfff;
drivers/input/touchscreen/mc13783_ts.c
80
y2 = (priv->sample[1] >> 12) & 0xfff;
drivers/input/touchscreen/mc13783_ts.c
81
cr0 = (priv->sample[2] >> 12) & 0xfff;
drivers/input/touchscreen/mc13783_ts.c
82
cr1 = (priv->sample[3] >> 12) & 0xfff;
drivers/input/touchscreen/wm9705.c
211
static int wm9705_poll_sample(struct wm97xx *wm, int adcsel, int *sample)
drivers/input/touchscreen/wm9705.c
248
*sample = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
drivers/input/touchscreen/wm9705.c
253
if ((*sample ^ adcsel) & WM97XX_ADCSEL_MASK) {
drivers/input/touchscreen/wm9705.c
256
*sample & WM97XX_ADCSEL_MASK);
drivers/input/touchscreen/wm9705.c
260
if (wants_pen && !(*sample & WM97XX_PEN_DOWN)) {
drivers/input/touchscreen/wm9712.c
251
static int wm9712_poll_sample(struct wm97xx *wm, int adcsel, int *sample)
drivers/input/touchscreen/wm9712.c
288
*sample = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
drivers/input/touchscreen/wm9712.c
293
if ((*sample ^ adcsel) & WM97XX_ADCSEL_MASK) {
drivers/input/touchscreen/wm9712.c
296
*sample & WM97XX_ADCSEL_MASK);
drivers/input/touchscreen/wm9712.c
300
if (wants_pen && !(*sample & WM97XX_PEN_DOWN)) {
drivers/input/touchscreen/wm9712.c
302
*sample = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
drivers/input/touchscreen/wm9712.c
303
if (!(*sample & WM97XX_PEN_DOWN)) {
drivers/input/touchscreen/wm9713.c
256
static int wm9713_poll_sample(struct wm97xx *wm, int adcsel, int *sample)
drivers/input/touchscreen/wm9713.c
298
*sample = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
drivers/input/touchscreen/wm9713.c
303
if ((*sample ^ adcsel) & WM97XX_ADCSEL_MASK) {
drivers/input/touchscreen/wm9713.c
306
*sample & WM97XX_ADCSEL_MASK);
drivers/input/touchscreen/wm9713.c
310
if (wants_pen && !(*sample & WM97XX_PEN_DOWN)) {
drivers/macintosh/rack-meter.c
314
u32 sample = 0;
drivers/macintosh/rack-meter.c
317
sample >>= 1;
drivers/macintosh/rack-meter.c
318
sample |= ((rm->ubuf[led] >= 0x80) << 15);
drivers/macintosh/rack-meter.c
320
return (sample << 17) | (sample >> 15);
drivers/macintosh/windfarm_pid.h
48
extern s32 wf_pid_run(struct wf_pid_state *st, s32 sample);
drivers/media/dvb-frontends/rtl2832_sdr.c
147
unsigned int sample;
drivers/media/dvb-frontends/rtl2832_sdr.c
198
unsigned int samples = dev->sample - dev->sample_measured;
drivers/media/dvb-frontends/rtl2832_sdr.c
201
dev->sample_measured = dev->sample;
drivers/media/dvb-frontends/rtl2832_sdr.c
208
dev->sample += src_len / 2;
drivers/media/pci/cx25821/cx25821-biffuncs.h
14
static inline u8 getBit(u32 sample, u8 index)
drivers/media/pci/cx25821/cx25821-biffuncs.h
16
return (u8) ((sample >> index) & 1);
drivers/media/pci/cx25821/cx25821-biffuncs.h
24
static inline u32 setBitAtPos(u32 sample, u8 bit)
drivers/media/pci/cx25821/cx25821-biffuncs.h
26
sample |= (1 << bit);
drivers/media/pci/cx25821/cx25821-biffuncs.h
27
return sample;
drivers/media/rc/bpf-lirc.c
20
BPF_CALL_1(bpf_rc_repeat, u32*, sample)
drivers/media/rc/bpf-lirc.c
213
void lirc_bpf_run(struct rc_dev *rcdev, u32 sample)
drivers/media/rc/bpf-lirc.c
217
raw->bpf_sample = sample;
drivers/media/rc/bpf-lirc.c
24
ctrl = container_of(sample, struct ir_raw_event_ctrl, bpf_sample);
drivers/media/rc/bpf-lirc.c
38
BPF_CALL_4(bpf_rc_keydown, u32*, sample, u32, protocol, u64, scancode,
drivers/media/rc/bpf-lirc.c
43
ctrl = container_of(sample, struct ir_raw_event_ctrl, bpf_sample);
drivers/media/rc/bpf-lirc.c
60
BPF_CALL_3(bpf_rc_pointer_rel, u32*, sample, s32, rel_x, s32, rel_y)
drivers/media/rc/bpf-lirc.c
64
ctrl = container_of(sample, struct ir_raw_event_ctrl, bpf_sample);
drivers/media/rc/ene_ir.c
608
u32 sample;
drivers/media/rc/ene_ir.c
632
sample = dev->tx_buffer[dev->tx_pos++];
drivers/media/rc/ene_ir.c
635
dev->tx_sample = DIV_ROUND_CLOSEST(sample, sample_period);
drivers/media/rc/fintek-cir.c
270
u8 sample;
drivers/media/rc/fintek-cir.c
275
sample = fintek->buf[i];
drivers/media/rc/fintek-cir.c
278
fintek->cmd = sample;
drivers/media/rc/fintek-cir.c
293
fintek->rem = fintek_cmdsize(fintek->cmd, sample);
drivers/media/rc/fintek-cir.c
301
rawir.pulse = ((sample & BUF_PULSE_BIT) != 0);
drivers/media/rc/fintek-cir.c
302
rawir.duration = (sample & BUF_SAMPLE_MASK)
drivers/media/rc/fintek-cir.c
330
u8 sample, status;
drivers/media/rc/fintek-cir.c
340
sample = fintek_cir_reg_read(fintek, CIR_RX_DATA);
drivers/media/rc/fintek-cir.c
341
fit_dbg("%s: sample: 0x%02x", __func__, sample);
drivers/media/rc/fintek-cir.c
343
fintek->buf[fintek->pkts] = sample;
drivers/media/rc/lirc_dev.c
44
int sample;
drivers/media/rc/lirc_dev.c
54
sample = LIRC_OVERFLOW(LIRC_VALUE_MASK);
drivers/media/rc/lirc_dev.c
59
sample = LIRC_FREQUENCY(ev.carrier);
drivers/media/rc/lirc_dev.c
60
dev_dbg(&dev->dev, "carrier report (freq: %d)\n", sample);
drivers/media/rc/lirc_dev.c
66
sample = LIRC_TIMEOUT(ev.duration);
drivers/media/rc/lirc_dev.c
67
dev_dbg(&dev->dev, "timeout report (duration: %d)\n", sample);
drivers/media/rc/lirc_dev.c
85
sample = ev.pulse ? LIRC_PULSE(ev.duration) :
drivers/media/rc/lirc_dev.c
95
lirc_bpf_run(dev, sample);
drivers/media/rc/lirc_dev.c
99
if (kfifo_put(&fh->rawir, sample))
drivers/media/rc/nuvoton-cir.c
709
u8 sample;
drivers/media/rc/nuvoton-cir.c
720
sample = nvt->buf[i];
drivers/media/rc/nuvoton-cir.c
722
rawir.pulse = ((sample & BUF_PULSE_BIT) != 0);
drivers/media/rc/nuvoton-cir.c
723
rawir.duration = (sample & BUF_LEN_MASK) * SAMPLE_PERIOD;
drivers/media/rc/rc-core-priv.h
345
void lirc_bpf_run(struct rc_dev *dev, u32 sample);
drivers/media/rc/rc-core-priv.h
348
static inline void lirc_bpf_run(struct rc_dev *dev, u32 sample) { }
drivers/media/test-drivers/vidtv/vidtv_s302m.c
236
u16 sample;
drivers/media/test-drivers/vidtv/vidtv_s302m.c
285
sample = *(u16 *)(e->src_buf + e->src_buf_offset);
drivers/media/test-drivers/vidtv/vidtv_s302m.c
287
return sample;
drivers/media/test-drivers/vidtv/vidtv_s302m.c
291
u16 sample)
drivers/media/test-drivers/vidtv/vidtv_s302m.c
301
f.data[0] = sample & 0xFF;
drivers/media/test-drivers/vidtv/vidtv_s302m.c
302
f.data[1] = (sample & 0xFF00) >> 8;
drivers/media/test-drivers/vidtv/vidtv_s302m.c
303
f.data[2] = ((sample & 0x0F) << 4) | vucf;
drivers/media/test-drivers/vidtv/vidtv_s302m.c
304
f.data[3] = (sample & 0x0FF0) >> 4;
drivers/media/test-drivers/vidtv/vidtv_s302m.c
305
f.data[4] = (sample & 0xF000) >> 12;
drivers/media/test-drivers/vidtv/vidtv_s302m.c
353
u16 sample;
drivers/media/test-drivers/vidtv/vidtv_s302m.c
363
sample = vidtv_s302m_get_sample(e);
drivers/media/test-drivers/vidtv/vidtv_s302m.c
364
nbytes_per_unit += vidtv_s302m_write_frame(e, sample);
drivers/media/usb/airspy/airspy.c
144
unsigned int sample;
drivers/media/usb/airspy/airspy.c
248
unsigned int samples = s->sample - s->sample_measured;
drivers/media/usb/airspy/airspy.c
251
s->sample_measured = s->sample;
drivers/media/usb/airspy/airspy.c
258
s->sample += src_len / 2;
drivers/media/usb/hackrf/hackrf.c
166
unsigned int sample;
drivers/media/usb/hackrf/hackrf.c
464
unsigned int samples = dev->sample - dev->sample_measured;
drivers/media/usb/hackrf/hackrf.c
467
dev->sample_measured = dev->sample;
drivers/media/usb/hackrf/hackrf.c
474
dev->sample += src_len / 2;
drivers/media/usb/msi2500/msi2500.c
138
u32 sample; /* for sample rate calc */
drivers/media/usb/msi2500/msi2500.c
246
u32 sample[3];
drivers/media/usb/msi2500/msi2500.c
252
sample[i] = src[3] << 24 | src[2] << 16 | src[1] << 8 |
drivers/media/usb/msi2500/msi2500.c
254
if (i == 0 && dev->next_sample != sample[0]) {
drivers/media/usb/msi2500/msi2500.c
257
sample[0] - dev->next_sample,
drivers/media/usb/msi2500/msi2500.c
259
sample[0]);
drivers/media/usb/msi2500/msi2500.c
282
dev->next_sample = sample[i] + 504;
drivers/media/usb/msi2500/msi2500.c
304
dev->next_sample = sample[i] + 252;
drivers/media/usb/msi2500/msi2500.c
314
dev->next_sample = sample[i] + 384;
drivers/media/usb/msi2500/msi2500.c
321
dev->next_sample = sample[i] + 504;
drivers/media/usb/msi2500/msi2500.c
328
dev->next_sample = sample[i] + 336;
drivers/media/usb/msi2500/msi2500.c
335
dev->next_sample = sample[i] + 252;
drivers/media/usb/msi2500/msi2500.c
347
unsigned int samples = dev->next_sample - dev->sample;
drivers/media/usb/msi2500/msi2500.c
350
dev->sample = dev->next_sample;
drivers/media/usb/uvc/uvc_video.c
513
const struct uvc_clock_sample *sample)
drivers/media/usb/uvc/uvc_video.c
527
if (clock->count > 0 && clock->last_sof_processed > sample->dev_sof) {
drivers/media/usb/uvc/uvc_video.c
540
clock->samples[clock->head] = *sample;
drivers/media/usb/uvc/uvc_video.c
560
struct uvc_clock_sample sample;
drivers/media/usb/uvc/uvc_video.c
602
sample.dev_sof = get_unaligned_le16(&data[header_size - 2]) & 2047;
drivers/media/usb/uvc/uvc_video.c
604
if (stream->clock.last_sof_raw == sample.dev_sof)
drivers/media/usb/uvc/uvc_video.c
606
stream->clock.last_sof_raw = sample.dev_sof;
drivers/media/usb/uvc/uvc_video.c
608
sample.dev_stc = get_unaligned_le32(&data[header_size - 6]);
drivers/media/usb/uvc/uvc_video.c
633
sample.dev_stc == 0 && sample.dev_sof == 0)
drivers/media/usb/uvc/uvc_video.c
636
sample.host_sof = usb_get_current_frame_number(stream->dev->udev);
drivers/media/usb/uvc/uvc_video.c
646
sample.dev_sof = sample.host_sof;
drivers/media/usb/uvc/uvc_video.c
669
u16 delta_sof = (sample.host_sof - sample.dev_sof) & 255;
drivers/media/usb/uvc/uvc_video.c
676
sample.dev_sof = (sample.dev_sof + stream->clock.sof_offset) & 2047;
drivers/media/usb/uvc/uvc_video.c
684
if (sof_diff(sample.dev_sof, stream->clock.last_sof_processed) <=
drivers/media/usb/uvc/uvc_video.c
689
sample.host_time = uvc_video_get_time();
drivers/media/usb/uvc/uvc_video.c
691
uvc_video_clock_add_sample(&stream->clock, &sample);
drivers/media/usb/uvc/uvc_video.c
692
stream->clock.last_sof_processed = sample.dev_sof;
drivers/media/usb/uvc/uvc_video.c
742
static u16 uvc_video_clock_host_sof(const struct uvc_clock_sample *sample)
drivers/media/usb/uvc/uvc_video.c
747
delta_sof = (sample->host_sof - sample->dev_sof) & 255;
drivers/media/usb/uvc/uvc_video.c
749
return (sample->dev_sof + delta_sof) & 2047;
drivers/mfd/mc13xxx-core.c
254
unsigned int *sample)
drivers/mfd/mc13xxx-core.c
348
MC13XXX_ADC2, &sample[i]);
drivers/mmc/host/dw_mmc-exynos.c
442
static inline void dw_mci_exynos_set_clksmpl(struct dw_mci *host, u8 sample)
drivers/mmc/host/dw_mmc-exynos.c
455
clksel = SDMMC_CLKSEL_UP_SAMPLE(clksel, sample);
drivers/mmc/host/dw_mmc-exynos.c
470
u8 sample;
drivers/mmc/host/dw_mmc-exynos.c
481
sample = (clksel + 1) & 0x7;
drivers/mmc/host/dw_mmc-exynos.c
482
clksel = SDMMC_CLKSEL_UP_SAMPLE(clksel, sample);
drivers/mmc/host/dw_mmc-exynos.c
493
return sample;
drivers/mmc/host/dw_mmc-rockchip.c
153
if (sample)
drivers/mmc/host/dw_mmc-rockchip.c
161
sample ? "sample" : "drv", degrees, delay_num,
drivers/mmc/host/dw_mmc-rockchip.c
162
rockchip_mmc_get_phase(host, sample)
drivers/mmc/host/dw_mmc-rockchip.c
168
static int rockchip_mmc_set_phase(struct dw_mci *host, bool sample, int degrees)
drivers/mmc/host/dw_mmc-rockchip.c
171
struct clk *clock = sample ? priv->sample_clk : priv->drv_clk;
drivers/mmc/host/dw_mmc-rockchip.c
174
return rockchip_mmc_set_internal_phase(host, sample, degrees);
drivers/mmc/host/dw_mmc-rockchip.c
47
static int rockchip_mmc_get_internal_phase(struct dw_mci *host, bool sample)
drivers/mmc/host/dw_mmc-rockchip.c
58
if (sample)
drivers/mmc/host/dw_mmc-rockchip.c
79
static int rockchip_mmc_get_phase(struct dw_mci *host, bool sample)
drivers/mmc/host/dw_mmc-rockchip.c
82
struct clk *clock = sample ? priv->sample_clk : priv->drv_clk;
drivers/mmc/host/dw_mmc-rockchip.c
85
return rockchip_mmc_get_internal_phase(host, sample);
drivers/mmc/host/dw_mmc-rockchip.c
90
static int rockchip_mmc_set_internal_phase(struct dw_mci *host, bool sample, int degrees)
drivers/mmc/host/sunxi-mmc.c
1123
[SDXC_CLK_400K] = { .output = 180, .sample = 180 },
drivers/mmc/host/sunxi-mmc.c
1124
[SDXC_CLK_25M] = { .output = 180, .sample = 75 },
drivers/mmc/host/sunxi-mmc.c
1125
[SDXC_CLK_50M] = { .output = 90, .sample = 120 },
drivers/mmc/host/sunxi-mmc.c
1126
[SDXC_CLK_50M_DDR] = { .output = 60, .sample = 120 },
drivers/mmc/host/sunxi-mmc.c
1128
[SDXC_CLK_50M_DDR_8BIT] = { .output = 90, .sample = 180 },
drivers/mmc/host/sunxi-mmc.c
1132
[SDXC_CLK_400K] = { .output = 180, .sample = 180 },
drivers/mmc/host/sunxi-mmc.c
1133
[SDXC_CLK_25M] = { .output = 180, .sample = 75 },
drivers/mmc/host/sunxi-mmc.c
1134
[SDXC_CLK_50M] = { .output = 150, .sample = 120 },
drivers/mmc/host/sunxi-mmc.c
1135
[SDXC_CLK_50M_DDR] = { .output = 54, .sample = 36 },
drivers/mmc/host/sunxi-mmc.c
1136
[SDXC_CLK_50M_DDR_8BIT] = { .output = 72, .sample = 72 },
drivers/mmc/host/sunxi-mmc.c
235
u32 sample;
drivers/mmc/host/sunxi-mmc.c
753
clk_set_phase(host->clk_sample, host->cfg->clk_delays[index].sample);
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
4506
struct dim_sample sample = {};
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
4512
rx_group->total_bytes, &sample);
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
4513
net_dim(&rx_group->dim, &sample);
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
4519
struct dim_sample sample = {};
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
4525
tx_group->total_bytes, &sample);
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
4526
net_dim(&tx_group->dim, &sample);
drivers/net/ethernet/huawei/hinic3/hinic3_irq.c
20
struct dim_sample sample = {};
drivers/net/ethernet/huawei/hinic3/hinic3_irq.c
27
rxq->rxq_stats.bytes, &sample);
drivers/net/ethernet/huawei/hinic3/hinic3_irq.c
28
net_dim(&rxq->dim, &sample);
drivers/net/ethernet/intel/ice/ice_txrx.c
1089
struct dim_sample *sample,
drivers/net/ethernet/intel/ice/ice_txrx.c
1121
total_packets, total_bytes, sample);
drivers/net/ethernet/intel/ice/ice_txrx.c
1122
sample->comp_ctr = 0;
drivers/net/ethernet/intel/ice/ice_txrx.c
1129
if (ktime_ms_delta(sample->time, rc->dim.start_sample.time) >= 1000)
drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/sample.c
17
sample_attr->rate = act->sample.rate;
drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/sample.c
18
sample_attr->group_num = act->sample.psample_group->group_num;
drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/sample.c
20
if (act->sample.truncate)
drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/sample.c
21
sample_attr->trunc_size = act->sample.trunc_size;
drivers/net/ethernet/mellanox/mlx5/core/en/tc/sample.c
328
u32 trunc_size = mapped_obj->sample.trunc_size;
drivers/net/ethernet/mellanox/mlx5/core/en/tc/sample.c
334
psample_group.group_num = mapped_obj->sample.group_id;
drivers/net/ethernet/mellanox/mlx5/core/en/tc/sample.c
338
psample_sample_packet(&psample_group, skb, mapped_obj->sample.rate, &md);
drivers/net/ethernet/mellanox/mlx5/core/en/tc/sample.c
521
restore_obj.sample.group_id = sample_attr->group_num;
drivers/net/ethernet/mellanox/mlx5/core/en/tc/sample.c
522
restore_obj.sample.rate = sample_attr->rate;
drivers/net/ethernet/mellanox/mlx5/core/en/tc/sample.c
523
restore_obj.sample.trunc_size = sample_attr->trunc_size;
drivers/net/ethernet/mellanox/mlx5/core/en/tc/sample.c
524
restore_obj.sample.tunnel_id = attr->tunnel_id;
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
5756
if (!mlx5e_tc_restore_tunnel(priv, skb, tc_priv, mapped_obj->sample.tunnel_id)) {
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
69
} sample;
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
1207
struct mlxsw_sp_mall_sample_entry sample;
drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c
280
act->sample.psample_group,
drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c
281
act->sample.rate,
drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c
282
act->sample.trunc_size,
drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c
283
act->sample.truncate,
drivers/net/ethernet/mellanox/mlxsw/spectrum_matchall.c
117
&mall_entry->sample.params,
drivers/net/ethernet/mellanox/mlxsw/spectrum_matchall.c
275
mall_entry->sample.params.psample_group = act->sample.psample_group;
drivers/net/ethernet/mellanox/mlxsw/spectrum_matchall.c
276
mall_entry->sample.params.truncate = act->sample.truncate;
drivers/net/ethernet/mellanox/mlxsw/spectrum_matchall.c
277
mall_entry->sample.params.trunc_size = act->sample.trunc_size;
drivers/net/ethernet/mellanox/mlxsw/spectrum_matchall.c
278
mall_entry->sample.params.rate = act->sample.rate;
drivers/net/ethernet/mellanox/mlxsw/spectrum_matchall.c
384
u32 rate = mall_entry->sample.params.rate;
drivers/net/ethernet/mellanox/mlxsw/spectrum_matchall.c
421
u32 rate = mall_entry->sample.params.rate;
drivers/net/ethernet/mellanox/mlxsw/spectrum_matchall.c
425
err = mlxsw_sp_span_agent_get(mlxsw_sp, &mall_entry->sample.span_id,
drivers/net/ethernet/mellanox/mlxsw/spectrum_matchall.c
441
trigger_parms.span_id = mall_entry->sample.span_id;
drivers/net/ethernet/mellanox/mlxsw/spectrum_matchall.c
455
mlxsw_sp_span_agent_put(mlxsw_sp, mall_entry->sample.span_id);
drivers/net/ethernet/mellanox/mlxsw/spectrum_matchall.c
468
trigger_parms.span_id = mall_entry->sample.span_id;
drivers/net/ethernet/mellanox/mlxsw/spectrum_matchall.c
472
mlxsw_sp_span_agent_put(mlxsw_sp, mall_entry->sample.span_id);
drivers/net/ethernet/wangxun/libwx/wx_lib.c
891
struct dim_sample sample = {};
drivers/net/ethernet/wangxun/libwx/wx_lib.c
896
&sample);
drivers/net/ethernet/wangxun/libwx/wx_lib.c
898
net_dim(&q_vector->rx.dim, &sample);
drivers/net/ethernet/wangxun/libwx/wx_lib.c
903
struct dim_sample sample = {};
drivers/net/ethernet/wangxun/libwx/wx_lib.c
908
&sample);
drivers/net/ethernet/wangxun/libwx/wx_lib.c
910
net_dim(&q_vector->tx.dim, &sample);
drivers/net/ethernet/xilinx/xilinx_axienet_main.c
1306
struct dim_sample sample = {
drivers/net/ethernet/xilinx/xilinx_axienet_main.c
1314
net_dim(&lp->rx_dim, &sample);
drivers/net/mdio/mdio-cavium.h
41
OCT_MDIO_BITFIELD_FIELD(u64 sample:4,
drivers/net/wireless/ath/ath9k/common-spectral.c
100
sample = sample_end - SPECTRAL_HT20_40_SAMPLE_LEN + 1;
drivers/net/wireless/ath/ath9k/common-spectral.c
118
if (((sample[upper_max_index + dc_pos] & 0xf8) !=
drivers/net/wireless/ath/ath9k/common-spectral.c
120
((sample[lower_max_index] & 0xf8) !=
drivers/net/wireless/ath/ath9k/common-spectral.c
47
u8 *sample;
drivers/net/wireless/ath/ath9k/common-spectral.c
61
sample = sample_end - SPECTRAL_HT20_SAMPLE_LEN + 1;
drivers/net/wireless/ath/ath9k/common-spectral.c
75
if ((sample[max_index] & 0xf8) != ((max_magnitude >> max_exp) & 0xf8))
drivers/net/wireless/ath/ath9k/common-spectral.c
85
u8 *sample;
drivers/net/wireless/broadcom/b43/phy_lp.c
1773
struct cordic_iq sample;
drivers/net/wireless/broadcom/b43/phy_lp.c
1789
sample = cordic_calc_iq(CORDIC_FIXED(theta));
drivers/net/wireless/broadcom/b43/phy_lp.c
1791
buf[i] = CORDIC_FLOAT((sample.i * max) & 0xFF) << 8;
drivers/net/wireless/broadcom/b43/phy_lp.c
1792
buf[i] |= CORDIC_FLOAT((sample.q * max) & 0xFF);
drivers/platform/chrome/cros_ec_sensorhub_ring.c
398
*sample)
drivers/platform/chrome/cros_ec_sensorhub_ring.c
40
struct cros_ec_sensors_ring_sample *sample)
drivers/platform/chrome/cros_ec_sensorhub_ring.c
400
const u8 sensor_id = sample->sensor_id;
drivers/platform/chrome/cros_ec_sensorhub_ring.c
404
sample->timestamp)
drivers/platform/chrome/cros_ec_sensorhub_ring.c
406
sample->timestamp =
drivers/platform/chrome/cros_ec_sensorhub_ring.c
410
sample->timestamp;
drivers/platform/chrome/cros_ec_sensorhub_ring.c
43
int id = sample->sensor_id;
drivers/platform/chrome/cros_ec_sensorhub_ring.c
55
if (sample->flag & MOTIONSENSE_SENSOR_FLAG_FLUSH)
drivers/platform/chrome/cros_ec_sensorhub_ring.c
58
return cb(indio_dev, sample->vector, sample->timestamp);
drivers/power/supply/ab8500_fg.c
378
static int ab8500_fg_add_cap_sample(struct ab8500_fg *di, int sample)
drivers/power/supply/ab8500_fg.c
384
avg->sum += sample - avg->samples[avg->pos];
drivers/power/supply/ab8500_fg.c
385
avg->samples[avg->pos] = sample;
drivers/power/supply/ab8500_fg.c
435
static void ab8500_fg_fill_cap_sample(struct ab8500_fg *di, int sample)
drivers/power/supply/ab8500_fg.c
444
avg->samples[i] = sample;
drivers/power/supply/ab8500_fg.c
450
avg->sum = sample * NBR_AVG_SAMPLES;
drivers/power/supply/ab8500_fg.c
451
avg->avg = sample;
drivers/power/supply/cpcap-battery.c
101
s32 sample; /* 24 or 32 bits */
drivers/power/supply/cpcap-battery.c
255
s32 sample, s32 accumulator,
drivers/power/supply/cpcap-battery.c
264
acc -= (s64)sample * offset;
drivers/power/supply/cpcap-battery.c
274
s32 sample, s32 accumulator,
drivers/power/supply/cpcap-battery.c
277
return cpcap_battery_cc_raw_div(ddata, sample,
drivers/power/supply/cpcap-battery.c
283
s32 sample, s32 accumulator,
drivers/power/supply/cpcap-battery.c
286
return cpcap_battery_cc_raw_div(ddata, sample,
drivers/power/supply/cpcap-battery.c
288
sample *
drivers/power/supply/cpcap-battery.c
314
ccd->sample = 0;
drivers/power/supply/cpcap-battery.c
326
ccd->sample = (buf[1] & 0x0fff) << 16;
drivers/power/supply/cpcap-battery.c
327
ccd->sample |= buf[0];
drivers/power/supply/cpcap-battery.c
329
ccd->sample = sign_extend32(24, ccd->sample);
drivers/power/supply/cpcap-battery.c
349
ccd->sample,
drivers/power/supply/cpcap-battery.c
473
s32 sample;
drivers/power/supply/cpcap-battery.c
483
sample = 1;
drivers/power/supply/cpcap-battery.c
486
sample = 4;
drivers/power/supply/cpcap-battery.c
496
return cpcap_battery_cc_to_ua(ddata, sample, acc, offset);
drivers/power/supply/cpcap-battery.c
671
u32 sample;
drivers/power/supply/cpcap-battery.c
719
sample = latest->cc.sample - previous->cc.sample;
drivers/power/supply/cpcap-battery.c
720
if (!sample) {
drivers/power/supply/cpcap-battery.c
725
val->intval = cpcap_battery_cc_to_ua(ddata, sample,
drivers/power/supply/cpcap-battery.c
740
sample = latest->cc.sample - previous->cc.sample;
drivers/power/supply/cpcap-battery.c
741
if (!sample) {
drivers/power/supply/cpcap-battery.c
748
tmp = cpcap_battery_cc_to_ua(ddata, sample, accumulator,
drivers/thermal/armada_thermal.c
372
s64 sample, b, m;
drivers/thermal/armada_thermal.c
378
sample = sign_extend32(reg, fls(priv->data->temp_mask) - 1);
drivers/thermal/armada_thermal.c
380
sample = reg;
drivers/thermal/armada_thermal.c
388
*temp = div_s64((m * sample) - b, div);
drivers/thermal/armada_thermal.c
390
*temp = div_s64(b - (m * sample), div);
drivers/thermal/armada_thermal.c
455
unsigned int sample;
drivers/thermal/armada_thermal.c
458
sample = div_s64(((temp_mc * div) + b), m);
drivers/thermal/armada_thermal.c
460
sample = div_s64((b - (temp_mc * div)), m);
drivers/thermal/armada_thermal.c
462
return sample & data->temp_mask;
drivers/w1/masters/sgi_w1.c
19
#define MCR_PACK(pulse, sample) (((pulse) << 10) | ((sample) << 2))
fs/btrfs/compression.c
1493
const u8 *data = ws->sample;
fs/btrfs/compression.c
1535
memcpy(&ws->sample[curr_sample_pos], &in_data[i],
fs/btrfs/compression.c
1581
byte = ws->sample[i];
fs/btrfs/compression.c
651
u8 *sample;
fs/btrfs/compression.c
666
kvfree(workspace->sample);
fs/btrfs/compression.c
680
ws->sample = kvmalloc(MAX_SAMPLE_SIZE, GFP_KERNEL);
fs/btrfs/compression.c
681
if (!ws->sample)
fs/gfs2/lock_dlm.c
30
s64 sample)
fs/gfs2/lock_dlm.c
50
s64 delta = sample - s->stats[index];
fs/ntfs3/fsntfs.c
134
u16 sample;
fs/ntfs3/fsntfs.c
1444
__le16 sample = cpu_to_le16(-1u);
fs/ntfs3/fsntfs.c
1471
sample = *fixup;
fs/ntfs3/fsntfs.c
1472
t16 = le16_to_cpu(sample);
fs/ntfs3/fsntfs.c
1474
sample = *fixup = cpu_to_le16(1);
fs/ntfs3/fsntfs.c
1476
sample = cpu_to_le16(t16 + 1);
fs/ntfs3/fsntfs.c
1477
*fixup = sample;
fs/ntfs3/fsntfs.c
1480
*(__le16 *)Add2Ptr(rhdr, fo) = sample;
fs/ntfs3/fsntfs.c
1487
*ptr = sample;
fs/ntfs3/fsntfs.c
151
sample = *fixup;
fs/ntfs3/fsntfs.c
157
*ptr = sample;
fs/ntfs3/fsntfs.c
173
u16 sample, fo, fn;
fs/ntfs3/fsntfs.c
187
sample = *fixup;
fs/ntfs3/fsntfs.c
193
if (*ptr != sample) {
fs/smb/client/compress.c
143
static bool has_repeated_data(const u8 *sample, size_t len)
fs/smb/client/compress.c
147
return (!memcmp(&sample[0], &sample[s], s));
fs/smb/client/compress.c
164
static int collect_sample(const struct iov_iter *source, ssize_t max, u8 *sample)
fs/smb/client/compress.c
173
n = copy_from_iter(sample + s, part, &iter);
fs/smb/client/compress.c
203
u8 *sample;
fs/smb/client/compress.c
215
sample = kvzalloc(len, GFP_KERNEL);
fs/smb/client/compress.c
216
if (!sample) {
fs/smb/client/compress.c
223
i = collect_sample(data, len, sample);
fs/smb/client/compress.c
233
if (has_repeated_data(sample, len))
fs/smb/client/compress.c
245
bkt[sample[i]].count++;
fs/smb/client/compress.c
262
kvfree(sample);
include/linux/mfd/mc13xxx.h
32
u8 ato, bool atox, unsigned int *sample);
include/linux/perf_event.h
1532
struct perf_sample_data *sample);
include/linux/wm97xx.h
234
int (*poll_sample) (struct wm97xx *, int adcsel, int *sample);
include/net/flow_offload.h
292
} sample;
include/net/gen_stats.h
83
struct gnet_stats_rate_est64 *sample);
include/net/tcp.h
1362
void (*pkts_acked)(struct sock *sk, const struct ack_sample *sample);
include/sound/intel-nhlt.h
44
} sample;
include/sound/soundfont.h
27
struct snd_sf_sample *sample; /* Link to sample */
include/uapi/drm/i915_drm.h
269
#define __I915_PMU_ENGINE(class, instance, sample) \
include/uapi/drm/i915_drm.h
272
(sample))
include/uapi/sound/sfnt_info.h
103
unsigned short sample; /* sample id */
include/uapi/sound/sfnt_info.h
148
unsigned short sample; /* sample id */
kernel/bpf/ringbuf.c
559
static void bpf_ringbuf_commit(void *sample, u64 flags, bool discard)
kernel/bpf/ringbuf.c
566
hdr = sample - BPF_RINGBUF_HDR_SZ;
kernel/bpf/ringbuf.c
587
BPF_CALL_2(bpf_ringbuf_submit, void *, sample, u64, flags)
kernel/bpf/ringbuf.c
589
bpf_ringbuf_commit(sample, flags, false /* discard */);
kernel/bpf/ringbuf.c
600
BPF_CALL_2(bpf_ringbuf_discard, void *, sample, u64, flags)
kernel/bpf/ringbuf.c
602
bpf_ringbuf_commit(sample, flags, true /* discard */);
kernel/bpf/ringbuf.c
674
void *sample;
kernel/bpf/ringbuf.c
690
sample = __bpf_ringbuf_reserve(rb_map->rb, size);
kernel/bpf/ringbuf.c
691
if (!sample) {
kernel/bpf/ringbuf.c
696
bpf_dynptr_init(ptr, sample, BPF_DYNPTR_TYPE_RINGBUF, 0, size);
kernel/bpf/ringbuf.c
748
static int __bpf_user_ringbuf_peek(struct bpf_ringbuf *rb, void **sample, u32 *size)
kernel/bpf/ringbuf.c
797
*sample = (void *)((uintptr_t)rb->data +
kernel/bpf/ringbuf.c
838
void *sample;
kernel/bpf/ringbuf.c
841
err = __bpf_user_ringbuf_peek(rb, &sample, &size);
kernel/bpf/ringbuf.c
854
bpf_dynptr_init(&dynptr, sample, BPF_DYNPTR_TYPE_LOCAL, 0, size);
kernel/events/core.c
10015
perf_event_header__init_id(&rec.header, &sample, event);
kernel/events/core.c
10016
ret = perf_output_begin(&handle, &sample, event, rec.header.size);
kernel/events/core.c
10022
perf_event__output_id_sample(event, &handle, &sample);
kernel/events/core.c
10033
struct perf_sample_data sample;
kernel/events/core.c
10048
perf_event_header__init_id(&lost_samples_event.header, &sample, event);
kernel/events/core.c
10050
ret = perf_output_begin(&handle, &sample, event,
kernel/events/core.c
10056
perf_event__output_id_sample(event, &handle, &sample);
kernel/events/core.c
10084
struct perf_sample_data sample;
kernel/events/core.c
10103
perf_event_header__init_id(&se->event_id.header, &sample, event);
kernel/events/core.c
10105
ret = perf_output_begin(&handle, &sample, event, se->event_id.header.size);
kernel/events/core.c
10114
perf_event__output_id_sample(event, &handle, &sample);
kernel/events/core.c
10155
struct perf_sample_data sample;
kernel/events/core.c
10177
perf_event_header__init_id(&throttle_event.header, &sample, event);
kernel/events/core.c
10179
ret = perf_output_begin(&handle, &sample, event,
kernel/events/core.c
10185
perf_event__output_id_sample(event, &handle, &sample);
kernel/events/core.c
10214
struct perf_sample_data sample;
kernel/events/core.c
10221
&sample, event);
kernel/events/core.c
10222
ret = perf_output_begin(&handle, &sample, event,
kernel/events/core.c
10229
perf_event__output_id_sample(event, &handle, &sample);
kernel/events/core.c
10304
struct perf_sample_data sample;
kernel/events/core.c
10311
&sample, event);
kernel/events/core.c
10312
ret = perf_output_begin(&handle, &sample, event,
kernel/events/core.c
10318
perf_event__output_id_sample(event, &handle, &sample);
kernel/events/core.c
10397
struct perf_sample_data sample;
kernel/events/core.c
10404
perf_event_header__init_id(&deferred_event->event.header, &sample, event);
kernel/events/core.c
10406
ret = perf_output_begin(&handle, &sample, event,
kernel/events/core.c
10416
perf_event__output_id_sample(event, &handle, &sample);
kernel/events/core.c
10466
struct perf_sample_data sample;
kernel/events/core.c
10473
perf_event_header__init_id(&text_poke_event->event_id.header, &sample, event);
kernel/events/core.c
10475
ret = perf_output_begin(&handle, &sample, event,
kernel/events/core.c
10490
perf_event__output_id_sample(event, &handle, &sample);
kernel/events/core.c
10535
struct perf_sample_data sample;
kernel/events/core.c
10556
perf_event_header__init_id(&rec.header, &sample, event);
kernel/events/core.c
10557
ret = perf_output_begin(&handle, &sample, event, rec.header.size);
kernel/events/core.c
10563
perf_event__output_id_sample(event, &handle, &sample);
kernel/events/core.c
10571
struct perf_sample_data sample;
kernel/events/core.c
10586
perf_event_header__init_id(&rec.header, &sample, event);
kernel/events/core.c
10587
ret = perf_output_begin(&handle, &sample, event, rec.header.size);
kernel/events/core.c
10593
perf_event__output_id_sample(event, &handle, &sample);
kernel/events/core.c
11801
struct perf_sample_data sample;
kernel/events/core.c
11809
perf_sample_data_init(&sample, bp->attr.bp_addr, 0);
kernel/events/core.c
11812
perf_swevent_event(bp, 1, &sample, regs);
kernel/events/core.c
8127
struct perf_sample_data *sample)
kernel/events/core.c
8130
__perf_event__output_id_sample(handle, sample);
kernel/events/core.c
8928
struct perf_sample_data sample;
kernel/events/core.c
8940
perf_event_header__init_id(&read_event.header, &sample, event);
kernel/events/core.c
8941
ret = perf_output_begin(&handle, &sample, event, read_event.header.size);
kernel/events/core.c
8947
perf_event__output_id_sample(event, &handle, &sample);
kernel/events/core.c
9195
struct perf_sample_data sample;
kernel/events/core.c
9202
perf_event_header__init_id(&task_event->event_id.header, &sample, event);
kernel/events/core.c
9204
ret = perf_output_begin(&handle, &sample, event,
kernel/events/core.c
9226
perf_event__output_id_sample(event, &handle, &sample);
kernel/events/core.c
9347
struct perf_sample_data sample;
kernel/events/core.c
9354
perf_event_header__init_id(&comm_event->event_id.header, &sample, event);
kernel/events/core.c
9355
ret = perf_output_begin(&handle, &sample, event,
kernel/events/core.c
9368
perf_event__output_id_sample(event, &handle, &sample);
kernel/events/core.c
9446
struct perf_sample_data sample;
kernel/events/core.c
9454
&sample, event);
kernel/events/core.c
9455
ret = perf_output_begin(&handle, &sample, event,
kernel/events/core.c
9467
perf_event__output_id_sample(event, &handle, &sample);
kernel/events/core.c
9573
struct perf_sample_data sample;
kernel/events/core.c
9581
&sample, event);
kernel/events/core.c
9582
ret = perf_output_begin(&handle, &sample, event,
kernel/events/core.c
9590
perf_event__output_id_sample(event, &handle, &sample);
kernel/events/core.c
9691
struct perf_sample_data sample;
kernel/events/core.c
9710
perf_event_header__init_id(&mmap_event->event_id.header, &sample, event);
kernel/events/core.c
9711
ret = perf_output_begin(&handle, &sample, event,
kernel/events/core.c
9745
perf_event__output_id_sample(event, &handle, &sample);
kernel/events/core.c
9997
struct perf_sample_data sample;
kernel/sched/fair.c
1809
static inline void update_avg_scale(u64 *avg, u64 sample)
kernel/sched/fair.c
1812
s64 diff = sample - *avg;
kernel/sched/psi.c
549
u32 sample;
kernel/sched/psi.c
551
sample = group->total[PSI_AVGS][s] - group->avg_total[s];
kernel/sched/psi.c
569
if (sample > period)
kernel/sched/psi.c
570
sample = period;
kernel/sched/psi.c
571
group->avg_total[s] += sample;
kernel/sched/psi.c
572
calc_avgs(group->avg[s], missed_periods, sample, period);
kernel/sched/sched.h
241
static inline void update_avg(u64 *avg, u64 sample)
kernel/sched/sched.h
243
s64 diff = sample - *avg;
kernel/trace/trace_hwlat.c
130
static void trace_hwlat_sample(struct hwlat_sample *sample)
kernel/trace/trace_hwlat.c
142
entry->seqnum = sample->seqnum;
kernel/trace/trace_hwlat.c
143
entry->duration = sample->duration;
kernel/trace/trace_hwlat.c
144
entry->outer_duration = sample->outer_duration;
kernel/trace/trace_hwlat.c
145
entry->timestamp = sample->timestamp;
kernel/trace/trace_hwlat.c
146
entry->nmi_total_ts = sample->nmi_total_ts;
kernel/trace/trace_hwlat.c
147
entry->nmi_count = sample->nmi_count;
kernel/trace/trace_hwlat.c
148
entry->count = sample->count;
kernel/trace/trace_hwlat.c
205
u64 sample = 0;
kernel/trace/trace_hwlat.c
267
if (diff > sample)
kernel/trace/trace_hwlat.c
268
sample = diff; /* only want highest value */
kernel/trace/trace_hwlat.c
279
if (sample > thresh || outer_sample > thresh) {
kernel/trace/trace_hwlat.c
289
s.duration = sample;
kernel/trace/trace_hwlat.c
296
latency = max(sample, outer_sample);
kernel/trace/trace_osnoise.c
1434
u64 start, sample, last_sample;
kernel/trace/trace_osnoise.c
1503
int_count = set_int_safe_time(osn_var, &sample);
kernel/trace/trace_osnoise.c
1505
noise = time_sub(sample, last_sample);
kernel/trace/trace_osnoise.c
1518
total = time_sub(sample, start);
kernel/trace/trace_osnoise.c
1577
last_sample = sample;
kernel/trace/trace_osnoise.c
501
__record_osnoise_sample(struct osnoise_sample *sample, struct trace_buffer *buffer)
kernel/trace/trace_osnoise.c
511
entry->runtime = sample->runtime;
kernel/trace/trace_osnoise.c
512
entry->noise = sample->noise;
kernel/trace/trace_osnoise.c
513
entry->max_sample = sample->max_sample;
kernel/trace/trace_osnoise.c
514
entry->hw_count = sample->hw_count;
kernel/trace/trace_osnoise.c
515
entry->nmi_count = sample->nmi_count;
kernel/trace/trace_osnoise.c
516
entry->irq_count = sample->irq_count;
kernel/trace/trace_osnoise.c
517
entry->softirq_count = sample->softirq_count;
kernel/trace/trace_osnoise.c
518
entry->thread_count = sample->thread_count;
kernel/trace/trace_osnoise.c
526
static void record_osnoise_sample(struct osnoise_sample *sample)
kernel/trace/trace_osnoise.c
531
trace_osnoise_sample(sample);
kernel/trace/trace_osnoise.c
536
__record_osnoise_sample(sample, buffer);
kernel/trace/trace_osnoise.c
580
__record_timerlat_sample(struct timerlat_sample *sample, struct trace_buffer *buffer)
kernel/trace/trace_osnoise.c
590
entry->seqnum = sample->seqnum;
kernel/trace/trace_osnoise.c
591
entry->context = sample->context;
kernel/trace/trace_osnoise.c
592
entry->timer_latency = sample->timer_latency;
kernel/trace/trace_osnoise.c
600
static void record_timerlat_sample(struct timerlat_sample *sample)
kernel/trace/trace_osnoise.c
605
trace_timerlat_sample(sample);
kernel/trace/trace_osnoise.c
610
__record_timerlat_sample(sample, buffer);
net/core/gen_estimator.c
259
struct gnet_stats_rate_est64 *sample)
net/core/gen_estimator.c
273
sample->bps = est->avbps >> 8;
net/core/gen_estimator.c
274
sample->pps = est->avpps >> 8;
net/core/gen_stats.c
310
struct gnet_stats_rate_est64 sample;
net/core/gen_stats.c
314
if (!gen_estimator_read(rate_est, &sample))
net/core/gen_stats.c
316
est.bps = min_t(u64, UINT_MAX, sample.bps);
net/core/gen_stats.c
318
est.pps = sample.pps;
net/core/gen_stats.c
328
if (res < 0 || est.bps == sample.bps)
net/core/gen_stats.c
331
return gnet_stats_copy(d, TCA_STATS_RATE_EST64, &sample,
net/core/gen_stats.c
332
sizeof(sample), TCA_STATS_PAD);
net/ipv4/bpf_tcp_ca.c
283
static void bpf_tcp_ca_pkts_acked(struct sock *sk, const struct ack_sample *sample)
net/ipv4/tcp_bic.c
190
static void bictcp_acked(struct sock *sk, const struct ack_sample *sample)
net/ipv4/tcp_bic.c
197
ca->delayed_ack += sample->pkts_acked -
net/ipv4/tcp_cdg.c
299
static void tcp_cdg_acked(struct sock *sk, const struct ack_sample *sample)
net/ipv4/tcp_cdg.c
304
if (sample->rtt_us <= 0)
net/ipv4/tcp_cdg.c
312
if (sample->pkts_acked == 1 && ca->delack) {
net/ipv4/tcp_cdg.c
316
ca->rtt.min = min(ca->rtt.min, sample->rtt_us);
net/ipv4/tcp_cdg.c
319
} else if (sample->pkts_acked > 1 && ca->delack < 5) {
net/ipv4/tcp_cdg.c
324
ca->rtt.min = min_not_zero(ca->rtt.min, sample->rtt_us);
net/ipv4/tcp_cdg.c
325
ca->rtt.max = max(ca->rtt.max, sample->rtt_us);
net/ipv4/tcp_cubic.c
449
__bpf_kfunc static void cubictcp_acked(struct sock *sk, const struct ack_sample *sample)
net/ipv4/tcp_cubic.c
456
if (sample->rtt_us < 0)
net/ipv4/tcp_cubic.c
463
delay = sample->rtt_us;
net/ipv4/tcp_htcp.c
102
const struct ack_sample *sample)
net/ipv4/tcp_htcp.c
110
ca->pkts_acked = sample->pkts_acked;
net/ipv4/tcp_htcp.c
112
if (sample->rtt_us > 0)
net/ipv4/tcp_htcp.c
113
measure_rtt(sk, usecs_to_jiffies(sample->rtt_us));
net/ipv4/tcp_htcp.c
125
ca->packetcount += sample->pkts_acked;
net/ipv4/tcp_illinois.c
86
static void tcp_illinois_acked(struct sock *sk, const struct ack_sample *sample)
net/ipv4/tcp_illinois.c
89
s32 rtt_us = sample->rtt_us;
net/ipv4/tcp_illinois.c
91
ca->acked = sample->pkts_acked;
net/ipv4/tcp_input.c
3773
struct ack_sample sample = { .pkts_acked = pkts_acked,
net/ipv4/tcp_input.c
3776
sample.in_flight = tp->mss_cache *
net/ipv4/tcp_input.c
3778
icsk->icsk_ca_ops->pkts_acked(sk, &sample);
net/ipv4/tcp_input.c
829
static void tcp_rcv_rtt_update(struct tcp_sock *tp, u32 sample, int win_dep)
net/ipv4/tcp_input.c
832
long m = sample << 3;
net/ipv4/tcp_input.c
852
new_sample = old_sample - (old_sample >> 3) + sample;
net/ipv4/tcp_lp.c
274
static void tcp_lp_pkts_acked(struct sock *sk, const struct ack_sample *sample)
net/ipv4/tcp_lp.c
281
if (sample->rtt_us > 0)
net/ipv4/tcp_lp.c
282
tcp_lp_rtt_sample(sk, sample->rtt_us);
net/ipv4/tcp_nv.c
239
static void tcpnv_acked(struct sock *sk, const struct ack_sample *sample)
net/ipv4/tcp_nv.c
251
if (sample->rtt_us < 0)
net/ipv4/tcp_nv.c
268
if (sample->in_flight == 0)
net/ipv4/tcp_nv.c
274
avg_rtt = (((u64)sample->rtt_us) * nv_rtt_factor +
net/ipv4/tcp_nv.c
278
avg_rtt = sample->rtt_us;
net/ipv4/tcp_nv.c
283
avg_rtt = sample->rtt_us;
net/ipv4/tcp_nv.c
287
rate64 = ((u64)sample->in_flight) * 80000;
net/ipv4/tcp_vegas.c
111
void tcp_vegas_pkts_acked(struct sock *sk, const struct ack_sample *sample)
net/ipv4/tcp_vegas.c
116
if (sample->rtt_us < 0)
net/ipv4/tcp_vegas.c
120
vrtt = sample->rtt_us + 1;
net/ipv4/tcp_vegas.h
21
void tcp_vegas_pkts_acked(struct sock *sk, const struct ack_sample *sample);
net/ipv4/tcp_veno.c
74
const struct ack_sample *sample)
net/ipv4/tcp_veno.c
79
if (sample->rtt_us < 0)
net/ipv4/tcp_veno.c
83
vrtt = sample->rtt_us + 1;
net/ipv4/tcp_westwood.c
104
const struct ack_sample *sample)
net/ipv4/tcp_westwood.c
108
if (sample->rtt_us > 0)
net/ipv4/tcp_westwood.c
109
w->rtt = usecs_to_jiffies(sample->rtt_us);
net/mac80211/rc80211_minstrel_ht.c
1002
mi->sample[MINSTREL_SAMPLE_TYPE_JUMP].sample_group = group;
net/mac80211/rc80211_minstrel_ht.c
1018
rates = mi->sample[MINSTREL_SAMPLE_TYPE_INC].sample_rates;
net/mac80211/rc80211_minstrel_ht.c
1029
rates = mi->sample[MINSTREL_SAMPLE_TYPE_JUMP].sample_rates;
net/mac80211/rc80211_minstrel_ht.c
1043
for (i = 0; i < ARRAY_SIZE(mi->sample); i++)
net/mac80211/rc80211_minstrel_ht.c
1044
memcpy(mi->sample[i].cur_sample_rates, mi->sample[i].sample_rates,
net/mac80211/rc80211_minstrel_ht.c
1045
sizeof(mi->sample[i].cur_sample_rates));
net/mac80211/rc80211_minstrel_ht.c
704
u16 *rates = mi->sample[type].sample_rates;
net/mac80211/rc80211_minstrel_ht.c
791
u16 cur = mi->sample[type].sample_rates[i];
net/mac80211/rc80211_minstrel_ht.c
807
u16 *rates = mi->sample[type].sample_rates;
net/mac80211/rc80211_minstrel_ht.c
881
group = mi->sample[type].sample_group;
net/mac80211/rc80211_minstrel_ht.c
897
mi->sample[type].sample_group = group;
net/mac80211/rc80211_minstrel_ht.c
951
slow_rates = mi->sample[MINSTREL_SAMPLE_TYPE_SLOW].sample_rates;
net/mac80211/rc80211_minstrel_ht.c
952
group = mi->sample[MINSTREL_SAMPLE_TYPE_JUMP].sample_group;
net/mac80211/rc80211_minstrel_ht.h
189
struct minstrel_sample_category sample[__MINSTREL_SAMPLE_TYPE_MAX];
net/mac80211/rc80211_minstrel_ht_debugfs.c
40
for (type = 0; type < ARRAY_SIZE(mi->sample); type++)
net/mac80211/rc80211_minstrel_ht_debugfs.c
42
if (mi->sample[type].cur_sample_rates[i] == idx)
net/netfilter/xt_rateest.c
18
struct gnet_stats_rate_est64 sample = {0};
net/netfilter/xt_rateest.c
22
gen_estimator_read(&info->est1->rate_est, &sample);
net/netfilter/xt_rateest.c
25
bps1 = info->bps1 >= sample.bps ? info->bps1 - sample.bps : 0;
net/netfilter/xt_rateest.c
26
pps1 = info->pps1 >= sample.pps ? info->pps1 - sample.pps : 0;
net/netfilter/xt_rateest.c
28
bps1 = sample.bps;
net/netfilter/xt_rateest.c
29
pps1 = sample.pps;
net/netfilter/xt_rateest.c
36
gen_estimator_read(&info->est2->rate_est, &sample);
net/netfilter/xt_rateest.c
39
bps2 = info->bps2 >= sample.bps ? info->bps2 - sample.bps : 0;
net/netfilter/xt_rateest.c
40
pps2 = info->pps2 >= sample.pps ? info->pps2 - sample.pps : 0;
net/netfilter/xt_rateest.c
42
bps2 = sample.bps;
net/netfilter/xt_rateest.c
43
pps2 = sample.pps;
net/openvswitch/actions.c
1364
err = sample(dp, skb, key, a, last);
net/sched/act_police.c
262
struct gnet_stats_rate_est64 sample;
net/sched/act_police.c
264
if (!gen_estimator_read(&police->tcf_rate_est, &sample) ||
net/sched/act_police.c
265
sample.bps >= p->tcfp_ewma_rate)
net/sched/act_sample.c
291
entry->sample.psample_group =
net/sched/act_sample.c
293
entry->destructor_priv = entry->sample.psample_group;
net/sched/act_sample.c
304
entry->sample.trunc_size = tcf_sample_trunc_size(act);
net/sched/act_sample.c
305
entry->sample.truncate = tcf_sample_truncate(act);
net/sched/act_sample.c
306
entry->sample.rate = tcf_sample_rate(act);
net/sched/sch_cake.c
1373
static u64 cake_ewma(u64 avg, u64 sample, u32 shift)
net/sched/sch_cake.c
1376
avg += sample >> shift;
net/sched/sch_fq.c
666
unsigned long sample;
net/sched/sch_fq.c
675
sample = (unsigned long)(now - q->time_next_delayed_flow);
net/sched/sch_fq.c
676
if ((long)sample > 0) {
net/sched/sch_fq.c
678
q->unthrottle_latency_ns += sample >> 3;
samples/ftrace/sample-trace-array.h
27
#define TRACE_SYSTEM sample-subsystem
samples/ftrace/sample-trace-array.h
83
#define TRACE_INCLUDE_FILE sample-trace-array
samples/qmi/qmi_sample_client.c
456
struct qmi_sample *sample;
samples/qmi/qmi_sample_client.c
460
sample = devm_kzalloc(&pdev->dev, sizeof(*sample), GFP_KERNEL);
samples/qmi/qmi_sample_client.c
461
if (!sample)
samples/qmi/qmi_sample_client.c
464
ret = qmi_handle_init(&sample->qmi, TEST_DATA_REQ_MAX_MSG_LEN_V01,
samples/qmi/qmi_sample_client.c
471
ret = kernel_connect(sample->qmi.sock, (struct sockaddr_unsized *)sq,
samples/qmi/qmi_sample_client.c
480
sample->de_dir = debugfs_create_dir(path, qmi_debug_dir);
samples/qmi/qmi_sample_client.c
481
if (IS_ERR(sample->de_dir)) {
samples/qmi/qmi_sample_client.c
482
ret = PTR_ERR(sample->de_dir);
samples/qmi/qmi_sample_client.c
486
sample->de_data = debugfs_create_file("data", 0600, sample->de_dir,
samples/qmi/qmi_sample_client.c
487
sample, &data_fops);
samples/qmi/qmi_sample_client.c
488
if (IS_ERR(sample->de_data)) {
samples/qmi/qmi_sample_client.c
489
ret = PTR_ERR(sample->de_data);
samples/qmi/qmi_sample_client.c
493
sample->de_ping = debugfs_create_file("ping", 0600, sample->de_dir,
samples/qmi/qmi_sample_client.c
494
sample, &ping_fops);
samples/qmi/qmi_sample_client.c
495
if (IS_ERR(sample->de_ping)) {
samples/qmi/qmi_sample_client.c
496
ret = PTR_ERR(sample->de_ping);
samples/qmi/qmi_sample_client.c
500
platform_set_drvdata(pdev, sample);
samples/qmi/qmi_sample_client.c
505
debugfs_remove(sample->de_data);
samples/qmi/qmi_sample_client.c
507
debugfs_remove(sample->de_dir);
samples/qmi/qmi_sample_client.c
509
qmi_handle_release(&sample->qmi);
samples/qmi/qmi_sample_client.c
516
struct qmi_sample *sample = platform_get_drvdata(pdev);
samples/qmi/qmi_sample_client.c
518
debugfs_remove(sample->de_ping);
samples/qmi/qmi_sample_client.c
519
debugfs_remove(sample->de_data);
samples/qmi/qmi_sample_client.c
520
debugfs_remove(sample->de_dir);
samples/qmi/qmi_sample_client.c
522
qmi_handle_release(&sample->qmi);
samples/trace_events/trace-events-sample.h
26
#define TRACE_SYSTEM sample-trace
samples/trace_events/trace-events-sample.h
639
#define TRACE_INCLUDE_FILE trace-events-sample
sound/core/oss/mulaw.c
143
unsigned char *dst, u16 sample)
sound/core/oss/mulaw.c
145
sample ^= data->flip;
sound/core/oss/mulaw.c
147
sample = swab16(sample);
sound/core/oss/mulaw.c
150
memcpy(dst + data->native_ofs, (char *)&sample + data->copy_ofs,
sound/core/oss/mulaw.c
180
signed short sample = ulaw2linear(*src);
sound/core/oss/mulaw.c
181
cvt_s16_to_native(data, dst, sample);
sound/core/oss/mulaw.c
191
u16 sample = 0;
sound/core/oss/mulaw.c
192
memcpy((char *)&sample + data->copy_ofs, src + data->native_ofs,
sound/core/oss/mulaw.c
195
sample = swab16(sample);
sound/core/oss/mulaw.c
196
sample ^= data->flip;
sound/core/oss/mulaw.c
197
return (signed short)sample;
sound/core/oss/mulaw.c
226
signed short sample = cvt_native_to_s16(data, src);
sound/core/oss/mulaw.c
227
*dst = linear2ulaw(sample);
sound/drivers/pcmtest.c
257
size_t sample;
sound/drivers/pcmtest.c
263
for (sample = 0; sample < v_iter->s_rw_ch; sample++) {
sound/drivers/pcmtest.c
266
pos_pattern = (pos_in_ch + sample * v_iter->sample_bytes
sound/hda/core/intel-nhlt.c
253
_vbps = cfg->fmt_ext.sample.valid_bits_per_sample;
sound/pci/cs46xx/dsp_spos.c
326
struct dsp_segment_desc *sample)
sound/pci/cs46xx/dsp_spos.c
330
if (!sample) {
sound/pci/cs46xx/dsp_spos.c
336
doffset = (sample->offset * 4 + DSP_SAMPLE_BYTE_OFFSET);
sound/pci/cs46xx/dsp_spos.c
337
dsize = sample->size * 4;
sound/pci/cs46xx/dsp_spos.c
343
if (snd_cs46xx_download (chip,sample->data,doffset,dsize)) {
sound/pci/emu10k1/emu10k1_patch.c
45
sp->v.sample);
sound/pci/emu10k1/emupcm.c
558
u32 sample, bool stereo)
sound/pci/emu10k1/emupcm.c
569
snd_emu10k1_ptr_write(emu, CD0 + i, voice, sample);
sound/pci/emu10k1/emupcm.c
591
u32 sample = w_16 ? 0 : 0x80808080;
sound/pci/emu10k1/emupcm.c
602
snd_emu10k1_playback_fill_cache(emu, voice, sample, stereo);
sound/soc/intel/keembay/kmb_platform.c
82
u32 i, j, sample;
sound/soc/intel/keembay/kmb_platform.c
90
sample = bitrev32(temp);
sound/soc/intel/keembay/kmb_platform.c
91
buf[tx_ptr][j] = sample << 4;
sound/soc/sunxi/sun4i-i2s.c
88
#define SUN4I_I2S_TX_CHAN_MAP(chan, sample) ((sample) << (chan << 2))
sound/synth/emux/emux_synth.c
101
if (vp->zone->sample)
sound/synth/emux/emux_synth.c
102
vp->block = vp->zone->sample->block;
sound/synth/emux/soundfont.c
1031
zone->v.sample = sample_id; /* the last sample */
sound/synth/emux/soundfont.c
1115
zone->sample = set_sample(sf, &zone->v);
sound/synth/emux/soundfont.c
1153
if (! cur->mapped && cur->sample == NULL) {
sound/synth/emux/soundfont.c
1155
cur->sample = set_sample(sf, &cur->v);
sound/synth/emux/soundfont.c
1156
if (cur->sample == NULL)
sound/synth/emux/soundfont.c
557
zone->sample = set_sample(sf, &zone->v);
sound/synth/emux/soundfont.c
614
struct snd_sf_sample *sample;
sound/synth/emux/soundfont.c
616
sample = find_sample(sf, avp->sample);
sound/synth/emux/soundfont.c
617
if (sample == NULL)
sound/synth/emux/soundfont.c
625
avp->start += sample->v.start;
sound/synth/emux/soundfont.c
626
avp->end += sample->v.end;
sound/synth/emux/soundfont.c
627
avp->loopstart += sample->v.loopstart;
sound/synth/emux/soundfont.c
628
avp->loopend += sample->v.loopend;
sound/synth/emux/soundfont.c
631
avp->sample_mode = sample->v.mode_flags;
sound/synth/emux/soundfont.c
633
return sample;
sound/synth/emux/soundfont.c
646
if (p->v.sample == sample_id)
sound/synth/emux/soundfont.c
702
if (find_sample(sf, sample_info.sample)) {
sound/synth/emux/soundfont.c
967
smp->v.sample = sample_id;
tools/lib/bpf/libbpf.h
1652
LIBBPF_API void user_ring_buffer__submit(struct user_ring_buffer *rb, void *sample);
tools/lib/bpf/libbpf.h
1662
LIBBPF_API void user_ring_buffer__discard(struct user_ring_buffer *rb, void *sample);
tools/lib/bpf/ringbuf.c
241
void *sample;
tools/lib/bpf/ringbuf.c
259
sample = (void *)len_ptr + BPF_RINGBUF_HDR_SZ;
tools/lib/bpf/ringbuf.c
260
err = r->sample_cb(r->ctx, sample, len);
tools/lib/bpf/ringbuf.c
550
static void user_ringbuf_commit(struct user_ring_buffer *rb, void *sample, bool discard)
tools/lib/bpf/ringbuf.c
556
hdr_offset = rb->mask + 1 + (sample - rb->data) - BPF_RINGBUF_HDR_SZ;
tools/lib/bpf/ringbuf.c
569
void user_ring_buffer__discard(struct user_ring_buffer *rb, void *sample)
tools/lib/bpf/ringbuf.c
571
user_ringbuf_commit(rb, sample, true);
tools/lib/bpf/ringbuf.c
574
void user_ring_buffer__submit(struct user_ring_buffer *rb, void *sample)
tools/lib/bpf/ringbuf.c
576
user_ringbuf_commit(rb, sample, false);
tools/lib/bpf/ringbuf.c
632
void *sample;
tools/lib/bpf/ringbuf.c
650
sample = user_ring_buffer__reserve(rb, size);
tools/lib/bpf/ringbuf.c
651
if (sample)
tools/lib/bpf/ringbuf.c
652
return sample;
tools/lib/perf/include/perf/event.h
611
struct perf_record_sample sample;
tools/perf/arch/arm/tests/dwarf-unwind.c
13
static int sample_ustack(struct perf_sample *sample,
tools/perf/arch/arm/tests/dwarf-unwind.c
16
struct stack_dump *stack = &sample->user_stack;
tools/perf/arch/arm/tests/dwarf-unwind.c
45
int test__arch_unwind_sample(struct perf_sample *sample,
tools/perf/arch/arm/tests/dwarf-unwind.c
48
struct regs_dump *regs = perf_sample__user_regs(sample);
tools/perf/arch/arm/tests/dwarf-unwind.c
62
return sample_ustack(sample, thread, buf);
tools/perf/arch/arm64/tests/dwarf-unwind.c
13
static int sample_ustack(struct perf_sample *sample,
tools/perf/arch/arm64/tests/dwarf-unwind.c
16
struct stack_dump *stack = &sample->user_stack;
tools/perf/arch/arm64/tests/dwarf-unwind.c
45
int test__arch_unwind_sample(struct perf_sample *sample,
tools/perf/arch/arm64/tests/dwarf-unwind.c
48
struct regs_dump *regs = perf_sample__user_regs(sample);
tools/perf/arch/arm64/tests/dwarf-unwind.c
62
return sample_ustack(sample, thread, buf);
tools/perf/arch/powerpc/tests/dwarf-unwind.c
13
static int sample_ustack(struct perf_sample *sample,
tools/perf/arch/powerpc/tests/dwarf-unwind.c
16
struct stack_dump *stack = &sample->user_stack;
tools/perf/arch/powerpc/tests/dwarf-unwind.c
45
int test__arch_unwind_sample(struct perf_sample *sample,
tools/perf/arch/powerpc/tests/dwarf-unwind.c
48
struct regs_dump *regs = perf_sample__user_regs(sample);
tools/perf/arch/powerpc/tests/dwarf-unwind.c
62
return sample_ustack(sample, thread, buf);
tools/perf/arch/x86/tests/dwarf-unwind.c
13
static int sample_ustack(struct perf_sample *sample,
tools/perf/arch/x86/tests/dwarf-unwind.c
16
struct stack_dump *stack = &sample->user_stack;
tools/perf/arch/x86/tests/dwarf-unwind.c
53
int test__arch_unwind_sample(struct perf_sample *sample,
tools/perf/arch/x86/tests/dwarf-unwind.c
56
struct regs_dump *regs = perf_sample__user_regs(sample);
tools/perf/arch/x86/tests/dwarf-unwind.c
69
return sample_ustack(sample, thread, buf);
tools/perf/bench/inject-buildid.c
222
struct perf_sample sample = {
tools/perf/bench/inject-buildid.c
231
event.header.size = perf_event__sample_event_size(&sample, bench_sample_type,
tools/perf/bench/inject-buildid.c
236
/*branch_sample_type=*/0, &sample);
tools/perf/bench/synthesize.c
55
struct perf_sample *sample __maybe_unused,
tools/perf/builtin-annotate.c
146
struct perf_sample *sample)
tools/perf/builtin-annotate.c
155
bi = sample__resolve_bstack(sample, al);
tools/perf/builtin-annotate.c
178
struct perf_sample *sample = iter->sample;
tools/perf/builtin-annotate.c
182
err = addr_map_symbol__inc_samples(&bi->from, sample);
tools/perf/builtin-annotate.c
187
err = addr_map_symbol__inc_samples(&bi->to, sample);
tools/perf/builtin-annotate.c
193
static int process_branch_callback(struct perf_sample *sample,
tools/perf/builtin-annotate.c
199
.sample = sample,
tools/perf/builtin-annotate.c
208
if (machine__resolve(machine, &a, sample) < 0) {
tools/perf/builtin-annotate.c
221
hist__account_cycles(sample->branch_stack, al, sample, /*nonany_branch_mode=*/false,
tools/perf/builtin-annotate.c
235
static int add_sample(struct perf_sample *sample,
tools/perf/builtin-annotate.c
239
struct hists *hists = evsel__hists(sample->evsel);
tools/perf/builtin-annotate.c
266
process_branch_stack(sample->branch_stack, al, sample);
tools/perf/builtin-annotate.c
269
return process_branch_callback(sample, al, ann, machine);
tools/perf/builtin-annotate.c
271
he = hists__add_entry(hists, al, NULL, NULL, NULL, NULL, sample, true);
tools/perf/builtin-annotate.c
275
ret = hist_entry__inc_addr_samples(he, sample, al->addr);
tools/perf/builtin-annotate.c
282
struct perf_sample *sample,
tools/perf/builtin-annotate.c
290
if (machine__resolve(machine, &al, sample) < 0) {
tools/perf/builtin-annotate.c
293
sample->file_offset);
tools/perf/builtin-annotate.c
298
if (ann->cpu_list && (sample->cpu >= MAX_NR_CPUS ||
tools/perf/builtin-annotate.c
299
!test_bit(sample->cpu, ann->cpu_bitmap)))
tools/perf/builtin-annotate.c
303
add_sample(sample, &al, ann, machine)) {
tools/perf/builtin-annotate.c
855
annotate.tool.sample = process_sample_event;
tools/perf/builtin-buildid-list.c
105
build_id__mark_dso_hit_ops.sample = build_id__mark_dso_hit;
tools/perf/builtin-c2c.c
245
struct perf_sample *sample)
tools/perf/builtin-c2c.c
247
if (WARN_ONCE(sample->cpu == (unsigned int) -1,
tools/perf/builtin-c2c.c
252
if (sample->cpu >= (unsigned int)c2c.cpus_cnt)
tools/perf/builtin-c2c.c
255
__set_bit(sample->cpu, c2c_he->cpuset);
tools/perf/builtin-c2c.c
259
struct perf_sample *sample)
tools/perf/builtin-c2c.c
263
if (!sample->phys_addr) {
tools/perf/builtin-c2c.c
268
node = mem2node__node(&c2c.mem2node, sample->phys_addr);
tools/perf/builtin-c2c.c
278
if (c2c_he->paddr != sample->phys_addr) {
tools/perf/builtin-c2c.c
280
c2c_he->paddr = sample->phys_addr;
tools/perf/builtin-c2c.c
319
struct perf_sample *sample)
tools/perf/builtin-c2c.c
3207
c2c.tool.sample = process_sample_event;
tools/perf/builtin-c2c.c
324
evsel_hists->stats.total_period += sample->period;
tools/perf/builtin-c2c.c
326
evsel_hists->stats.total_non_filtered_period += sample->period;
tools/perf/builtin-c2c.c
331
struct perf_sample *sample,
tools/perf/builtin-c2c.c
334
struct evsel *evsel = sample->evsel;
tools/perf/builtin-c2c.c
345
if (machine__resolve(machine, &al, sample) < 0) {
tools/perf/builtin-c2c.c
348
sample->file_offset);
tools/perf/builtin-c2c.c
357
ret = sample__resolve_callchain(sample, cursor, NULL,
tools/perf/builtin-c2c.c
362
mi = sample__resolve_mem(sample, &al);
tools/perf/builtin-c2c.c
372
sample, true);
tools/perf/builtin-c2c.c
382
c2c_he__set_cpu(c2c_he, sample);
tools/perf/builtin-c2c.c
383
c2c_he__set_node(c2c_he, sample);
tools/perf/builtin-c2c.c
389
perf_c2c__evsel_hists_inc_stats(evsel, he, sample);
tools/perf/builtin-c2c.c
390
addr_map_symbol__inc_samples(mem_info__iaddr(mi), sample);
tools/perf/builtin-c2c.c
393
ret = hist_entry__append_callchain(he, sample);
tools/perf/builtin-c2c.c
404
int cpu = sample->cpu == (unsigned int) -1 ? 0 : sample->cpu;
tools/perf/builtin-c2c.c
420
sample, true);
tools/perf/builtin-c2c.c
433
compute_stats(c2c_he, &stats, sample->weight);
tools/perf/builtin-c2c.c
435
c2c_he__set_cpu(c2c_he, sample);
tools/perf/builtin-c2c.c
436
c2c_he__set_node(c2c_he, sample);
tools/perf/builtin-c2c.c
440
ret = hist_entry__append_callchain(he, sample);
tools/perf/builtin-diff.c
1949
pdiff.tool.sample = diff__process_sample_event;
tools/perf/builtin-diff.c
392
struct perf_sample *sample,
tools/perf/builtin-diff.c
397
struct evsel *evsel = sample->evsel;
tools/perf/builtin-diff.c
400
.sample = sample,
tools/perf/builtin-diff.c
406
sample->time)) {
tools/perf/builtin-diff.c
411
if (machine__resolve(machine, &al, sample) < 0) {
tools/perf/builtin-diff.c
414
sample->file_offset);
tools/perf/builtin-diff.c
419
if (cpu_list && (sample->cpu >= MAX_NR_CPUS ||
tools/perf/builtin-diff.c
420
!test_bit(sample->cpu, cpu_bitmap))) {
tools/perf/builtin-diff.c
428
NULL, NULL, NULL, sample, true)) {
tools/perf/builtin-diff.c
434
hist__account_cycles(sample->branch_stack, &al, sample,
tools/perf/builtin-diff.c
442
sample->file_offset);
tools/perf/builtin-diff.c
448
if (!hists__add_entry(hists, &al, NULL, NULL, NULL, NULL, sample,
tools/perf/builtin-diff.c
462
hists->stats.total_period += sample->period;
tools/perf/builtin-diff.c
464
hists->stats.total_non_filtered_period += sample->period;
tools/perf/builtin-inject.c
1006
err = perf_event__synthesize_build_id(tool, sample, machine,
tools/perf/builtin-inject.c
1019
struct perf_sample *sample,
tools/perf/builtin-inject.c
1041
err = perf_event__synthesize_mmap2_build_id(tool, sample, machine,
tools/perf/builtin-inject.c
1057
struct perf_sample *sample,
tools/perf/builtin-inject.c
1063
u16 misc = sample->cpumode;
tools/perf/builtin-inject.c
1092
tool__inject_build_id(tool, sample, machine,
tools/perf/builtin-inject.c
1101
struct evsel *saved_evsel = sample->evsel;
tools/perf/builtin-inject.c
1105
sample->evsel = mmap_evsel;
tools/perf/builtin-inject.c
1106
perf_event__synthesize_mmap2_build_id(tool, sample, machine,
tools/perf/builtin-inject.c
1109
sample->pid, sample->tid,
tools/perf/builtin-inject.c
1117
sample->evsel = saved_evsel;
tools/perf/builtin-inject.c
1126
struct perf_sample *sample;
tools/perf/builtin-inject.c
1136
return mark_dso_hit(args->inject, args->tool, args->sample, args->machine,
tools/perf/builtin-inject.c
1141
struct perf_sample *sample, struct machine *machine)
tools/perf/builtin-inject.c
1153
.sample = sample,
tools/perf/builtin-inject.c
1159
thread = machine__findnew_thread(machine, sample->pid, sample->tid);
tools/perf/builtin-inject.c
1166
if (thread__find_map(thread, sample->cpumode, sample->ip, &al)) {
tools/perf/builtin-inject.c
1167
mark_dso_hit(inject, tool, sample, machine, args.mmap_evsel, al.map,
tools/perf/builtin-inject.c
1171
sample__for_each_callchain_node(thread, sample, PERF_MAX_STACK_DEPTH,
tools/perf/builtin-inject.c
1175
perf_event__repipe(tool, event, sample, machine);
tools/perf/builtin-inject.c
1182
struct perf_sample *sample,
tools/perf/builtin-inject.c
1189
if (sample->tid == ent->tid) {
tools/perf/builtin-inject.c
1201
struct perf_sample *sample,
tools/perf/builtin-inject.c
1207
perf_inject__sched_process_exit(tool, event, sample, machine);
tools/perf/builtin-inject.c
1216
ent->tid = sample->tid;
tools/perf/builtin-inject.c
1225
struct perf_sample *sample,
tools/perf/builtin-inject.c
1232
struct evsel *evsel = sample->evsel;
tools/perf/builtin-inject.c
1233
u32 pid = perf_sample__intval(sample, "pid");
tools/perf/builtin-inject.c
1246
sample_sw.period = sample->period;
tools/perf/builtin-inject.c
1247
sample_sw.time = sample->time;
tools/perf/builtin-inject.c
1274
struct perf_sample *sample __maybe_unused,
tools/perf/builtin-inject.c
1439
struct perf_sample *sample __maybe_unused,
tools/perf/builtin-inject.c
151
struct perf_sample *sample,
tools/perf/builtin-inject.c
1568
struct perf_sample *sample __maybe_unused,
tools/perf/builtin-inject.c
157
struct perf_sample *sample,
tools/perf/builtin-inject.c
1629
struct perf_sample *sample __maybe_unused,
tools/perf/builtin-inject.c
1800
perf_sample__init(&gs->ev.sample, /*all=*/false);
tools/perf/builtin-inject.c
1826
gs->ev.sample.time = 0;
tools/perf/builtin-inject.c
1833
ret = evlist__parse_sample(gs->session->evlist, gs->ev.event, &gs->ev.sample);
tools/perf/builtin-inject.c
1844
guest_session__convert_time(gs, gs->ev.sample.time, &gs->ev.sample.time);
tools/perf/builtin-inject.c
1850
const struct perf_sample *sample)
tools/perf/builtin-inject.c
1856
evsel = evlist__id2evsel(evlist, sample->id);
tools/perf/builtin-inject.c
1860
pr_err("No evsel for id %"PRIu64"\n", sample->id);
tools/perf/builtin-inject.c
1865
ret = perf_event__synthesize_id_sample(array, evsel->core.attr.sample_type, sample);
tools/perf/builtin-inject.c
1888
struct perf_sample *sample;
tools/perf/builtin-inject.c
1903
sample = &gs->ev.sample;
tools/perf/builtin-inject.c
1907
perf_sample__exit(&gs->ev.sample);
tools/perf/builtin-inject.c
1912
if (sample->time > timestamp) {
tools/perf/builtin-inject.c
1926
id = sample->id;
tools/perf/builtin-inject.c
1966
sample->id = guest_id->host_id;
tools/perf/builtin-inject.c
1967
sample->stream_id = guest_id->host_id;
tools/perf/builtin-inject.c
1969
if (sample->cpu != (u32)-1) {
tools/perf/builtin-inject.c
1970
if (sample->cpu >= gs->vcpu_cnt) {
tools/perf/builtin-inject.c
1972
sample->cpu);
tools/perf/builtin-inject.c
1976
sample->cpu = gs->vcpu[sample->cpu].cpu;
tools/perf/builtin-inject.c
1980
ret = evlist__append_id_sample(inject->session->evlist, ev, sample);
tools/perf/builtin-inject.c
1995
perf_sample__exit(sample);
tools/perf/builtin-inject.c
2000
perf_sample__exit(&gs->ev.sample);
tools/perf/builtin-inject.c
2013
struct perf_sample *sample,
tools/perf/builtin-inject.c
2019
ret = guest_session__inject_events(&inject->guest_session, sample->time);
tools/perf/builtin-inject.c
2023
return perf_event__repipe(tool, event, sample, machine);
tools/perf/builtin-inject.c
2105
struct perf_sample *sample,
tools/perf/builtin-inject.c
2123
if (sample->cpu == (u32)-1) {
tools/perf/builtin-inject.c
2133
gs->vcpu[vcpu].cpu = sample->cpu;
tools/perf/builtin-inject.c
2135
return host__repipe(tool, event, sample, machine);
tools/perf/builtin-inject.c
2159
struct perf_sample *sample __maybe_unused,
tools/perf/builtin-inject.c
222
struct perf_sample *sample __maybe_unused,
tools/perf/builtin-inject.c
2442
inject->tool.sample = perf_event__inject_buildid;
tools/perf/builtin-inject.c
2530
inject->tool.sample = perf_event__convert_sample_callchain;
tools/perf/builtin-inject.c
2819
inject.tool.sample = perf_event__repipe_sample;
tools/perf/builtin-inject.c
376
struct perf_sample *sample __maybe_unused,
tools/perf/builtin-inject.c
384
struct perf_sample *sample __maybe_unused,
tools/perf/builtin-inject.c
392
struct perf_sample *sample,
tools/perf/builtin-inject.c
398
inject->aux_id = sample->id;
tools/perf/builtin-inject.c
406
struct perf_sample *sample)
tools/perf/builtin-inject.c
408
size_t sz1 = sample->aux_sample.data - (void *)event - sizeof(u64);
tools/perf/builtin-inject.c
409
size_t sz2 = event->header.size - sample->aux_sample.size - (sz1 + sizeof(u64));
tools/perf/builtin-inject.c
432
struct perf_sample *sample,
tools/perf/builtin-inject.c
437
struct perf_sample *sample,
tools/perf/builtin-inject.c
441
struct evsel *evsel = sample->evsel;
tools/perf/builtin-inject.c
448
return f(tool, event, sample, machine);
tools/perf/builtin-inject.c
451
build_id__mark_dso_hit(tool, event, sample, machine);
tools/perf/builtin-inject.c
463
struct branch_stack *orig_bs = sample->branch_stack;
tools/perf/builtin-inject.c
473
if (!sample->branch_stack)
tools/perf/builtin-inject.c
474
sample->branch_stack = &dummy_bs;
tools/perf/builtin-inject.c
483
sz = perf_event__sample_event_size(sample, evsel->core.attr.sample_type,
tools/perf/builtin-inject.c
491
sample->branch_stack = orig_bs;
tools/perf/builtin-inject.c
501
evsel->core.attr.branch_sample_type, sample);
tools/perf/builtin-inject.c
505
sample->branch_stack = orig_bs;
tools/perf/builtin-inject.c
51
struct perf_sample sample;
tools/perf/builtin-inject.c
514
event = perf_inject__cut_auxtrace_sample(inject, event, sample);
tools/perf/builtin-inject.c
524
struct perf_sample *sample,
tools/perf/builtin-inject.c
528
struct evsel *evsel = sample->evsel;
tools/perf/builtin-inject.c
551
thread = machine__find_thread(machine, sample->tid, sample->pid);
tools/perf/builtin-inject.c
556
ret = thread__resolve_callchain(thread, cursor, sample,
tools/perf/builtin-inject.c
564
for (i = 0; i < sample->callchain->nr; i++) {
tools/perf/builtin-inject.c
565
inject->raw_callchain->ips[i] = sample->callchain->ips[i];
tools/perf/builtin-inject.c
566
if (sample->callchain->ips[i] == PERF_CONTEXT_USER) {
tools/perf/builtin-inject.c
586
sample->callchain = inject->raw_callchain;
tools/perf/builtin-inject.c
594
sz = perf_event__sample_event_size(sample, sample_type,
tools/perf/builtin-inject.c
605
evsel->core.attr.branch_sample_type, sample);
tools/perf/builtin-inject.c
682
struct perf_sample *sample,
tools/perf/builtin-inject.c
691
struct perf_sample *sample,
tools/perf/builtin-inject.c
729
if (!sample->evsel)
tools/perf/builtin-inject.c
730
sample->evsel = evlist__event2evsel(inject->session->evlist, event);
tools/perf/builtin-inject.c
732
if (sample->evsel) {
tools/perf/builtin-inject.c
734
tool__inject_build_id(tool, sample, machine,
tools/perf/builtin-inject.c
735
/*misc=*/sample->cpumode,
tools/perf/builtin-inject.c
752
err = perf_event_process(tool, event, sample, machine);
tools/perf/builtin-inject.c
761
struct evsel *saved_evsel = sample->evsel;
tools/perf/builtin-inject.c
763
sample->evsel = evlist__event2evsel(inject->session->evlist, event);
tools/perf/builtin-inject.c
764
if (sample->evsel && !dso_sought) {
tools/perf/builtin-inject.c
768
if (sample->evsel && dso &&
tools/perf/builtin-inject.c
769
!tool__inject_mmap2_build_id(tool, sample, machine,
tools/perf/builtin-inject.c
770
sample->cpumode | PERF_RECORD_MISC_MMAP_BUILD_ID,
tools/perf/builtin-inject.c
776
sample->evsel = saved_evsel;
tools/perf/builtin-inject.c
780
sample->evsel = saved_evsel;
tools/perf/builtin-inject.c
786
return perf_event__repipe(tool, event, sample, machine);
tools/perf/builtin-inject.c
791
struct perf_sample *sample,
tools/perf/builtin-inject.c
795
tool, event, sample, machine,
tools/perf/builtin-inject.c
805
struct perf_sample *sample,
tools/perf/builtin-inject.c
822
tool, event, sample, machine,
tools/perf/builtin-inject.c
832
struct perf_sample *sample,
tools/perf/builtin-inject.c
837
err = perf_event__process_fork(tool, event, sample, machine);
tools/perf/builtin-inject.c
838
perf_event__repipe(tool, event, sample, machine);
tools/perf/builtin-inject.c
845
struct perf_sample *sample,
tools/perf/builtin-inject.c
850
err = perf_event__process_comm(tool, event, sample, machine);
tools/perf/builtin-inject.c
851
perf_event__repipe(tool, event, sample, machine);
tools/perf/builtin-inject.c
858
struct perf_sample *sample,
tools/perf/builtin-inject.c
861
int err = perf_event__process_namespaces(tool, event, sample, machine);
tools/perf/builtin-inject.c
863
perf_event__repipe(tool, event, sample, machine);
tools/perf/builtin-inject.c
870
struct perf_sample *sample,
tools/perf/builtin-inject.c
875
err = perf_event__process_exit(tool, event, sample, machine);
tools/perf/builtin-inject.c
876
perf_event__repipe(tool, event, sample, machine);
tools/perf/builtin-inject.c
983
struct perf_sample *sample,
tools/perf/builtin-kmem.c
1006
err = f(sample);
tools/perf/builtin-kmem.c
175
static int evsel__process_alloc_event(struct perf_sample *sample)
tools/perf/builtin-kmem.c
177
unsigned long ptr = perf_sample__intval(sample, "ptr"),
tools/perf/builtin-kmem.c
178
call_site = perf_sample__intval(sample, "call_site");
tools/perf/builtin-kmem.c
179
int bytes_req = perf_sample__intval(sample, "bytes_req"),
tools/perf/builtin-kmem.c
180
bytes_alloc = perf_sample__intval(sample, "bytes_alloc");
tools/perf/builtin-kmem.c
182
if (insert_alloc_stat(call_site, ptr, bytes_req, bytes_alloc, sample->cpu) ||
tools/perf/builtin-kmem.c
2019
perf_kmem.sample = process_sample_event;
tools/perf/builtin-kmem.c
202
if (evsel__field(sample->evsel, "node")) {
tools/perf/builtin-kmem.c
205
node1 = cpu__get_node((struct perf_cpu){.cpu = sample->cpu});
tools/perf/builtin-kmem.c
206
node2 = perf_sample__intval(sample, "node");
tools/perf/builtin-kmem.c
247
static int evsel__process_free_event(struct perf_sample *sample)
tools/perf/builtin-kmem.c
249
unsigned long ptr = perf_sample__intval(sample, "ptr");
tools/perf/builtin-kmem.c
258
if ((short)sample->cpu != s_alloc->alloc_cpu) {
tools/perf/builtin-kmem.c
398
static u64 find_callsite(struct perf_sample *sample)
tools/perf/builtin-kmem.c
404
u64 result = sample->ip;
tools/perf/builtin-kmem.c
412
al.thread = machine__findnew_thread(machine, sample->pid, sample->tid);
tools/perf/builtin-kmem.c
418
sample__resolve_callchain(sample, cursor, /*parent=*/NULL, &al, 16);
tools/perf/builtin-kmem.c
447
pr_debug2("unknown callsite: %"PRIx64 "\n", sample->ip);
tools/perf/builtin-kmem.c
755
static int parse_gfp_flags(struct perf_sample *sample, unsigned int gfp_flags)
tools/perf/builtin-kmem.c
758
.cpu = sample->cpu,
tools/perf/builtin-kmem.c
759
.data = sample->raw_data,
tools/perf/builtin-kmem.c
760
.size = sample->raw_size,
tools/perf/builtin-kmem.c
776
tp_format = evsel__tp_format(sample->evsel);
tools/perf/builtin-kmem.c
815
static int evsel__process_page_alloc_event(struct perf_sample *sample)
tools/perf/builtin-kmem.c
818
unsigned int order = perf_sample__intval(sample, "order");
tools/perf/builtin-kmem.c
819
unsigned int gfp_flags = perf_sample__intval(sample, "gfp_flags");
tools/perf/builtin-kmem.c
820
unsigned int migrate_type = perf_sample__intval(sample, "migratetype");
tools/perf/builtin-kmem.c
841
page = perf_sample__intval(sample, "pfn");
tools/perf/builtin-kmem.c
843
page = perf_sample__intval(sample, "page");
tools/perf/builtin-kmem.c
855
if (parse_gfp_flags(sample, gfp_flags) < 0)
tools/perf/builtin-kmem.c
858
callsite = find_callsite(sample);
tools/perf/builtin-kmem.c
896
static int evsel__process_page_free_event(struct perf_sample *sample)
tools/perf/builtin-kmem.c
899
unsigned int order = perf_sample__intval(sample, "order");
tools/perf/builtin-kmem.c
912
page = perf_sample__intval(sample, "pfn");
tools/perf/builtin-kmem.c
914
page = perf_sample__intval(sample, "page");
tools/perf/builtin-kmem.c
969
static bool perf_kmem__skip_sample(struct perf_sample *sample)
tools/perf/builtin-kmem.c
972
if (perf_time__skip_sample(&ptime, sample->time))
tools/perf/builtin-kmem.c
978
typedef int (*tracepoint_handler)(struct perf_sample *sample);
tools/perf/builtin-kmem.c
982
struct perf_sample *sample,
tools/perf/builtin-kmem.c
985
struct evsel *evsel = sample->evsel;
tools/perf/builtin-kmem.c
987
struct thread *thread = machine__findnew_thread(machine, sample->pid,
tools/perf/builtin-kmem.c
988
sample->tid);
tools/perf/builtin-kmem.c
993
sample->file_offset);
tools/perf/builtin-kmem.c
997
if (perf_kmem__skip_sample(sample)) {
tools/perf/builtin-kvm.c
1112
struct perf_sample *sample __maybe_unused,
tools/perf/builtin-kvm.c
1123
struct perf_sample *sample)
tools/perf/builtin-kvm.c
1125
if (kvm->pid_list && intlist__find(kvm->pid_list, sample->pid) == NULL)
tools/perf/builtin-kvm.c
1133
struct perf_sample *sample,
tools/perf/builtin-kvm.c
1141
if (skip_sample(kvm, sample))
tools/perf/builtin-kvm.c
1144
if (machine__resolve(machine, &kvm->al, sample) < 0) {
tools/perf/builtin-kvm.c
1146
sample->file_offset);
tools/perf/builtin-kvm.c
1150
thread = machine__findnew_thread(machine, sample->pid, sample->tid);
tools/perf/builtin-kvm.c
1154
sample->file_offset);
tools/perf/builtin-kvm.c
1158
if (!handle_kvm_event(kvm, thread, sample))
tools/perf/builtin-kvm.c
1559
kvm->tool.sample = process_sample_event;
tools/perf/builtin-kvm.c
1864
kvm->tool.sample = process_sample_event;
tools/perf/builtin-kvm.c
724
struct perf_sample *sample)
tools/perf/builtin-kvm.c
740
&kvm->al, NULL, NULL, NULL, ki, sample, true);
tools/perf/builtin-kvm.c
759
struct perf_sample *sample)
tools/perf/builtin-kvm.c
764
event = find_create_kvm_event(kvm, key, sample);
tools/perf/builtin-kvm.c
767
vcpu_record->start_time = sample->time;
tools/perf/builtin-kvm.c
810
struct perf_sample *sample,
tools/perf/builtin-kvm.c
821
if (evsel__name_is(sample->evsel, child_ops->name)) {
tools/perf/builtin-kvm.c
822
child_ops->get_key(sample, key);
tools/perf/builtin-kvm.c
833
struct perf_sample *sample)
tools/perf/builtin-kvm.c
838
event = find_create_kvm_event(kvm, key, sample);
tools/perf/builtin-kvm.c
859
struct perf_sample *sample)
tools/perf/builtin-kvm.c
887
event = find_create_kvm_event(kvm, key, sample);
tools/perf/builtin-kvm.c
896
if (sample->time < time_begin) {
tools/perf/builtin-kvm.c
901
time_diff = sample->time - time_begin;
tools/perf/builtin-kvm.c
910
sample->time, sample->pid, vcpu_record->vcpu_id,
tools/perf/builtin-kvm.c
920
struct perf_sample *sample)
tools/perf/builtin-kvm.c
923
if (!thread__priv(thread) && kvm_entry_event(sample->evsel)) {
tools/perf/builtin-kvm.c
934
vcpu_record->vcpu_id = perf_sample__intval(sample, vcpu_id_str(e_machine));
tools/perf/builtin-kvm.c
943
struct perf_sample *sample)
tools/perf/builtin-kvm.c
949
vcpu_record = per_vcpu_record(thread, sample);
tools/perf/builtin-kvm.c
958
if (kvm->events_ops->is_begin_event(sample, &key))
tools/perf/builtin-kvm.c
959
return handle_begin_event(kvm, vcpu_record, &key, sample);
tools/perf/builtin-kvm.c
961
if (is_child_event(kvm, sample, &key))
tools/perf/builtin-kvm.c
962
return handle_child_event(kvm, vcpu_record, &key, sample);
tools/perf/builtin-kvm.c
964
if (kvm->events_ops->is_end_event(sample, &key))
tools/perf/builtin-kvm.c
965
return handle_end_event(kvm, vcpu_record, &key, sample);
tools/perf/builtin-kwork.c
1003
struct perf_sample *sample,
tools/perf/builtin-kwork.c
1010
sample, machine);
tools/perf/builtin-kwork.c
1015
struct perf_sample *sample,
tools/perf/builtin-kwork.c
1022
sample, machine);
tools/perf/builtin-kwork.c
1047
struct perf_sample *sample,
tools/perf/builtin-kwork.c
1051
work->cpu = sample->cpu;
tools/perf/builtin-kwork.c
1054
work->id = perf_sample__intval_common(sample, "common_pid");
tools/perf/builtin-kwork.c
1057
work->id = perf_sample__intval(sample, "irq");
tools/perf/builtin-kwork.c
1058
work->name = strdup(perf_sample__strval(sample, "name") ?: "<unknown>");
tools/perf/builtin-kwork.c
1082
struct perf_sample *sample,
tools/perf/builtin-kwork.c
1089
sample, machine);
tools/perf/builtin-kwork.c
1095
struct perf_sample *sample,
tools/perf/builtin-kwork.c
1102
sample, machine);
tools/perf/builtin-kwork.c
1108
struct perf_sample *sample,
tools/perf/builtin-kwork.c
1115
sample, machine);
tools/perf/builtin-kwork.c
1174
struct perf_sample *sample,
tools/perf/builtin-kwork.c
1180
work->cpu = sample->cpu;
tools/perf/builtin-kwork.c
1183
work->id = perf_sample__intval_common(sample, "common_pid");
tools/perf/builtin-kwork.c
1186
num = perf_sample__intval(sample, "vec");
tools/perf/builtin-kwork.c
1188
work->name = evsel__softirq_name(sample->evsel, num);
tools/perf/builtin-kwork.c
1212
struct perf_sample *sample,
tools/perf/builtin-kwork.c
1219
sample, machine);
tools/perf/builtin-kwork.c
1225
struct perf_sample *sample,
tools/perf/builtin-kwork.c
1232
sample, machine);
tools/perf/builtin-kwork.c
1238
struct perf_sample *sample,
tools/perf/builtin-kwork.c
1245
sample, machine);
tools/perf/builtin-kwork.c
1273
struct perf_sample *sample,
tools/perf/builtin-kwork.c
1277
unsigned long long function_addr = perf_sample__intval(sample, "function");
tools/perf/builtin-kwork.c
1280
work->cpu = sample->cpu;
tools/perf/builtin-kwork.c
1281
work->id = perf_sample__intval(sample, "work");
tools/perf/builtin-kwork.c
1312
struct perf_sample *sample,
tools/perf/builtin-kwork.c
1319
sample, machine);
tools/perf/builtin-kwork.c
1344
struct perf_sample *sample,
tools/perf/builtin-kwork.c
1348
work->cpu = sample->cpu;
tools/perf/builtin-kwork.c
1351
work->id = perf_sample__intval(sample, "prev_pid");
tools/perf/builtin-kwork.c
1352
work->name = strdup(perf_sample__strval(sample, "prev_comm") ?: "<unknown>");
tools/perf/builtin-kwork.c
1354
work->id = perf_sample__intval(sample, "next_pid");
tools/perf/builtin-kwork.c
1355
work->name = strdup(perf_sample__strval(sample, "next_comm") ?: "<unknown>");
tools/perf/builtin-kwork.c
1989
struct perf_sample *sample,
tools/perf/builtin-kwork.c
1994
struct perf_sample *sample,
tools/perf/builtin-kwork.c
1997
struct evsel *evsel = sample->evsel;
tools/perf/builtin-kwork.c
2003
err = f(tool, sample, machine);
tools/perf/builtin-kwork.c
242
struct perf_sample *sample)
tools/perf/builtin-kwork.c
2570
kwork.tool.sample = perf_kwork__process_tracepoint_sample;
tools/perf/builtin-kwork.c
272
atom->time = sample->time;
tools/perf/builtin-kwork.c
440
struct perf_sample *sample)
tools/perf/builtin-kwork.c
445
if ((kwork->timestart == 0) || (kwork->timestart > sample->time))
tools/perf/builtin-kwork.c
446
kwork->timestart = sample->time;
tools/perf/builtin-kwork.c
448
if (kwork->timeend < sample->time)
tools/perf/builtin-kwork.c
449
kwork->timeend = sample->time;
tools/perf/builtin-kwork.c
465
struct perf_sample *sample)
tools/perf/builtin-kwork.c
468
u64 time = sample->time;
tools/perf/builtin-kwork.c
489
profile_update_timespan(kwork, sample);
tools/perf/builtin-kwork.c
497
struct perf_sample *sample,
tools/perf/builtin-kwork.c
507
class->work_init(kwork, class, &key, src_type, sample, machine);
tools/perf/builtin-kwork.c
509
atom = atom_new(kwork, sample);
tools/perf/builtin-kwork.c
522
if (!profile_event_match(kwork, work, sample)) {
tools/perf/builtin-kwork.c
560
struct perf_sample *sample,
tools/perf/builtin-kwork.c
568
class->work_init(kwork, class, &key, src_type, sample, machine);
tools/perf/builtin-kwork.c
577
if (!profile_event_match(kwork, work, sample))
tools/perf/builtin-kwork.c
585
src_atom = atom_new(kwork, sample);
tools/perf/builtin-kwork.c
631
struct perf_sample *sample)
tools/perf/builtin-kwork.c
634
u64 exit_time = sample->time;
tools/perf/builtin-kwork.c
652
struct perf_sample *sample,
tools/perf/builtin-kwork.c
656
KWORK_TRACE_MAX, sample,
tools/perf/builtin-kwork.c
662
struct perf_sample *sample,
tools/perf/builtin-kwork.c
669
KWORK_TRACE_ENTRY, sample,
tools/perf/builtin-kwork.c
675
report_update_exit_event(work, atom, sample);
tools/perf/builtin-kwork.c
684
struct perf_sample *sample)
tools/perf/builtin-kwork.c
687
u64 entry_time = sample->time;
tools/perf/builtin-kwork.c
705
struct perf_sample *sample,
tools/perf/builtin-kwork.c
709
KWORK_TRACE_MAX, sample,
tools/perf/builtin-kwork.c
715
struct perf_sample *sample,
tools/perf/builtin-kwork.c
722
KWORK_TRACE_RAISE, sample,
tools/perf/builtin-kwork.c
728
latency_update_entry_event(work, atom, sample);
tools/perf/builtin-kwork.c
736
struct perf_sample *sample,
tools/perf/builtin-kwork.c
744
if (!kwork->show_callchain || sample->callchain == NULL)
tools/perf/builtin-kwork.c
748
thread = machine__findnew_thread(machine, sample->pid, sample->pid);
tools/perf/builtin-kwork.c
750
pr_debug("Failed to get thread for pid %d\n", sample->pid);
tools/perf/builtin-kwork.c
756
if (thread__resolve_callchain(thread, cursor, sample,
tools/perf/builtin-kwork.c
786
struct perf_sample *sample,
tools/perf/builtin-kwork.c
802
timestamp__scnprintf_usec(sample->time,
tools/perf/builtin-kwork.c
826
(double)(sample->time - atom->time) / NSEC_PER_MSEC);
tools/perf/builtin-kwork.c
848
sample__fprintf_sym(sample, al, 0,
tools/perf/builtin-kwork.c
861
struct perf_sample *sample,
tools/perf/builtin-kwork.c
865
KWORK_TRACE_MAX, sample,
tools/perf/builtin-kwork.c
871
struct perf_sample *sample,
tools/perf/builtin-kwork.c
878
KWORK_TRACE_RAISE, sample,
tools/perf/builtin-kwork.c
884
timehist_save_callchain(kwork, sample, machine);
tools/perf/builtin-kwork.c
891
struct perf_sample *sample,
tools/perf/builtin-kwork.c
900
if (machine__resolve(machine, &al, sample) < 0) {
tools/perf/builtin-kwork.c
902
sample->file_offset);
tools/perf/builtin-kwork.c
908
KWORK_TRACE_ENTRY, sample,
tools/perf/builtin-kwork.c
917
timehist_print_event(kwork, work, atom, sample, &al);
tools/perf/builtin-kwork.c
928
struct perf_sample *sample)
tools/perf/builtin-kwork.c
931
u64 exit_time = sample->time;
tools/perf/builtin-kwork.c
942
struct perf_sample *sample,
tools/perf/builtin-kwork.c
946
KWORK_TRACE_MAX, sample,
tools/perf/builtin-kwork.c
952
struct perf_sample *sample,
tools/perf/builtin-kwork.c
960
KWORK_TRACE_ENTRY, sample,
tools/perf/builtin-kwork.c
971
top_update_runtime(work, atom, sample);
tools/perf/builtin-kwork.c
981
struct perf_sample *sample,
tools/perf/builtin-kwork.c
988
KWORK_TRACE_ENTRY, sample,
tools/perf/builtin-kwork.c
994
top_update_runtime(work, atom, sample);
tools/perf/builtin-kwork.c
998
return top_entry_event(kwork, class, sample, machine);
tools/perf/builtin-lock.c
1026
if (lock_contention_caller(sample, buf, sizeof(buf)) < 0)
tools/perf/builtin-lock.c
1069
u64 *callstack = get_callstack(sample, max_stack_depth);
tools/perf/builtin-lock.c
1084
ts = thread_stat_findnew(sample->tid);
tools/perf/builtin-lock.c
1121
seq->prev_event_time = sample->time;
tools/perf/builtin-lock.c
1128
static int report_lock_contention_end_event(struct perf_sample *sample)
tools/perf/builtin-lock.c
1134
u64 addr = perf_sample__intval(sample, "lock_addr");
tools/perf/builtin-lock.c
1138
ret = get_key_by_aggr_mode(&key, addr, sample);
tools/perf/builtin-lock.c
1146
ts = thread_stat_find(sample->tid);
tools/perf/builtin-lock.c
1158
contended_term = sample->time - seq->prev_event_time;
tools/perf/builtin-lock.c
1208
static int evsel__process_lock_acquire(struct perf_sample *sample)
tools/perf/builtin-lock.c
1211
return trace_handler->acquire_event(sample);
tools/perf/builtin-lock.c
1215
static int evsel__process_lock_acquired(struct perf_sample *sample)
tools/perf/builtin-lock.c
1218
return trace_handler->acquired_event(sample);
tools/perf/builtin-lock.c
1222
static int evsel__process_lock_contended(struct perf_sample *sample)
tools/perf/builtin-lock.c
1225
return trace_handler->contended_event(sample);
tools/perf/builtin-lock.c
1229
static int evsel__process_lock_release(struct perf_sample *sample)
tools/perf/builtin-lock.c
1232
return trace_handler->release_event(sample);
tools/perf/builtin-lock.c
1236
static int evsel__process_contention_begin(struct perf_sample *sample)
tools/perf/builtin-lock.c
1239
return trace_handler->contention_begin_event(sample);
tools/perf/builtin-lock.c
1243
static int evsel__process_contention_end(struct perf_sample *sample)
tools/perf/builtin-lock.c
1246
return trace_handler->contention_end_event(sample);
tools/perf/builtin-lock.c
1424
typedef int (*tracepoint_handler)(struct perf_sample *sample);
tools/perf/builtin-lock.c
1428
struct perf_sample *sample,
tools/perf/builtin-lock.c
1431
struct evsel *evsel = sample->evsel;
tools/perf/builtin-lock.c
1433
struct thread *thread = machine__findnew_thread(machine, sample->pid,
tools/perf/builtin-lock.c
1434
sample->tid);
tools/perf/builtin-lock.c
1439
sample->file_offset);
tools/perf/builtin-lock.c
1445
err = f(sample);
tools/perf/builtin-lock.c
1864
eops.sample = process_sample_event;
tools/perf/builtin-lock.c
2024
eops.sample = process_sample_event;
tools/perf/builtin-lock.c
478
int (*acquire_event)(struct perf_sample *sample);
tools/perf/builtin-lock.c
481
int (*acquired_event)(struct perf_sample *sample);
tools/perf/builtin-lock.c
484
int (*contended_event)(struct perf_sample *sample);
tools/perf/builtin-lock.c
487
int (*release_event)(struct perf_sample *sample);
tools/perf/builtin-lock.c
490
int (*contention_begin_event)(struct perf_sample *sample);
tools/perf/builtin-lock.c
493
int (*contention_end_event)(struct perf_sample *sample);
tools/perf/builtin-lock.c
550
static u64 callchain_id(struct perf_sample *sample);
tools/perf/builtin-lock.c
553
struct perf_sample *sample)
tools/perf/builtin-lock.c
556
*key = callchain_id(sample);
tools/perf/builtin-lock.c
559
return get_key_by_aggr_mode_simple(key, addr, sample->tid);
tools/perf/builtin-lock.c
562
static int report_lock_acquire_event(struct perf_sample *sample)
tools/perf/builtin-lock.c
567
const char *name = perf_sample__strval(sample, "name");
tools/perf/builtin-lock.c
568
u64 addr = perf_sample__intval(sample, "lockdep_addr");
tools/perf/builtin-lock.c
569
int flag = perf_sample__intval(sample, "flags");
tools/perf/builtin-lock.c
573
ret = get_key_by_aggr_mode_simple(&key, addr, sample->tid);
tools/perf/builtin-lock.c
581
ts = thread_stat_findnew(sample->tid);
tools/perf/builtin-lock.c
631
seq->prev_event_time = sample->time;
tools/perf/builtin-lock.c
636
static int report_lock_acquired_event(struct perf_sample *sample)
tools/perf/builtin-lock.c
642
const char *name = perf_sample__strval(sample, "name");
tools/perf/builtin-lock.c
643
u64 addr = perf_sample__intval(sample, "lockdep_addr");
tools/perf/builtin-lock.c
647
ret = get_key_by_aggr_mode_simple(&key, addr, sample->tid);
tools/perf/builtin-lock.c
655
ts = thread_stat_findnew(sample->tid);
tools/perf/builtin-lock.c
670
contended_term = sample->time - seq->prev_event_time;
tools/perf/builtin-lock.c
696
seq->prev_event_time = sample->time;
tools/perf/builtin-lock.c
701
static int report_lock_contended_event(struct perf_sample *sample)
tools/perf/builtin-lock.c
706
const char *name = perf_sample__strval(sample, "name");
tools/perf/builtin-lock.c
707
u64 addr = perf_sample__intval(sample, "lockdep_addr");
tools/perf/builtin-lock.c
711
ret = get_key_by_aggr_mode_simple(&key, addr, sample->tid);
tools/perf/builtin-lock.c
719
ts = thread_stat_findnew(sample->tid);
tools/perf/builtin-lock.c
753
seq->prev_event_time = sample->time;
tools/perf/builtin-lock.c
758
static int report_lock_release_event(struct perf_sample *sample)
tools/perf/builtin-lock.c
763
const char *name = perf_sample__strval(sample, "name");
tools/perf/builtin-lock.c
764
u64 addr = perf_sample__intval(sample, "lockdep_addr");
tools/perf/builtin-lock.c
768
ret = get_key_by_aggr_mode_simple(&key, addr, sample->tid);
tools/perf/builtin-lock.c
776
ts = thread_stat_findnew(sample->tid);
tools/perf/builtin-lock.c
836
static int lock_contention_caller(struct perf_sample *sample,
tools/perf/builtin-lock.c
850
thread = machine__findnew_thread(machine, -1, sample->pid);
tools/perf/builtin-lock.c
857
ret = thread__resolve_callchain(thread, cursor, sample,
tools/perf/builtin-lock.c
891
static u64 callchain_id(struct perf_sample *sample)
tools/perf/builtin-lock.c
900
thread = machine__findnew_thread(machine, -1, sample->pid);
tools/perf/builtin-lock.c
906
ret = thread__resolve_callchain(thread, cursor, sample,
tools/perf/builtin-lock.c
937
static u64 *get_callstack(struct perf_sample *sample, int max_stack)
tools/perf/builtin-lock.c
943
if (!sample->callchain) {
tools/perf/builtin-lock.c
954
for (i = 0, c = 0; i < sample->callchain->nr && c < max_stack; i++) {
tools/perf/builtin-lock.c
955
u64 ip = sample->callchain->ips[i];
tools/perf/builtin-lock.c
965
static int report_lock_contention_begin_event(struct perf_sample *sample)
tools/perf/builtin-lock.c
970
u64 addr = perf_sample__intval(sample, "lock_addr");
tools/perf/builtin-lock.c
971
unsigned int flags = perf_sample__intval(sample, "flags");
tools/perf/builtin-lock.c
979
ret = get_key_by_aggr_mode(&key, addr, sample);
tools/perf/builtin-mem.c
183
struct perf_sample *sample,
tools/perf/builtin-mem.c
193
if (machine__resolve(machine, &al, sample) < 0) {
tools/perf/builtin-mem.c
217
sample->pid,
tools/perf/builtin-mem.c
219
sample->tid,
tools/perf/builtin-mem.c
221
sample->ip,
tools/perf/builtin-mem.c
223
sample->addr,
tools/perf/builtin-mem.c
228
sample->phys_addr,
tools/perf/builtin-mem.c
234
get_page_size_name(sample->data_page_size, str),
tools/perf/builtin-mem.c
244
sample->weight,
tools/perf/builtin-mem.c
246
sample->data_src,
tools/perf/builtin-mem.c
257
struct perf_sample *sample,
tools/perf/builtin-mem.c
260
return dump_raw_samples(tool, event, sample, machine);
tools/perf/builtin-mem.c
280
mem->tool.sample = process_sample_event;
tools/perf/builtin-record.c
1493
struct perf_sample *sample,
tools/perf/builtin-record.c
1498
set_timestamp_boundary(rec, sample->time);
tools/perf/builtin-record.c
1504
return build_id__mark_dso_hit(tool, event, sample, machine);
tools/perf/builtin-record.c
1533
rec->tool.sample = process_event_sample_stub;
tools/perf/builtin-record.c
1980
struct perf_sample sample;
tools/perf/builtin-record.c
1983
perf_sample__init(&sample, /*all=*/true);
tools/perf/builtin-record.c
1987
sample.id = sid->id;
tools/perf/builtin-record.c
1991
evsel->core.attr.sample_type, &sample);
tools/perf/builtin-record.c
1995
perf_sample__exit(&sample);
tools/perf/builtin-record.c
204
struct perf_sample *sample, struct machine *machine);
tools/perf/builtin-record.c
206
struct perf_sample *sample, struct machine *machine);
tools/perf/builtin-record.c
209
struct perf_sample *sample,
tools/perf/builtin-record.c
2467
tool->sample = process_sample_event;
tools/perf/builtin-record.c
3347
struct perf_sample *sample, struct machine *machine)
tools/perf/builtin-record.c
3355
return perf_event__process_mmap(tool, event, sample, machine);
tools/perf/builtin-record.c
3359
struct perf_sample *sample, struct machine *machine)
tools/perf/builtin-record.c
3368
return perf_event__process_mmap2(tool, event, sample, machine);
tools/perf/builtin-record.c
3373
struct perf_sample *sample,
tools/perf/builtin-record.c
3378
set_timestamp_boundary(rec, sample->time);
tools/perf/builtin-record.c
629
struct perf_sample *sample __maybe_unused,
tools/perf/builtin-record.c
640
struct perf_sample *sample __maybe_unused,
tools/perf/builtin-record.c
646
ret = process_synthesized_event(tool, event, sample, machine);
tools/perf/builtin-report.c
1601
report.tool.sample = process_sample_event;
tools/perf/builtin-report.c
175
struct perf_sample *sample = iter->sample;
tools/perf/builtin-report.c
184
err = addr_map_symbol__inc_samples(&bi->from, sample);
tools/perf/builtin-report.c
188
err = addr_map_symbol__inc_samples(&bi->to, sample);
tools/perf/builtin-report.c
192
err = addr_map_symbol__inc_samples(mem_info__daddr(mi), sample);
tools/perf/builtin-report.c
196
err = hist_entry__inc_addr_samples(he, sample, al->addr);
tools/perf/builtin-report.c
200
err = hist_entry__inc_addr_samples(he, sample, al->addr);
tools/perf/builtin-report.c
202
err = hist_entry__inc_addr_samples(he, sample, al->addr);
tools/perf/builtin-report.c
217
struct perf_sample *sample = iter->sample;
tools/perf/builtin-report.c
226
err = addr_map_symbol__inc_samples(&bi->from, sample);
tools/perf/builtin-report.c
230
err = addr_map_symbol__inc_samples(&bi->to, sample);
tools/perf/builtin-report.c
266
struct perf_sample *sample,
tools/perf/builtin-report.c
272
.sample = sample,
tools/perf/builtin-report.c
279
sample->time)) {
tools/perf/builtin-report.c
283
if (evswitch__discard(&rep->evswitch, sample->evsel))
tools/perf/builtin-report.c
287
if (machine__resolve(machine, &al, sample) < 0) {
tools/perf/builtin-report.c
290
sample->file_offset);
tools/perf/builtin-report.c
301
if (rep->cpu_list && (sample->cpu >= MAX_NR_CPUS ||
tools/perf/builtin-report.c
302
!test_bit(sample->cpu, rep->cpu_bitmap)))
tools/perf/builtin-report.c
310
if (!sample->branch_stack)
tools/perf/builtin-report.c
327
hist__account_cycles(sample->branch_stack, &al, sample,
tools/perf/builtin-report.c
339
sample->file_offset);
tools/perf/builtin-report.c
347
struct perf_sample *sample __maybe_unused,
tools/perf/builtin-report.c
355
sample->evsel,
tools/perf/builtin-report.c
781
struct perf_sample *sample,
tools/perf/builtin-report.c
784
struct hists *hists = evsel__hists(sample->evsel);
tools/perf/builtin-report.c
792
struct perf_sample *sample,
tools/perf/builtin-report.c
796
struct evsel *evsel = sample->evsel;
tools/perf/builtin-report.c
799
evsel = evlist__id2evsel(rep->session->evlist, sample->id);
tools/perf/builtin-report.c
821
rep->tool.sample = count_sample_event;
tools/perf/builtin-sched.c
1179
struct perf_sample *sample,
tools/perf/builtin-sched.c
1182
const u32 prev_pid = perf_sample__intval(sample, "prev_pid"),
tools/perf/builtin-sched.c
1183
next_pid = perf_sample__intval(sample, "next_pid");
tools/perf/builtin-sched.c
1184
const char prev_state = perf_sample__taskstate(sample, "prev_state");
tools/perf/builtin-sched.c
1187
u64 timestamp0, timestamp = sample->time;
tools/perf/builtin-sched.c
1188
int cpu = sample->cpu, err = -1;
tools/perf/builtin-sched.c
1194
sample->file_offset, cpu);
tools/perf/builtin-sched.c
1253
struct perf_sample *sample,
tools/perf/builtin-sched.c
1256
const u32 pid = perf_sample__intval(sample, "pid");
tools/perf/builtin-sched.c
1257
const u64 runtime = perf_sample__intval(sample, "runtime");
tools/perf/builtin-sched.c
1260
u64 timestamp = sample->time;
tools/perf/builtin-sched.c
1261
int cpu = sample->cpu, err = -1;
tools/perf/builtin-sched.c
1271
sample->file_offset, cpu);
tools/perf/builtin-sched.c
1295
struct perf_sample *sample,
tools/perf/builtin-sched.c
1298
const u32 pid = perf_sample__intval(sample, "pid");
tools/perf/builtin-sched.c
1302
u64 timestamp = sample->time;
tools/perf/builtin-sched.c
134
int (*switch_event)(struct perf_sched *sched, struct perf_sample *sample,
tools/perf/builtin-sched.c
1355
struct perf_sample *sample,
tools/perf/builtin-sched.c
1358
const u32 pid = perf_sample__intval(sample, "pid");
tools/perf/builtin-sched.c
1359
u64 timestamp = sample->time;
tools/perf/builtin-sched.c
137
int (*runtime_event)(struct perf_sched *sched, struct perf_sample *sample,
tools/perf/builtin-sched.c
140
int (*wakeup_event)(struct perf_sched *sched, struct perf_sample *sample,
tools/perf/builtin-sched.c
148
struct perf_sample *sample,
tools/perf/builtin-sched.c
1573
struct perf_sample *sample,
tools/perf/builtin-sched.c
1579
return sched->tp_handler->wakeup_event(sched, sample, machine);
tools/perf/builtin-sched.c
1585
struct perf_sample *sample __maybe_unused,
tools/perf/builtin-sched.c
1688
static int map_switch_event(struct perf_sched *sched, struct perf_sample *sample,
tools/perf/builtin-sched.c
1691
const u32 next_pid = perf_sample__intval(sample, "next_pid");
tools/perf/builtin-sched.c
1692
const u32 prev_pid = perf_sample__intval(sample, "prev_pid");
tools/perf/builtin-sched.c
1696
u64 timestamp0, timestamp = sample->time;
tools/perf/builtin-sched.c
1699
.cpu = sample->cpu,
tools/perf/builtin-sched.c
1712
sample->file_offset, this_cpu.cpu);
tools/perf/builtin-sched.c
1858
struct perf_sample *sample,
tools/perf/builtin-sched.c
1862
int this_cpu = sample->cpu, err = 0;
tools/perf/builtin-sched.c
1863
u32 prev_pid = perf_sample__intval(sample, "prev_pid"),
tools/perf/builtin-sched.c
1864
next_pid = perf_sample__intval(sample, "next_pid");
tools/perf/builtin-sched.c
1869
sample->file_offset, this_cpu);
tools/perf/builtin-sched.c
1883
err = sched->tp_handler->switch_event(sched, sample, machine);
tools/perf/builtin-sched.c
1890
struct perf_sample *sample,
tools/perf/builtin-sched.c
1896
if (sample->cpu >= MAX_CPUS) {
tools/perf/builtin-sched.c
1898
sample->file_offset, sample->cpu);
tools/perf/builtin-sched.c
1903
return sched->tp_handler->runtime_event(sched, sample, machine);
tools/perf/builtin-sched.c
1910
struct perf_sample *sample,
tools/perf/builtin-sched.c
1916
perf_event__process_fork(tool, event, sample, machine);
tools/perf/builtin-sched.c
1926
struct perf_sample *sample,
tools/perf/builtin-sched.c
1932
return sched->tp_handler->migrate_task_event(sched, sample, machine);
tools/perf/builtin-sched.c
1938
struct perf_sample *sample,
tools/perf/builtin-sched.c
1943
struct perf_sample *sample,
tools/perf/builtin-sched.c
1946
struct evsel *evsel = sample->evsel;
tools/perf/builtin-sched.c
1951
err = f(tool, sample, machine);
tools/perf/builtin-sched.c
1959
struct perf_sample *sample,
tools/perf/builtin-sched.c
1966
err = perf_event__process_comm(tool, event, sample, machine);
tools/perf/builtin-sched.c
1970
thread = machine__find_thread(machine, sample->pid, sample->tid);
tools/perf/builtin-sched.c
2146
struct perf_sample *sample)
tools/perf/builtin-sched.c
2149
int prev_prio = (int)perf_sample__intval(sample, "prev_prio");
tools/perf/builtin-sched.c
2237
struct perf_sample *sample,
tools/perf/builtin-sched.c
2243
const char *next_comm = perf_sample__strval(sample, "next_comm");
tools/perf/builtin-sched.c
2244
const u32 next_pid = perf_sample__intval(sample, "next_pid");
tools/perf/builtin-sched.c
2250
if (cpu_list && (sample->cpu >= MAX_NR_CPUS ||
tools/perf/builtin-sched.c
2251
!test_bit(sample->cpu, cpu_bitmap)))
tools/perf/builtin-sched.c
2255
printf("%15s [%04d] ", tstr, sample->cpu);
tools/perf/builtin-sched.c
2264
if (i == sample->cpu)
tools/perf/builtin-sched.c
2274
const char *prev_comm = perf_sample__strval(sample, "prev_comm");
tools/perf/builtin-sched.c
2276
thread__set_comm(thread, prev_comm, sample->time);
tools/perf/builtin-sched.c
2282
printf(" %-*s ", MAX_PRIO_STR_LEN, timehist_get_priostr(thread, sample));
tools/perf/builtin-sched.c
2309
sample__fprintf_sym(sample, al, 0,
tools/perf/builtin-sched.c
2391
static bool is_idle_sample(struct perf_sample *sample)
tools/perf/builtin-sched.c
2394
if (evsel__name_is(sample->evsel, "sched:sched_switch"))
tools/perf/builtin-sched.c
2395
return perf_sample__intval(sample, "prev_pid") == 0;
tools/perf/builtin-sched.c
2397
return sample->pid == 0;
tools/perf/builtin-sched.c
2401
struct perf_sample *sample,
tools/perf/builtin-sched.c
2408
thread = machine__findnew_thread(machine, sample->pid, sample->pid);
tools/perf/builtin-sched.c
2410
pr_debug("Failed to get thread for pid %d.\n", sample->pid);
tools/perf/builtin-sched.c
2414
if (!sched->show_callchain || sample->callchain == NULL) {
tools/perf/builtin-sched.c
2421
if (thread__resolve_callchain(thread, cursor, sample,
tools/perf/builtin-sched.c
2566
struct perf_sample *sample)
tools/perf/builtin-sched.c
2570
if (!sched->show_callchain || sample->callchain == NULL)
tools/perf/builtin-sched.c
2581
struct perf_sample *sample,
tools/perf/builtin-sched.c
2586
if (is_idle_sample(sample)) {
tools/perf/builtin-sched.c
2587
thread = get_idle_thread(sample->cpu);
tools/perf/builtin-sched.c
2589
pr_err("Failed to get idle thread for cpu %d.\n", sample->cpu);
tools/perf/builtin-sched.c
2593
thread = machine__findnew_thread(machine, sample->pid,
tools/perf/builtin-sched.c
2594
sample->tid ?: sample->pid);
tools/perf/builtin-sched.c
2597
sample->tid);
tools/perf/builtin-sched.c
2600
save_task_callchain(sched, sample, machine);
tools/perf/builtin-sched.c
2605
idle = get_idle_thread(sample->cpu);
tools/perf/builtin-sched.c
2607
pr_err("Failed to get idle thread for cpu %d.\n", sample->cpu);
tools/perf/builtin-sched.c
2623
if (perf_sample__intval(sample, "next_pid") == 0)
tools/perf/builtin-sched.c
2624
save_idle_callchain(sched, itr, sample);
tools/perf/builtin-sched.c
2635
struct perf_sample *sample)
tools/perf/builtin-sched.c
2656
else if (evsel__name_is(sample->evsel, "sched:sched_switch"))
tools/perf/builtin-sched.c
2657
prio = perf_sample__intval(sample, "prev_prio");
tools/perf/builtin-sched.c
2668
if (!evsel__name_is(sample->evsel, "sched:sched_switch"))
tools/perf/builtin-sched.c
2670
else if (perf_sample__intval(sample, "prev_pid") != 0 &&
tools/perf/builtin-sched.c
2671
perf_sample__intval(sample, "next_pid") != 0)
tools/perf/builtin-sched.c
2679
struct perf_sample *sample,
tools/perf/builtin-sched.c
2686
thread = machine__findnew_thread(machine, sample->pid, sample->tid);
tools/perf/builtin-sched.c
2691
if (timehist_skip_sample(sched, thread, sample) &&
tools/perf/builtin-sched.c
2692
timehist_skip_sample(sched, awakened, sample)) {
tools/perf/builtin-sched.c
2697
timestamp__scnprintf_usec(sample->time, tstr, sizeof(tstr));
tools/perf/builtin-sched.c
2698
printf("%15s [%04d] ", tstr, sample->cpu);
tools/perf/builtin-sched.c
2716
struct perf_sample *sample __maybe_unused,
tools/perf/builtin-sched.c
2724
struct perf_sample *sample,
tools/perf/builtin-sched.c
2731
const u32 pid = perf_sample__intval(sample, "pid");
tools/perf/builtin-sched.c
2744
tr->ready_to_run = sample->time;
tools/perf/builtin-sched.c
2748
!perf_time__skip_sample(&sched->ptime, sample->time))
tools/perf/builtin-sched.c
2749
timehist_print_wakeup_event(sched, sample, machine, thread);
tools/perf/builtin-sched.c
2756
struct perf_sample *sample,
tools/perf/builtin-sched.c
2769
ocpu = perf_sample__intval(sample, "orig_cpu");
tools/perf/builtin-sched.c
2770
dcpu = perf_sample__intval(sample, "dest_cpu");
tools/perf/builtin-sched.c
2772
thread = machine__findnew_thread(machine, sample->pid, sample->tid);
tools/perf/builtin-sched.c
2776
if (timehist_skip_sample(sched, thread, sample) &&
tools/perf/builtin-sched.c
2777
timehist_skip_sample(sched, migrated, sample)) {
tools/perf/builtin-sched.c
2782
timestamp__scnprintf_usec(sample->time, tstr, sizeof(tstr));
tools/perf/builtin-sched.c
2783
printf("%15s [%04d] ", tstr, sample->cpu);
tools/perf/builtin-sched.c
2791
c = (i == sample->cpu) ? 'm' : ' ';
tools/perf/builtin-sched.c
2811
struct perf_sample *sample,
tools/perf/builtin-sched.c
2818
const u32 pid = perf_sample__intval(sample, "pid");
tools/perf/builtin-sched.c
2831
tr->migrated = sample->time;
tools/perf/builtin-sched.c
2835
timehist_print_migration_event(sched, sample, machine, thread);
tools/perf/builtin-sched.c
2842
static void timehist_update_task_prio(struct perf_sample *sample,
tools/perf/builtin-sched.c
2847
const u32 next_pid = perf_sample__intval(sample, "next_pid");
tools/perf/builtin-sched.c
2848
const u32 next_prio = perf_sample__intval(sample, "next_prio");
tools/perf/builtin-sched.c
2851
thread = get_idle_thread(sample->cpu);
tools/perf/builtin-sched.c
2867
struct perf_sample *sample,
tools/perf/builtin-sched.c
2875
u64 tprev, t = sample->time;
tools/perf/builtin-sched.c
2877
const char state = perf_sample__taskstate(sample, "prev_state");
tools/perf/builtin-sched.c
2880
if (sample->cpu >= MAX_CPUS) {
tools/perf/builtin-sched.c
2882
sample->file_offset, sample->cpu);
tools/perf/builtin-sched.c
2887
if (machine__resolve(machine, &al, sample) < 0) {
tools/perf/builtin-sched.c
2890
sample->file_offset);
tools/perf/builtin-sched.c
2896
timehist_update_task_prio(sample, machine);
tools/perf/builtin-sched.c
2898
thread = timehist_get_thread(sched, sample, machine);
tools/perf/builtin-sched.c
2904
if (timehist_skip_sample(sched, thread, sample))
tools/perf/builtin-sched.c
2913
tprev = evsel__get_time(sample->evsel, sample->cpu);
tools/perf/builtin-sched.c
2949
if (!sched->idle_hist || is_idle_sample(sample)) {
tools/perf/builtin-sched.c
2950
if (!cpu_list || (sample->cpu < MAX_NR_CPUS &&
tools/perf/builtin-sched.c
2951
test_bit(sample->cpu, cpu_bitmap)))
tools/perf/builtin-sched.c
2985
timehist_print_sample(sched, sample, &al, thread, t, state);
tools/perf/builtin-sched.c
2996
tr->last_time = sample->time;
tools/perf/builtin-sched.c
3010
evsel__save_time(sample->evsel, sample->time, sample->cpu);
tools/perf/builtin-sched.c
3019
struct perf_sample *sample,
tools/perf/builtin-sched.c
3022
return timehist_sched_change_event(tool, event, sample, machine);
tools/perf/builtin-sched.c
3027
struct perf_sample *sample,
tools/perf/builtin-sched.c
3032
timestamp__scnprintf_usec(sample->time, tstr, sizeof(tstr));
tools/perf/builtin-sched.c
3034
printf("lost %" PRI_lu64 " events on cpu %d\n", event->lost.lost, sample->cpu);
tools/perf/builtin-sched.c
3271
struct perf_sample *sample,
tools/perf/builtin-sched.c
3276
struct perf_sample *sample,
tools/perf/builtin-sched.c
3280
struct evsel *evsel = sample->evsel;
tools/perf/builtin-sched.c
3283
.cpu = sample->cpu,
tools/perf/builtin-sched.c
3294
err = f(tool, event, sample, machine);
tools/perf/builtin-sched.c
3392
sched->tool.sample = perf_timehist__process_sample;
tools/perf/builtin-sched.c
3837
struct perf_sample *sample __maybe_unused,
tools/perf/builtin-sched.c
4830
struct perf_sample *sample __maybe_unused,
tools/perf/builtin-sched.c
5165
sched.tool.sample = perf_sched__process_tracepoint_sample;
tools/perf/builtin-sched.c
868
struct perf_sample *sample,
tools/perf/builtin-sched.c
871
const char *comm = perf_sample__strval(sample, "comm");
tools/perf/builtin-sched.c
872
const u32 pid = perf_sample__intval(sample, "pid");
tools/perf/builtin-sched.c
876
printf("sched_wakeup event %p\n", sample->evsel);
tools/perf/builtin-sched.c
878
printf(" ... pid %d woke up %s/%d\n", sample->tid, comm, pid);
tools/perf/builtin-sched.c
881
waker = register_pid(sched, sample->tid, "<unknown>");
tools/perf/builtin-sched.c
886
add_sched_event_wakeup(sched, waker, sample->time, wakee);
tools/perf/builtin-sched.c
891
struct perf_sample *sample,
tools/perf/builtin-sched.c
894
const char *prev_comm = perf_sample__strval(sample, "prev_comm"),
tools/perf/builtin-sched.c
895
*next_comm = perf_sample__strval(sample, "next_comm");
tools/perf/builtin-sched.c
896
const u32 prev_pid = perf_sample__intval(sample, "prev_pid"),
tools/perf/builtin-sched.c
897
next_pid = perf_sample__intval(sample, "next_pid");
tools/perf/builtin-sched.c
899
u64 timestamp0, timestamp = sample->time;
tools/perf/builtin-sched.c
900
int cpu = sample->cpu;
tools/perf/builtin-sched.c
904
printf("sched_switch event %p\n", sample->evsel);
tools/perf/builtin-script.c
1003
thread__find_map_fb(thread, sample->cpumode, from, &alf);
tools/perf/builtin-script.c
1004
thread__find_map_fb(thread, sample->cpumode, to, &alt);
tools/perf/builtin-script.c
1020
static int perf_sample__fprintf_brstacksym(struct perf_sample *sample,
tools/perf/builtin-script.c
1024
struct branch_stack *br = sample->branch_stack;
tools/perf/builtin-script.c
1025
struct branch_entry *entries = perf_sample__branch_entries(sample);
tools/perf/builtin-script.c
1040
thread__find_symbol_fb(thread, sample->cpumode, from, &alf);
tools/perf/builtin-script.c
1041
thread__find_symbol_fb(thread, sample->cpumode, to, &alt);
tools/perf/builtin-script.c
1058
static int perf_sample__fprintf_brstackoff(struct perf_sample *sample,
tools/perf/builtin-script.c
1062
struct branch_stack *br = sample->branch_stack;
tools/perf/builtin-script.c
1063
struct branch_entry *entries = perf_sample__branch_entries(sample);
tools/perf/builtin-script.c
1078
if (thread__find_map_fb(thread, sample->cpumode, from, &alf) &&
tools/perf/builtin-script.c
1082
if (thread__find_map_fb(thread, sample->cpumode, to, &alt) &&
tools/perf/builtin-script.c
1362
static int perf_sample__fprintf_brstackinsn(struct perf_sample *sample,
tools/perf/builtin-script.c
1368
struct branch_stack *br = sample->branch_stack;
tools/perf/builtin-script.c
1369
struct branch_entry *entries = perf_sample__branch_entries(sample);
tools/perf/builtin-script.c
1387
x.cpu = sample->cpu;
tools/perf/builtin-script.c
1389
if (PRINT_FIELD(BRCNTR) && sample->branch_stack_cntr)
tools/perf/builtin-script.c
1390
br_cntr = sample->branch_stack_cntr[nr - 1];
tools/perf/builtin-script.c
1433
if (PRINT_FIELD(BRCNTR) && sample->branch_stack_cntr)
tools/perf/builtin-script.c
1434
br_cntr = sample->branch_stack_cntr[i];
tools/perf/builtin-script.c
1462
if (entries[0].from == sample->ip)
tools/perf/builtin-script.c
1476
end = sample->ip;
tools/perf/builtin-script.c
1485
len = grab_bb(buffer, sample->ip, sample->ip,
tools/perf/builtin-script.c
1490
printed += fprintf(fp, "\t%016" PRIx64 "\t", sample->ip);
tools/perf/builtin-script.c
1491
printed += any_dump_insn(evsel, &x, sample->ip, buffer, len, &ilen, fp);
tools/perf/builtin-script.c
1496
print_srccode(thread, x.cpumode, sample->ip);
tools/perf/builtin-script.c
1510
&& start + off != sample->ip) {
tools/perf/builtin-script.c
1524
static int perf_sample__fprintf_addr(struct perf_sample *sample,
tools/perf/builtin-script.c
1529
int printed = fprintf(fp, "%16" PRIx64, sample->addr);
tools/perf/builtin-script.c
1535
thread__resolve(thread, &al, sample);
tools/perf/builtin-script.c
1552
static const char *resolve_branch_sym(struct perf_sample *sample,
tools/perf/builtin-script.c
1561
if (sample->flags & (PERF_IP_FLAG_CALL | PERF_IP_FLAG_TRACE_BEGIN)) {
tools/perf/builtin-script.c
1564
thread__resolve(thread, addr_al, sample);
tools/perf/builtin-script.c
1568
*ip = sample->addr;
tools/perf/builtin-script.c
1570
*ip = sample->addr;
tools/perf/builtin-script.c
1572
} else if (sample->flags & (PERF_IP_FLAG_RETURN | PERF_IP_FLAG_TRACE_END)) {
tools/perf/builtin-script.c
1576
*ip = sample->ip;
tools/perf/builtin-script.c
1581
static int perf_sample__fprintf_callindent(struct perf_sample *sample,
tools/perf/builtin-script.c
1588
size_t depth = thread_stack__depth(thread, sample->cpu);
tools/perf/builtin-script.c
1599
if (thread__ts(thread) && sample->flags & PERF_IP_FLAG_RETURN)
tools/perf/builtin-script.c
1602
name = resolve_branch_sym(sample, evsel, thread, al, addr_al, &ip);
tools/perf/builtin-script.c
1631
static int perf_sample__fprintf_insn(struct perf_sample *sample,
tools/perf/builtin-script.c
1640
perf_sample__fetch_insn(sample, thread, machine);
tools/perf/builtin-script.c
1643
printed += fprintf(fp, " ilen: %d", sample->insn_len);
tools/perf/builtin-script.c
1644
if (PRINT_FIELD(INSN) && sample->insn_len) {
tools/perf/builtin-script.c
1646
printed += sample__fprintf_insn_raw(sample, fp);
tools/perf/builtin-script.c
1648
if (PRINT_FIELD(DISASM) && sample->insn_len) {
tools/perf/builtin-script.c
1650
printed += sample__fprintf_insn_asm(sample, thread, machine, fp, al);
tools/perf/builtin-script.c
1653
printed += perf_sample__fprintf_brstackinsn(sample, evsel, thread, attr, machine, fp);
tools/perf/builtin-script.c
1658
static int perf_sample__fprintf_ipc(struct perf_sample *sample,
tools/perf/builtin-script.c
1663
if (!PRINT_FIELD(IPC) || !sample->cyc_cnt || !sample->insn_cnt)
tools/perf/builtin-script.c
1666
ipc = (sample->insn_cnt * 100) / sample->cyc_cnt;
tools/perf/builtin-script.c
1669
ipc / 100, ipc % 100, sample->insn_cnt, sample->cyc_cnt);
tools/perf/builtin-script.c
1672
static int perf_sample__fprintf_bts(struct perf_sample *sample,
tools/perf/builtin-script.c
1685
printed += perf_sample__fprintf_callindent(sample, evsel, thread, al, addr_al, fp);
tools/perf/builtin-script.c
1692
if (symbol_conf.use_callchain && sample->callchain) {
tools/perf/builtin-script.c
1695
sample, NULL, NULL,
tools/perf/builtin-script.c
1708
printed += sample__fprintf_sym(sample, al, 0, print_opts, cursor,
tools/perf/builtin-script.c
1717
printed += perf_sample__fprintf_addr(sample, thread, evsel, fp);
tools/perf/builtin-script.c
1720
printed += perf_sample__fprintf_ipc(sample, evsel, fp);
tools/perf/builtin-script.c
1725
printed += perf_sample__fprintf_insn(sample, evsel, attr, thread, machine, fp, al);
tools/perf/builtin-script.c
1818
static int perf_sample__fprintf_bpf_output(struct perf_sample *sample, FILE *fp)
tools/perf/builtin-script.c
1820
unsigned int nr_bytes = sample->raw_size;
tools/perf/builtin-script.c
1822
int printed = binary__fprintf(sample->raw_data, nr_bytes, 8,
tools/perf/builtin-script.c
1826
printed += fprintf(fp, "%17s \"%s\"\n", "BPF string:", (char *)(sample->raw_data));
tools/perf/builtin-script.c
1865
static int perf_sample__fprintf_synth_ptwrite(struct perf_sample *sample, FILE *fp)
tools/perf/builtin-script.c
1867
struct perf_synth_intel_ptwrite *data = perf_sample__synth_ptr(sample);
tools/perf/builtin-script.c
1872
if (perf_sample__bad_synth_size(sample, *data))
tools/perf/builtin-script.c
1885
static int perf_sample__fprintf_synth_mwait(struct perf_sample *sample, FILE *fp)
tools/perf/builtin-script.c
1887
struct perf_synth_intel_mwait *data = perf_sample__synth_ptr(sample);
tools/perf/builtin-script.c
1890
if (perf_sample__bad_synth_size(sample, *data))
tools/perf/builtin-script.c
1898
static int perf_sample__fprintf_synth_pwre(struct perf_sample *sample, FILE *fp)
tools/perf/builtin-script.c
1900
struct perf_synth_intel_pwre *data = perf_sample__synth_ptr(sample);
tools/perf/builtin-script.c
1903
if (perf_sample__bad_synth_size(sample, *data))
tools/perf/builtin-script.c
1911
static int perf_sample__fprintf_synth_exstop(struct perf_sample *sample, FILE *fp)
tools/perf/builtin-script.c
1913
struct perf_synth_intel_exstop *data = perf_sample__synth_ptr(sample);
tools/perf/builtin-script.c
1916
if (perf_sample__bad_synth_size(sample, *data))
tools/perf/builtin-script.c
1923
static int perf_sample__fprintf_synth_pwrx(struct perf_sample *sample, FILE *fp)
tools/perf/builtin-script.c
1925
struct perf_synth_intel_pwrx *data = perf_sample__synth_ptr(sample);
tools/perf/builtin-script.c
1928
if (perf_sample__bad_synth_size(sample, *data))
tools/perf/builtin-script.c
1937
static int perf_sample__fprintf_synth_cbr(struct perf_sample *sample, FILE *fp)
tools/perf/builtin-script.c
1939
struct perf_synth_intel_cbr *data = perf_sample__synth_ptr(sample);
tools/perf/builtin-script.c
1943
if (perf_sample__bad_synth_size(sample, *data))
tools/perf/builtin-script.c
1955
static int perf_sample__fprintf_synth_psb(struct perf_sample *sample, FILE *fp)
tools/perf/builtin-script.c
1957
struct perf_synth_intel_psb *data = perf_sample__synth_ptr(sample);
tools/perf/builtin-script.c
1960
if (perf_sample__bad_synth_size(sample, *data))
tools/perf/builtin-script.c
1968
static int perf_sample__fprintf_synth_evt(struct perf_sample *sample, FILE *fp)
tools/perf/builtin-script.c
1970
struct perf_synth_intel_evt *data = perf_sample__synth_ptr(sample);
tools/perf/builtin-script.c
1978
if (perf_sample__bad_synth_size(sample, *data))
tools/perf/builtin-script.c
2004
static int perf_sample__fprintf_synth_iflag_chg(struct perf_sample *sample, FILE *fp)
tools/perf/builtin-script.c
2006
struct perf_synth_intel_iflag_chg *data = perf_sample__synth_ptr(sample);
tools/perf/builtin-script.c
2009
if (perf_sample__bad_synth_size(sample, *data))
tools/perf/builtin-script.c
2036
static int perf_sample__fprintf_synth(struct perf_sample *sample,
tools/perf/builtin-script.c
2041
return perf_sample__fprintf_synth_ptwrite(sample, fp);
tools/perf/builtin-script.c
2043
return perf_sample__fprintf_synth_mwait(sample, fp);
tools/perf/builtin-script.c
2045
return perf_sample__fprintf_synth_pwre(sample, fp);
tools/perf/builtin-script.c
2047
return perf_sample__fprintf_synth_exstop(sample, fp);
tools/perf/builtin-script.c
2049
return perf_sample__fprintf_synth_pwrx(sample, fp);
tools/perf/builtin-script.c
2051
return perf_sample__fprintf_synth_cbr(sample, fp);
tools/perf/builtin-script.c
2053
return perf_sample__fprintf_synth_psb(sample, fp);
tools/perf/builtin-script.c
2055
return perf_sample__fprintf_synth_evt(sample, fp);
tools/perf/builtin-script.c
2057
return perf_sample__fprintf_synth_iflag_chg(sample, fp);
tools/perf/builtin-script.c
2059
return perf_sample__fprintf_synth_vpadtl(sample, fp);
tools/perf/builtin-script.c
2104
struct perf_sample *sample;
tools/perf/builtin-script.c
2119
perf_sample__fprintf_start(NULL, mctx->sample, mctx->thread, mctx->evsel,
tools/perf/builtin-script.c
2134
perf_sample__fprintf_start(NULL, mctx->sample, mctx->thread, mctx->evsel,
tools/perf/builtin-script.c
2290
struct perf_sample *sample,
tools/perf/builtin-script.c
2298
.sample = sample,
tools/perf/builtin-script.c
2343
cpu_map_idx = perf_cpu_map__idx(evsel->core.cpus, (struct perf_cpu){sample->cpu});
tools/perf/builtin-script.c
2347
sample->cpu == (u32)-1) {
tools/perf/builtin-script.c
2351
pr_info("Missing CPU map entry for CPU %d\n", sample->cpu);
tools/perf/builtin-script.c
2355
thread_map_idx = perf_thread_map__idx(evsel->core.threads, sample->tid);
tools/perf/builtin-script.c
2359
sample->tid == (u32)-1) {
tools/perf/builtin-script.c
2363
pr_info("Missing thread map entry for thread %d\n", sample->tid);
tools/perf/builtin-script.c
2369
count->val = old_count->val + sample->period;
tools/perf/builtin-script.c
2386
static bool show_event(struct perf_sample *sample,
tools/perf/builtin-script.c
2392
int depth = thread_stack__depth(thread, sample->cpu);
tools/perf/builtin-script.c
2406
const char *name = resolve_branch_sym(sample, evsel, thread, al, addr_al,
tools/perf/builtin-script.c
2429
struct perf_sample *sample,
tools/perf/builtin-script.c
2435
struct evsel *evsel = sample->evsel;
tools/perf/builtin-script.c
2448
perf_sample__fprintf_start(script, sample, thread, evsel,
tools/perf/builtin-script.c
2452
fprintf(fp, "%10" PRIu64 " ", sample->period);
tools/perf/builtin-script.c
2464
perf_sample__fprintf_flags(sample->flags, fp);
tools/perf/builtin-script.c
2467
perf_sample__fprintf_bts(sample, evsel, thread, al, addr_al, machine, fp);
tools/perf/builtin-script.c
2471
if (PRINT_FIELD(TRACE) && sample->raw_data) {
tools/perf/builtin-script.c
2475
event_format__fprintf(tp_format, sample->cpu,
tools/perf/builtin-script.c
2476
sample->raw_data, sample->raw_size,
tools/perf/builtin-script.c
2482
perf_sample__fprintf_synth(sample, evsel, fp);
tools/perf/builtin-script.c
2485
perf_sample__fprintf_addr(sample, thread, evsel, fp);
tools/perf/builtin-script.c
2488
data_src__fprintf(sample->data_src, fp);
tools/perf/builtin-script.c
2491
fprintf(fp, "%16" PRIu64, sample->weight);
tools/perf/builtin-script.c
2494
fprintf(fp, "%16" PRIu16, sample->ins_lat);
tools/perf/builtin-script.c
2497
fprintf(fp, "%16" PRIu16, sample->weight3);
tools/perf/builtin-script.c
2502
sample->cgroup);
tools/perf/builtin-script.c
2516
if (symbol_conf.use_callchain && sample->callchain) {
tools/perf/builtin-script.c
2519
sample, NULL, NULL,
tools/perf/builtin-script.c
2524
sample__fprintf_sym(sample, al, 0, output[type].print_ip_opts, cursor,
tools/perf/builtin-script.c
2529
perf_sample__fprintf_iregs(sample, attr,
tools/perf/builtin-script.c
2536
perf_sample__fprintf_uregs(sample, attr,
tools/perf/builtin-script.c
2543
perf_sample__fprintf_brstack(sample, thread, evsel, fp);
tools/perf/builtin-script.c
2545
perf_sample__fprintf_brstacksym(sample, thread, evsel, fp);
tools/perf/builtin-script.c
2547
perf_sample__fprintf_brstackoff(sample, thread, evsel, fp);
tools/perf/builtin-script.c
2550
perf_sample__fprintf_bpf_output(sample, fp);
tools/perf/builtin-script.c
2551
perf_sample__fprintf_insn(sample, evsel, attr, thread, machine, fp, al);
tools/perf/builtin-script.c
2554
fprintf(fp, "%16" PRIx64, sample->phys_addr);
tools/perf/builtin-script.c
2557
fprintf(fp, " %s", get_page_size_name(sample->data_page_size, str));
tools/perf/builtin-script.c
2560
fprintf(fp, " %s", get_page_size_name(sample->code_page_size, str));
tools/perf/builtin-script.c
2562
perf_sample__fprintf_ipc(sample, evsel, fp);
tools/perf/builtin-script.c
2573
perf_sample__fprint_metric(thread, evsel, sample, fp);
tools/perf/builtin-script.c
2647
static bool filter_cpu(struct perf_sample *sample)
tools/perf/builtin-script.c
2649
if (cpu_list && sample->cpu != (u32)-1 && sample->cpu < MAX_NR_CPUS)
tools/perf/builtin-script.c
2650
return !test_bit(sample->cpu, cpu_bitmap);
tools/perf/builtin-script.c
2656
struct perf_sample *sample,
tools/perf/builtin-script.c
2660
struct evsel *evsel = sample->evsel;
tools/perf/builtin-script.c
2669
ret = dlfilter__filter_event_early(dlfilter, event, sample, evsel, machine, &al, &addr_al);
tools/perf/builtin-script.c
2677
sample->time)) {
tools/perf/builtin-script.c
2682
if (sample->time < last_timestamp) {
tools/perf/builtin-script.c
2685
sample->time);
tools/perf/builtin-script.c
2688
last_timestamp = sample->time;
tools/perf/builtin-script.c
2692
if (filter_cpu(sample))
tools/perf/builtin-script.c
2695
if (!al.thread && machine__resolve(machine, &al, sample) < 0) {
tools/perf/builtin-script.c
2698
sample->file_offset);
tools/perf/builtin-script.c
2706
if (!show_event(sample, evsel, al.thread, &al, &addr_al))
tools/perf/builtin-script.c
2712
ret = dlfilter__filter_event(dlfilter, event, sample, evsel, machine, &al, &addr_al);
tools/perf/builtin-script.c
2725
thread__resolve(al.thread, &addr_al, sample);
tools/perf/builtin-script.c
2728
scripting_ops->process_event(event, sample, &al, addr_al_ptr);
tools/perf/builtin-script.c
2730
process_event(scr, sample, &al, &addr_al, machine);
tools/perf/builtin-script.c
2741
struct perf_sample *sample,
tools/perf/builtin-script.c
2745
struct evsel *evsel = sample->evsel;
tools/perf/builtin-script.c
2760
sample->time)) {
tools/perf/builtin-script.c
2765
if (sample->time < last_timestamp) {
tools/perf/builtin-script.c
2768
sample->time);
tools/perf/builtin-script.c
2771
last_timestamp = sample->time;
tools/perf/builtin-script.c
2775
if (filter_cpu(sample))
tools/perf/builtin-script.c
2778
if (machine__resolve(machine, &al, sample) < 0) {
tools/perf/builtin-script.c
2781
sample->file_offset);
tools/perf/builtin-script.c
2789
if (!show_event(sample, evsel, al.thread, &al, NULL))
tools/perf/builtin-script.c
2795
perf_sample__fprintf_start(scr, sample, al.thread, evsel,
tools/perf/builtin-script.c
2803
if (symbol_conf.use_callchain && sample->callchain) {
tools/perf/builtin-script.c
2806
sample, NULL, NULL,
tools/perf/builtin-script.c
2814
sample__fprintf_sym(sample, &al, 0, output[type].print_ip_opts,
tools/perf/builtin-script.c
2901
struct perf_sample *sample,
tools/perf/builtin-script.c
2907
struct evsel *evsel = sample->evsel;
tools/perf/builtin-script.c
2911
evsel = evlist__id2evsel(session->evlist, sample->id);
tools/perf/builtin-script.c
2914
sample->cpu = 0;
tools/perf/builtin-script.c
2915
sample->time = timestamp;
tools/perf/builtin-script.c
2916
sample->pid = pid;
tools/perf/builtin-script.c
2917
sample->tid = tid;
tools/perf/builtin-script.c
2920
if (filter_cpu(sample))
tools/perf/builtin-script.c
2927
struct evsel *saved_evsel = sample->evsel;
tools/perf/builtin-script.c
2929
sample->evsel = evsel;
tools/perf/builtin-script.c
2930
perf_sample__fprintf_start(script, sample, thread, evsel,
tools/perf/builtin-script.c
2932
sample->evsel = saved_evsel;
tools/perf/builtin-script.c
2943
struct perf_sample *sample, struct machine *machine,
tools/perf/builtin-script.c
2946
return print_event_with_time(tool, event, sample, machine, pid, tid, 0);
tools/perf/builtin-script.c
2951
struct perf_sample *sample,
tools/perf/builtin-script.c
2954
if (perf_event__process_comm(tool, event, sample, machine) < 0)
tools/perf/builtin-script.c
2957
return print_event(tool, event, sample, machine, event->comm.pid,
tools/perf/builtin-script.c
2963
struct perf_sample *sample,
tools/perf/builtin-script.c
2966
if (perf_event__process_namespaces(tool, event, sample, machine) < 0)
tools/perf/builtin-script.c
2969
return print_event(tool, event, sample, machine, event->namespaces.pid,
tools/perf/builtin-script.c
2975
struct perf_sample *sample,
tools/perf/builtin-script.c
2978
if (perf_event__process_cgroup(tool, event, sample, machine) < 0)
tools/perf/builtin-script.c
2981
return print_event(tool, event, sample, machine, sample->pid,
tools/perf/builtin-script.c
2982
sample->tid);
tools/perf/builtin-script.c
2987
struct perf_sample *sample,
tools/perf/builtin-script.c
2990
if (perf_event__process_fork(tool, event, sample, machine) < 0)
tools/perf/builtin-script.c
2993
return print_event_with_time(tool, event, sample, machine,
tools/perf/builtin-script.c
2999
struct perf_sample *sample,
tools/perf/builtin-script.c
3003
if (print_event_with_time(tool, event, sample, machine, event->fork.pid,
tools/perf/builtin-script.c
3007
return perf_event__process_exit(tool, event, sample, machine);
tools/perf/builtin-script.c
3012
struct perf_sample *sample,
tools/perf/builtin-script.c
3015
if (perf_event__process_mmap(tool, event, sample, machine) < 0)
tools/perf/builtin-script.c
3018
return print_event(tool, event, sample, machine, event->mmap.pid,
tools/perf/builtin-script.c
3024
struct perf_sample *sample,
tools/perf/builtin-script.c
3027
if (perf_event__process_mmap2(tool, event, sample, machine) < 0)
tools/perf/builtin-script.c
3030
return print_event(tool, event, sample, machine, event->mmap2.pid,
tools/perf/builtin-script.c
3036
struct perf_sample *sample,
tools/perf/builtin-script.c
3041
if (perf_event__process_switch(tool, event, sample, machine) < 0)
tools/perf/builtin-script.c
3044
if (scripting_ops && scripting_ops->process_switch && !filter_cpu(sample))
tools/perf/builtin-script.c
3045
scripting_ops->process_switch(event, sample, machine);
tools/perf/builtin-script.c
3050
return print_event(tool, event, sample, machine, sample->pid,
tools/perf/builtin-script.c
3051
sample->tid);
tools/perf/builtin-script.c
3069
struct perf_sample *sample,
tools/perf/builtin-script.c
3072
return print_event(tool, event, sample, machine, sample->pid,
tools/perf/builtin-script.c
3073
sample->tid);
tools/perf/builtin-script.c
3079
struct perf_sample *sample,
tools/perf/builtin-script.c
3083
scripting_ops->process_throttle(event, sample, machine);
tools/perf/builtin-script.c
3100
struct perf_sample *sample,
tools/perf/builtin-script.c
3103
if (machine__process_ksymbol(machine, event, sample) < 0)
tools/perf/builtin-script.c
3106
return print_event(tool, event, sample, machine, sample->pid,
tools/perf/builtin-script.c
3107
sample->tid);
tools/perf/builtin-script.c
3121
struct perf_sample *sample,
tools/perf/builtin-script.c
3124
if (perf_event__process_text_poke(tool, event, sample, machine) < 0)
tools/perf/builtin-script.c
3127
return print_event(tool, event, sample, machine, sample->pid,
tools/perf/builtin-script.c
3128
sample->tid);
tools/perf/builtin-script.c
4428
script.tool.sample = process_sample_event;
tools/perf/builtin-script.c
794
static int perf_sample__fprintf_iregs(struct perf_sample *sample,
tools/perf/builtin-script.c
800
if (!sample->intr_regs)
tools/perf/builtin-script.c
803
return perf_sample__fprintf_regs(perf_sample__intr_regs(sample),
tools/perf/builtin-script.c
807
static int perf_sample__fprintf_uregs(struct perf_sample *sample,
tools/perf/builtin-script.c
813
if (!sample->user_regs)
tools/perf/builtin-script.c
816
return perf_sample__fprintf_regs(perf_sample__user_regs(sample),
tools/perf/builtin-script.c
821
struct perf_sample *sample,
tools/perf/builtin-script.c
844
if (PRINT_FIELD(MACHINE_PID) && sample->machine_pid)
tools/perf/builtin-script.c
845
printed += fprintf(fp, "VM:%5d ", sample->machine_pid);
tools/perf/builtin-script.c
848
if (PRINT_FIELD(VCPU) && sample->machine_pid)
tools/perf/builtin-script.c
849
printed += fprintf(fp, "VCPU:%03d ", sample->vcpu);
tools/perf/builtin-script.c
863
printed += fprintf(fp, "%7d/%-7d ", sample->pid, sample->tid);
tools/perf/builtin-script.c
865
printed += fprintf(fp, "%7d ", sample->pid);
tools/perf/builtin-script.c
867
printed += fprintf(fp, "%7d ", sample->tid);
tools/perf/builtin-script.c
871
printed += fprintf(fp, "%3d ", sample->cpu);
tools/perf/builtin-script.c
873
printed += fprintf(fp, "[%03d] ", sample->cpu);
tools/perf/builtin-script.c
880
(sample->misc & PERF_RECORD_MISC_##m) == PERF_RECORD_MISC_##m
tools/perf/builtin-script.c
907
if (sample->misc & PERF_RECORD_MISC_SWITCH_OUT_PREEMPT)
tools/perf/builtin-script.c
921
tod_scnprintf(script, tstr, sizeof(tstr), sample->time);
tools/perf/builtin-script.c
926
u64 t = sample->time;
tools/perf/builtin-script.c
929
initial_time = sample->time;
tools/perf/builtin-script.c
930
t = sample->time - initial_time;
tools/perf/builtin-script.c
933
t = sample->time - previous_time;
tools/perf/builtin-script.c
937
previous_time = sample->time;
tools/perf/builtin-script.c
981
static int perf_sample__fprintf_brstack(struct perf_sample *sample,
tools/perf/builtin-script.c
985
struct branch_stack *br = sample->branch_stack;
tools/perf/builtin-script.c
986
struct branch_entry *entries = perf_sample__branch_entries(sample);
tools/perf/builtin-stat.c
247
struct perf_sample *sample __maybe_unused,
tools/perf/builtin-timechart.c
1000
sample->time, fd);
tools/perf/builtin-timechart.c
1005
struct perf_sample *sample,
tools/perf/builtin-timechart.c
1008
long ret = perf_sample__intval(sample, "ret");
tools/perf/builtin-timechart.c
1009
return pid_end_io_sample(tchart, sample->tid, IOTYPE_POLL,
tools/perf/builtin-timechart.c
1010
sample->time, ret);
tools/perf/builtin-timechart.c
1159
struct cpu_sample *sample;
tools/perf/builtin-timechart.c
1164
sample = c->samples;
tools/perf/builtin-timechart.c
1165
while (sample) {
tools/perf/builtin-timechart.c
1166
if (sample->type == TYPE_RUNNING) {
tools/perf/builtin-timechart.c
1167
svg_process(sample->cpu,
tools/perf/builtin-timechart.c
1168
sample->start_time,
tools/perf/builtin-timechart.c
1169
sample->end_time,
tools/perf/builtin-timechart.c
1172
sample->backtrace);
tools/perf/builtin-timechart.c
1175
sample = sample->next;
tools/perf/builtin-timechart.c
1190
struct io_sample *sample;
tools/perf/builtin-timechart.c
1204
for (sample = c->io_samples; sample; sample = sample->next) {
tools/perf/builtin-timechart.c
1205
double h = (double)sample->bytes / c->max_bytes;
tools/perf/builtin-timechart.c
1208
sample->err == -EAGAIN)
tools/perf/builtin-timechart.c
1211
if (sample->err)
tools/perf/builtin-timechart.c
1214
if (sample->type == IOTYPE_SYNC)
tools/perf/builtin-timechart.c
1216
sample->start_time,
tools/perf/builtin-timechart.c
1217
sample->end_time,
tools/perf/builtin-timechart.c
1219
sample->err ? "error" : "sync",
tools/perf/builtin-timechart.c
1220
sample->fd,
tools/perf/builtin-timechart.c
1221
sample->err,
tools/perf/builtin-timechart.c
1222
sample->merges);
tools/perf/builtin-timechart.c
1223
else if (sample->type == IOTYPE_POLL)
tools/perf/builtin-timechart.c
1225
sample->start_time,
tools/perf/builtin-timechart.c
1226
sample->end_time,
tools/perf/builtin-timechart.c
1228
sample->err ? "error" : "poll",
tools/perf/builtin-timechart.c
1229
sample->fd,
tools/perf/builtin-timechart.c
1230
sample->err,
tools/perf/builtin-timechart.c
1231
sample->merges);
tools/perf/builtin-timechart.c
1232
else if (sample->type == IOTYPE_READ)
tools/perf/builtin-timechart.c
1234
sample->start_time,
tools/perf/builtin-timechart.c
1235
sample->end_time,
tools/perf/builtin-timechart.c
1237
sample->err ? "error" : "disk",
tools/perf/builtin-timechart.c
1238
sample->fd,
tools/perf/builtin-timechart.c
1239
sample->err,
tools/perf/builtin-timechart.c
1240
sample->merges);
tools/perf/builtin-timechart.c
1241
else if (sample->type == IOTYPE_WRITE)
tools/perf/builtin-timechart.c
1243
sample->start_time,
tools/perf/builtin-timechart.c
1244
sample->end_time,
tools/perf/builtin-timechart.c
1246
sample->err ? "error" : "disk",
tools/perf/builtin-timechart.c
1247
sample->fd,
tools/perf/builtin-timechart.c
1248
sample->err,
tools/perf/builtin-timechart.c
1249
sample->merges);
tools/perf/builtin-timechart.c
1250
else if (sample->type == IOTYPE_RX)
tools/perf/builtin-timechart.c
1252
sample->start_time,
tools/perf/builtin-timechart.c
1253
sample->end_time,
tools/perf/builtin-timechart.c
1255
sample->err ? "error" : "net",
tools/perf/builtin-timechart.c
1256
sample->fd,
tools/perf/builtin-timechart.c
1257
sample->err,
tools/perf/builtin-timechart.c
1258
sample->merges);
tools/perf/builtin-timechart.c
1259
else if (sample->type == IOTYPE_TX)
tools/perf/builtin-timechart.c
1261
sample->start_time,
tools/perf/builtin-timechart.c
1262
sample->end_time,
tools/perf/builtin-timechart.c
1264
sample->err ? "error" : "net",
tools/perf/builtin-timechart.c
1265
sample->fd,
tools/perf/builtin-timechart.c
1266
sample->err,
tools/perf/builtin-timechart.c
1267
sample->merges);
tools/perf/builtin-timechart.c
1301
struct cpu_sample *sample;
tools/perf/builtin-timechart.c
1317
sample = c->samples;
tools/perf/builtin-timechart.c
1318
while (sample) {
tools/perf/builtin-timechart.c
1319
if (sample->type == TYPE_RUNNING)
tools/perf/builtin-timechart.c
1320
svg_running(Y, sample->cpu,
tools/perf/builtin-timechart.c
1321
sample->start_time,
tools/perf/builtin-timechart.c
1322
sample->end_time,
tools/perf/builtin-timechart.c
1323
sample->backtrace);
tools/perf/builtin-timechart.c
1324
if (sample->type == TYPE_BLOCKED)
tools/perf/builtin-timechart.c
1325
svg_blocked(Y, sample->cpu,
tools/perf/builtin-timechart.c
1326
sample->start_time,
tools/perf/builtin-timechart.c
1327
sample->end_time,
tools/perf/builtin-timechart.c
1328
sample->backtrace);
tools/perf/builtin-timechart.c
1329
if (sample->type == TYPE_WAITING)
tools/perf/builtin-timechart.c
1330
svg_waiting(Y, sample->cpu,
tools/perf/builtin-timechart.c
1331
sample->start_time,
tools/perf/builtin-timechart.c
1332
sample->end_time,
tools/perf/builtin-timechart.c
1333
sample->backtrace);
tools/perf/builtin-timechart.c
1334
sample = sample->next;
tools/perf/builtin-timechart.c
1660
tchart->tool.sample = process_sample_event;
tools/perf/builtin-timechart.c
286
struct cpu_sample *sample;
tools/perf/builtin-timechart.c
295
sample = zalloc(sizeof(*sample));
tools/perf/builtin-timechart.c
296
assert(sample != NULL);
tools/perf/builtin-timechart.c
297
sample->start_time = start;
tools/perf/builtin-timechart.c
298
sample->end_time = end;
tools/perf/builtin-timechart.c
299
sample->type = type;
tools/perf/builtin-timechart.c
300
sample->next = c->samples;
tools/perf/builtin-timechart.c
301
sample->cpu = cpu;
tools/perf/builtin-timechart.c
302
sample->backtrace = backtrace ? strdup(backtrace) : NULL;
tools/perf/builtin-timechart.c
303
c->samples = sample;
tools/perf/builtin-timechart.c
305
if (sample->type == TYPE_RUNNING && end > start && start > 0) {
tools/perf/builtin-timechart.c
325
struct perf_sample *sample __maybe_unused,
tools/perf/builtin-timechart.c
335
struct perf_sample *sample __maybe_unused,
tools/perf/builtin-timechart.c
345
struct perf_sample *sample __maybe_unused,
tools/perf/builtin-timechart.c
497
struct perf_sample *sample,
tools/perf/builtin-timechart.c
505
struct ip_callchain *chain = sample->callchain;
tools/perf/builtin-timechart.c
518
if (machine__resolve(machine, &al, sample) < 0) {
tools/perf/builtin-timechart.c
521
sample->file_offset);
tools/perf/builtin-timechart.c
577
struct perf_sample *sample,
tools/perf/builtin-timechart.c
582
struct perf_sample *sample,
tools/perf/builtin-timechart.c
586
struct evsel *evsel = sample->evsel;
tools/perf/builtin-timechart.c
590
if (!tchart->first_time || tchart->first_time > sample->time)
tools/perf/builtin-timechart.c
591
tchart->first_time = sample->time;
tools/perf/builtin-timechart.c
592
if (tchart->last_time < sample->time)
tools/perf/builtin-timechart.c
593
tchart->last_time = sample->time;
tools/perf/builtin-timechart.c
598
char *backtrace = cat_backtrace(event, sample, machine);
tools/perf/builtin-timechart.c
600
ret = f(tchart, sample, backtrace);
tools/perf/builtin-timechart.c
609
struct perf_sample *sample,
tools/perf/builtin-timechart.c
612
u32 state = perf_sample__intval(sample, "state");
tools/perf/builtin-timechart.c
613
u32 cpu_id = perf_sample__intval(sample, "cpu_id");
tools/perf/builtin-timechart.c
618
sample->file_offset, cpu_id);
tools/perf/builtin-timechart.c
622
c_state_end(tchart, cpu_id, sample->time);
tools/perf/builtin-timechart.c
624
c_state_start(cpu_id, sample->time, state);
tools/perf/builtin-timechart.c
630
struct perf_sample *sample,
tools/perf/builtin-timechart.c
633
u32 state = perf_sample__intval(sample, "state");
tools/perf/builtin-timechart.c
634
u32 cpu_id = perf_sample__intval(sample, "cpu_id");
tools/perf/builtin-timechart.c
639
sample->file_offset, cpu_id);
tools/perf/builtin-timechart.c
642
p_state_change(tchart, cpu_id, sample->time, state);
tools/perf/builtin-timechart.c
648
struct perf_sample *sample,
tools/perf/builtin-timechart.c
651
u8 flags = perf_sample__intval(sample, "common_flags");
tools/perf/builtin-timechart.c
652
int waker = perf_sample__intval(sample, "common_pid");
tools/perf/builtin-timechart.c
653
int wakee = perf_sample__intval(sample, "pid");
tools/perf/builtin-timechart.c
656
if (sample->cpu >= MAX_CPUS) {
tools/perf/builtin-timechart.c
658
sample->file_offset, sample->cpu);
tools/perf/builtin-timechart.c
661
sched_wakeup(tchart, sample->cpu, sample->time, waker, wakee, flags, backtrace);
tools/perf/builtin-timechart.c
667
struct perf_sample *sample,
tools/perf/builtin-timechart.c
670
int prev_pid = perf_sample__intval(sample, "prev_pid");
tools/perf/builtin-timechart.c
671
int next_pid = perf_sample__intval(sample, "next_pid");
tools/perf/builtin-timechart.c
672
u64 prev_state = perf_sample__intval(sample, "prev_state");
tools/perf/builtin-timechart.c
675
if (sample->cpu >= MAX_CPUS) {
tools/perf/builtin-timechart.c
677
sample->file_offset, sample->cpu);
tools/perf/builtin-timechart.c
680
sched_switch(tchart, sample->cpu, sample->time, prev_pid, next_pid,
tools/perf/builtin-timechart.c
688
struct perf_sample *sample,
tools/perf/builtin-timechart.c
691
u64 cpu_id = perf_sample__intval(sample, "cpu_id");
tools/perf/builtin-timechart.c
692
u64 value = perf_sample__intval(sample, "value");
tools/perf/builtin-timechart.c
697
sample->file_offset, (unsigned long long)cpu_id);
tools/perf/builtin-timechart.c
700
c_state_start(cpu_id, sample->time, value);
tools/perf/builtin-timechart.c
706
struct perf_sample *sample,
tools/perf/builtin-timechart.c
710
if (sample->cpu >= MAX_CPUS) {
tools/perf/builtin-timechart.c
712
sample->file_offset, sample->cpu);
tools/perf/builtin-timechart.c
715
c_state_end(tchart, sample->cpu, sample->time);
tools/perf/builtin-timechart.c
721
struct perf_sample *sample,
tools/perf/builtin-timechart.c
724
u64 cpu_id = perf_sample__intval(sample, "cpu_id");
tools/perf/builtin-timechart.c
725
u64 value = perf_sample__intval(sample, "value");
tools/perf/builtin-timechart.c
730
sample->file_offset, (unsigned long long)cpu_id);
tools/perf/builtin-timechart.c
733
p_state_change(tchart, cpu_id, sample->time, value);
tools/perf/builtin-timechart.c
778
struct io_sample *sample;
tools/perf/builtin-timechart.c
800
sample = zalloc(sizeof(*sample));
tools/perf/builtin-timechart.c
801
if (!sample)
tools/perf/builtin-timechart.c
803
sample->start_time = start;
tools/perf/builtin-timechart.c
804
sample->type = type;
tools/perf/builtin-timechart.c
805
sample->fd = fd;
tools/perf/builtin-timechart.c
806
sample->next = c->io_samples;
tools/perf/builtin-timechart.c
807
c->io_samples = sample;
tools/perf/builtin-timechart.c
820
struct io_sample *sample, *prev;
tools/perf/builtin-timechart.c
827
sample = c->io_samples;
tools/perf/builtin-timechart.c
829
if (!sample) /* skip partially captured events */
tools/perf/builtin-timechart.c
832
if (sample->end_time) {
tools/perf/builtin-timechart.c
838
if (sample->type != type) {
tools/perf/builtin-timechart.c
843
sample->end_time = end;
tools/perf/builtin-timechart.c
844
prev = sample->next;
tools/perf/builtin-timechart.c
848
if (sample->end_time - sample->start_time < tchart->min_time)
tools/perf/builtin-timechart.c
849
sample->end_time = sample->start_time + tchart->min_time;
tools/perf/builtin-timechart.c
850
if (prev && sample->start_time < prev->end_time) {
tools/perf/builtin-timechart.c
852
sample->start_time = prev->end_time;
tools/perf/builtin-timechart.c
854
prev->end_time = sample->start_time;
tools/perf/builtin-timechart.c
858
sample->err = ret;
tools/perf/builtin-timechart.c
867
sample->bytes = ret;
tools/perf/builtin-timechart.c
872
prev->type == sample->type &&
tools/perf/builtin-timechart.c
873
prev->err == sample->err &&
tools/perf/builtin-timechart.c
874
prev->fd == sample->fd &&
tools/perf/builtin-timechart.c
875
prev->end_time + tchart->merge_dist >= sample->start_time) {
tools/perf/builtin-timechart.c
877
sample->bytes += prev->bytes;
tools/perf/builtin-timechart.c
878
sample->merges += prev->merges + 1;
tools/perf/builtin-timechart.c
880
sample->start_time = prev->start_time;
tools/perf/builtin-timechart.c
881
sample->next = prev->next;
tools/perf/builtin-timechart.c
884
if (!sample->err && sample->bytes > c->max_bytes)
tools/perf/builtin-timechart.c
885
c->max_bytes = sample->bytes;
tools/perf/builtin-timechart.c
895
struct perf_sample *sample,
tools/perf/builtin-timechart.c
898
long fd = perf_sample__intval(sample, "fd");
tools/perf/builtin-timechart.c
899
return pid_begin_io_sample(tchart, sample->tid, IOTYPE_READ,
tools/perf/builtin-timechart.c
900
sample->time, fd);
tools/perf/builtin-timechart.c
905
struct perf_sample *sample,
tools/perf/builtin-timechart.c
908
long ret = perf_sample__intval(sample, "ret");
tools/perf/builtin-timechart.c
909
return pid_end_io_sample(tchart, sample->tid, IOTYPE_READ,
tools/perf/builtin-timechart.c
910
sample->time, ret);
tools/perf/builtin-timechart.c
915
struct perf_sample *sample,
tools/perf/builtin-timechart.c
918
long fd = perf_sample__intval(sample, "fd");
tools/perf/builtin-timechart.c
919
return pid_begin_io_sample(tchart, sample->tid, IOTYPE_WRITE,
tools/perf/builtin-timechart.c
920
sample->time, fd);
tools/perf/builtin-timechart.c
925
struct perf_sample *sample,
tools/perf/builtin-timechart.c
928
long ret = perf_sample__intval(sample, "ret");
tools/perf/builtin-timechart.c
929
return pid_end_io_sample(tchart, sample->tid, IOTYPE_WRITE,
tools/perf/builtin-timechart.c
930
sample->time, ret);
tools/perf/builtin-timechart.c
935
struct perf_sample *sample,
tools/perf/builtin-timechart.c
938
long fd = perf_sample__intval(sample, "fd");
tools/perf/builtin-timechart.c
939
return pid_begin_io_sample(tchart, sample->tid, IOTYPE_SYNC,
tools/perf/builtin-timechart.c
940
sample->time, fd);
tools/perf/builtin-timechart.c
945
struct perf_sample *sample,
tools/perf/builtin-timechart.c
948
long ret = perf_sample__intval(sample, "ret");
tools/perf/builtin-timechart.c
949
return pid_end_io_sample(tchart, sample->tid, IOTYPE_SYNC,
tools/perf/builtin-timechart.c
950
sample->time, ret);
tools/perf/builtin-timechart.c
955
struct perf_sample *sample,
tools/perf/builtin-timechart.c
958
long fd = perf_sample__intval(sample, "fd");
tools/perf/builtin-timechart.c
959
return pid_begin_io_sample(tchart, sample->tid, IOTYPE_TX,
tools/perf/builtin-timechart.c
960
sample->time, fd);
tools/perf/builtin-timechart.c
965
struct perf_sample *sample,
tools/perf/builtin-timechart.c
968
long ret = perf_sample__intval(sample, "ret");
tools/perf/builtin-timechart.c
969
return pid_end_io_sample(tchart, sample->tid, IOTYPE_TX,
tools/perf/builtin-timechart.c
970
sample->time, ret);
tools/perf/builtin-timechart.c
975
struct perf_sample *sample,
tools/perf/builtin-timechart.c
978
long fd = perf_sample__intval(sample, "fd");
tools/perf/builtin-timechart.c
979
return pid_begin_io_sample(tchart, sample->tid, IOTYPE_RX,
tools/perf/builtin-timechart.c
980
sample->time, fd);
tools/perf/builtin-timechart.c
985
struct perf_sample *sample,
tools/perf/builtin-timechart.c
988
long ret = perf_sample__intval(sample, "ret");
tools/perf/builtin-timechart.c
989
return pid_end_io_sample(tchart, sample->tid, IOTYPE_RX,
tools/perf/builtin-timechart.c
990
sample->time, ret);
tools/perf/builtin-timechart.c
995
struct perf_sample *sample,
tools/perf/builtin-timechart.c
998
long fd = perf_sample__intval(sample, "fd");
tools/perf/builtin-timechart.c
999
return pid_begin_io_sample(tchart, sample->tid, IOTYPE_POLL,
tools/perf/builtin-top.c
1150
struct perf_sample sample;
tools/perf/builtin-top.c
1161
perf_sample__init(&sample, /*all=*/false);
tools/perf/builtin-top.c
1162
ret = evlist__parse_sample(evlist, event, &sample);
tools/perf/builtin-top.c
1168
evsel = sample.evsel;
tools/perf/builtin-top.c
1170
evsel = evlist__id2evsel(session->evlist, sample.id);
tools/perf/builtin-top.c
1181
switch (sample.cpumode) {
tools/perf/builtin-top.c
1197
sample.pid);
tools/perf/builtin-top.c
1215
&sample, machine);
tools/perf/builtin-top.c
1222
machine__process_event(machine, event, &sample);
tools/perf/builtin-top.c
1228
perf_sample__exit(&sample);
tools/perf/builtin-top.c
201
struct perf_sample *sample,
tools/perf/builtin-top.c
219
err = hist_entry__inc_addr_samples(he, sample, ip);
tools/perf/builtin-top.c
737
perf_top__record_precise_ip(top, iter->he, iter->sample, al->addr);
tools/perf/builtin-top.c
739
hist__account_cycles(iter->sample->branch_stack, al, iter->sample,
tools/perf/builtin-top.c
747
struct perf_sample *sample,
tools/perf/builtin-top.c
759
if (!intlist__has_entry(seen, sample->pid)) {
tools/perf/builtin-top.c
761
sample->pid);
tools/perf/builtin-top.c
762
intlist__add(seen, sample->pid);
tools/perf/builtin-top.c
777
if (machine__resolve(machine, &al, sample) < 0)
tools/perf/builtin-top.c
833
struct hists *hists = evsel__hists(sample->evsel);
tools/perf/builtin-top.c
835
.sample = sample,
tools/perf/builtin-trace.c
1953
union perf_event *event, struct perf_sample *sample)
tools/perf/builtin-trace.c
1961
ret = machine__process_lost_event(machine, event, sample);
tools/perf/builtin-trace.c
1964
ret = machine__process_event(machine, event, sample);
tools/perf/builtin-trace.c
1973
struct perf_sample *sample,
tools/perf/builtin-trace.c
1977
return trace__process_event(trace, machine, event, sample);
tools/perf/builtin-trace.c
2602
struct perf_sample *sample);
tools/perf/builtin-trace.c
2654
int id, struct perf_sample *sample, long err,
tools/perf/builtin-trace.c
266
u64 (*integer)(struct tp_field *field, struct perf_sample *sample);
tools/perf/builtin-trace.c
267
void *(*pointer)(struct tp_field *field, struct perf_sample *sample);
tools/perf/builtin-trace.c
2679
if (ttrace->entry_time && sample->time > ttrace->entry_time)
tools/perf/builtin-trace.c
2680
duration = sample->time - ttrace->entry_time;
tools/perf/builtin-trace.c
272
static u64 tp_field__u##bits(struct tp_field *field, struct perf_sample *sample) \
tools/perf/builtin-trace.c
2741
static int trace__fprintf_sample(struct trace *trace, struct perf_sample *sample,
tools/perf/builtin-trace.c
2747
double ts = (double)sample->time / NSEC_PER_MSEC;
tools/perf/builtin-trace.c
275
memcpy(&value, sample->raw_data + field->offset, sizeof(value)); \
tools/perf/builtin-trace.c
2750
evsel__name(sample->evsel), ts,
tools/perf/builtin-trace.c
2752
sample->pid, sample->tid, sample->cpu);
tools/perf/builtin-trace.c
2758
static void *syscall__augmented_args(struct syscall *sc, struct perf_sample *sample, int *augmented_args_size, int raw_augmented_args_size)
tools/perf/builtin-trace.c
2776
*augmented_args_size = sample->raw_size - args_size;
tools/perf/builtin-trace.c
2790
memcpy(argbuf, sample->raw_data + args_size, *augmented_args_size);
tools/perf/builtin-trace.c
2799
struct perf_sample *sample)
tools/perf/builtin-trace.c
2801
struct evsel *evsel = sample->evsel;
tools/perf/builtin-trace.c
2806
int id = perf_evsel__sc_tp_uint(id, sample), err = -1;
tools/perf/builtin-trace.c
2812
thread = machine__findnew_thread(trace->host, sample->pid, sample->tid);
tools/perf/builtin-trace.c
2821
trace__fprintf_sample(trace, sample, thread);
tools/perf/builtin-trace.c
2823
args = perf_evsel__sc_tp_ptr(args, sample);
tools/perf/builtin-trace.c
2844
augmented_args = syscall__augmented_args(sc, sample, &augmented_args_size, trace->raw_augmented_syscalls_args_size);
tools/perf/builtin-trace.c
2845
ttrace->entry_time = sample->time;
tools/perf/builtin-trace.c
2846
ttrace->entry_cpu = sample->cpu;
tools/perf/builtin-trace.c
285
static u64 tp_field__swapped_u##bits(struct tp_field *field, struct perf_sample *sample) \
tools/perf/builtin-trace.c
2859
sample->cpu, trace->output);
tools/perf/builtin-trace.c
288
memcpy(&value, sample->raw_data + field->offset, sizeof(value)); \
tools/perf/builtin-trace.c
2881
static int trace__fprintf_sys_enter(struct trace *trace, struct perf_sample *sample)
tools/perf/builtin-trace.c
2885
int id = perf_evsel__sc_tp_uint(id, sample), err = -1;
tools/perf/builtin-trace.c
2893
thread = machine__findnew_thread(trace->host, sample->pid, sample->tid);
tools/perf/builtin-trace.c
2895
sc = trace__syscall_info(trace, sample->evsel, e_machine, id);
tools/perf/builtin-trace.c
2906
args = perf_evsel__sc_tp_ptr(args, sample);
tools/perf/builtin-trace.c
2907
augmented_args = syscall__augmented_args(sc, sample, &augmented_args_size, trace->raw_augmented_syscalls_args_size);
tools/perf/builtin-trace.c
2917
struct perf_sample *sample,
tools/perf/builtin-trace.c
2920
struct evsel *evsel = sample->evsel;
tools/perf/builtin-trace.c
2928
if (machine__resolve(trace->host, &al, sample) < 0)
tools/perf/builtin-trace.c
2931
err = thread__resolve_callchain(al.thread, cursor, sample, NULL, NULL, max_stack);
tools/perf/builtin-trace.c
2937
static int trace__fprintf_callchain(struct trace *trace, struct perf_sample *sample)
tools/perf/builtin-trace.c
2944
return sample__fprintf_callchain(sample, 38, print_opts, get_tls_callchain_cursor(), symbol_conf.bt_stop_list, trace->output);
tools/perf/builtin-trace.c
2949
struct perf_sample *sample)
tools/perf/builtin-trace.c
2951
struct evsel *evsel = sample->evsel;
tools/perf/builtin-trace.c
2956
int id = perf_evsel__sc_tp_uint(id, sample), err = -1, callchain_ret = 0, printed = 0;
tools/perf/builtin-trace.c
2961
thread = machine__findnew_thread(trace->host, sample->pid, sample->tid);
tools/perf/builtin-trace.c
2970
trace__fprintf_sample(trace, sample, thread);
tools/perf/builtin-trace.c
2972
ret = perf_evsel__sc_tp_uint(ret, sample);
tools/perf/builtin-trace.c
2975
thread__update_stats(thread, ttrace, id, sample, ret, trace);
tools/perf/builtin-trace.c
2983
if (ttrace->entry_time && sample->time >= ttrace->entry_time) {
tools/perf/builtin-trace.c
2984
duration = sample->time - ttrace->entry_time;
tools/perf/builtin-trace.c
2991
if (sample->callchain) {
tools/perf/builtin-trace.c
2994
callchain_ret = trace__resolve_callchain(trace, sample, cursor);
tools/perf/builtin-trace.c
3007
sample->cpu, trace->output);
tools/perf/builtin-trace.c
3076
trace__fprintf_callchain(trace, sample);
tools/perf/builtin-trace.c
3089
struct perf_sample *sample)
tools/perf/builtin-trace.c
3091
struct thread *thread = machine__findnew_thread(trace->host, sample->pid, sample->tid);
tools/perf/builtin-trace.c
3096
const char *filename = perf_sample__strval(sample, "pathname");
tools/perf/builtin-trace.c
3150
struct perf_sample *sample)
tools/perf/builtin-trace.c
3152
u64 runtime = perf_sample__intval(sample, "runtime");
tools/perf/builtin-trace.c
3155
sample->pid,
tools/perf/builtin-trace.c
3156
sample->tid);
tools/perf/builtin-trace.c
3170
sample->evsel->name,
tools/perf/builtin-trace.c
3171
perf_sample__strval(sample, "comm"),
tools/perf/builtin-trace.c
3172
(pid_t)perf_sample__intval(sample, "pid"),
tools/perf/builtin-trace.c
3174
perf_sample__intval(sample, "vruntime"));
tools/perf/builtin-trace.c
3203
struct perf_sample *sample)
tools/perf/builtin-trace.c
3205
binary__fprintf(sample->raw_data, sample->raw_size, 8,
tools/perf/builtin-trace.c
3210
static size_t trace__fprintf_tp_fields(struct trace *trace, struct perf_sample *sample,
tools/perf/builtin-trace.c
3213
struct evsel *evsel = sample->evsel;
tools/perf/builtin-trace.c
3244
offset = format_field__intval(field, sample, evsel->needs_swap);
tools/perf/builtin-trace.c
325
static void *tp_field__ptr(struct tp_field *field, struct perf_sample *sample)
tools/perf/builtin-trace.c
3251
val = (uintptr_t)(sample->raw_data + offset);
tools/perf/builtin-trace.c
3253
val = format_field__intval(field, sample, evsel->needs_swap);
tools/perf/builtin-trace.c
327
return sample->raw_data + field->offset;
tools/perf/builtin-trace.c
3304
struct perf_sample *sample)
tools/perf/builtin-trace.c
3306
struct evsel *evsel = sample->evsel;
tools/perf/builtin-trace.c
3313
thread = machine__findnew_thread(trace->host, sample->pid, sample->tid);
tools/perf/builtin-trace.c
3315
if (sample->callchain) {
tools/perf/builtin-trace.c
3318
callchain_ret = trace__resolve_callchain(trace, sample, cursor);
tools/perf/builtin-trace.c
3327
trace__fprintf_tstamp(trace, sample->time, trace->output);
tools/perf/builtin-trace.c
3330
trace__fprintf_cpu(sample->cpu, trace->output);
tools/perf/builtin-trace.c
3339
int id = perf_evsel__sc_tp_uint(id, sample);
tools/perf/builtin-trace.c
3347
trace__fprintf_sys_enter(trace, sample);
tools/perf/builtin-trace.c
3362
bpf_output__fprintf(trace, sample);
tools/perf/builtin-trace.c
3367
trace__fprintf_sys_enter(trace, sample))) {
tools/perf/builtin-trace.c
3369
event_format__fprintf(tp_format, sample->cpu,
tools/perf/builtin-trace.c
3370
sample->raw_data, sample->raw_size,
tools/perf/builtin-trace.c
3373
trace__fprintf_tp_fields(trace, sample, thread, NULL, 0);
tools/perf/builtin-trace.c
3382
trace__fprintf_callchain(trace, sample);
tools/perf/builtin-trace.c
3397
static void print_location(FILE *f, struct perf_sample *sample,
tools/perf/builtin-trace.c
3411
fprintf(f, "0x%" PRIx64, sample->addr);
tools/perf/builtin-trace.c
3416
struct perf_sample *sample)
tools/perf/builtin-trace.c
3426
thread = machine__findnew_thread(trace->host, sample->pid, sample->tid);
tools/perf/builtin-trace.c
3428
if (sample->callchain) {
tools/perf/builtin-trace.c
3431
callchain_ret = trace__resolve_callchain(trace, sample, cursor);
tools/perf/builtin-trace.c
3443
if (sample->evsel->core.attr.config == PERF_COUNT_SW_PAGE_FAULTS_MAJ) {
tools/perf/builtin-trace.c
3454
thread__find_symbol(thread, sample->cpumode, sample->ip, &al);
tools/perf/builtin-trace.c
3456
trace__fprintf_entry_head(trace, thread, 0, true, sample->time,
tools/perf/builtin-trace.c
3457
sample->cpu, trace->output);
tools/perf/builtin-trace.c
3460
sample->evsel->core.attr.config == PERF_COUNT_SW_PAGE_FAULTS_MAJ ?
tools/perf/builtin-trace.c
3463
print_location(trace->output, sample, &al, false, true);
tools/perf/builtin-trace.c
3467
thread__find_symbol(thread, sample->cpumode, sample->addr, &al);
tools/perf/builtin-trace.c
3470
thread__find_symbol(thread, sample->cpumode, sample->addr, &al);
tools/perf/builtin-trace.c
3478
print_location(trace->output, sample, &al, true, false);
tools/perf/builtin-trace.c
3483
trace__fprintf_callchain(trace, sample);
tools/perf/builtin-trace.c
3486
evsel__name(sample->evsel));
tools/perf/builtin-trace.c
3498
struct perf_sample *sample)
tools/perf/builtin-trace.c
3509
(sample->evsel->core.attr.sample_type & PERF_SAMPLE_TIME))
tools/perf/builtin-trace.c
3510
trace->base_time = sample->time;
tools/perf/builtin-trace.c
3515
struct perf_sample *sample,
tools/perf/builtin-trace.c
3519
struct evsel *evsel = sample->evsel;
tools/perf/builtin-trace.c
3525
thread = machine__findnew_thread(trace->host, sample->pid, sample->tid);
tools/perf/builtin-trace.c
3529
trace__set_base_time(trace, sample);
tools/perf/builtin-trace.c
3533
handler(trace, event, sample);
tools/perf/builtin-trace.c
3672
static void trace__handle_event(struct trace *trace, union perf_event *event, struct perf_sample *sample)
tools/perf/builtin-trace.c
3677
trace__process_event(trace, trace->host, event, sample);
tools/perf/builtin-trace.c
3681
if (sample->evsel == NULL)
tools/perf/builtin-trace.c
3682
sample->evsel = evlist__id2evsel(trace->evlist, sample->id);
tools/perf/builtin-trace.c
3684
if (sample->evsel == NULL) {
tools/perf/builtin-trace.c
3685
fprintf(trace->output, "Unknown tp ID %" PRIu64 ", skipping...\n", sample->id);
tools/perf/builtin-trace.c
3689
if (evswitch__discard(&trace->evswitch, sample->evsel))
tools/perf/builtin-trace.c
3692
trace__set_base_time(trace, sample);
tools/perf/builtin-trace.c
3694
if (sample->evsel->core.attr.type == PERF_TYPE_TRACEPOINT &&
tools/perf/builtin-trace.c
3695
sample->raw_data == NULL) {
tools/perf/builtin-trace.c
3697
evsel__name(sample->evsel), sample->tid,
tools/perf/builtin-trace.c
3698
sample->cpu, sample->raw_size);
tools/perf/builtin-trace.c
3700
tracepoint_handler handler = sample->evsel->handler;
tools/perf/builtin-trace.c
3702
handler(trace, event, sample);
tools/perf/builtin-trace.c
4229
struct perf_sample sample;
tools/perf/builtin-trace.c
4232
perf_sample__init(&sample, /*all=*/false);
tools/perf/builtin-trace.c
4233
err = evlist__parse_sample(evlist, event, &sample);
tools/perf/builtin-trace.c
4237
trace__handle_event(trace, event, &sample);
tools/perf/builtin-trace.c
4239
perf_sample__exit(&sample);
tools/perf/builtin-trace.c
4758
trace->tool.sample = trace__process_sample;
tools/perf/builtin-trace.c
550
#define perf_evsel__sc_tp_uint(name, sample) \
tools/perf/builtin-trace.c
551
({ struct syscall_tp *fields = __evsel__syscall_tp(sample->evsel); \
tools/perf/builtin-trace.c
552
fields->name.integer(&fields->name, sample); })
tools/perf/builtin-trace.c
554
#define perf_evsel__sc_tp_ptr(name, sample) \
tools/perf/builtin-trace.c
555
({ struct syscall_tp *fields = __evsel__syscall_tp(sample->evsel); \
tools/perf/builtin-trace.c
556
fields->name.pointer(&fields->name, sample); })
tools/perf/dlfilters/dlfilter-show-cycles.c
106
int filter_event(void *data, const struct perf_dlfilter_sample *sample, void *ctx)
tools/perf/dlfilters/dlfilter-show-cycles.c
108
__s32 cpu = sample->cpu;
tools/perf/dlfilters/dlfilter-show-cycles.c
109
__s32 tid = sample->tid;
tools/perf/dlfilters/dlfilter-show-cycles.c
112
pos = event_entry(sample->event);
tools/perf/dlfilters/dlfilter-show-cycles.c
80
int filter_event_early(void *data, const struct perf_dlfilter_sample *sample, void *ctx)
tools/perf/dlfilters/dlfilter-show-cycles.c
82
__s32 cpu = sample->cpu;
tools/perf/dlfilters/dlfilter-show-cycles.c
83
__s32 tid = sample->tid;
tools/perf/dlfilters/dlfilter-show-cycles.c
86
if (!sample->cyc_cnt)
tools/perf/dlfilters/dlfilter-show-cycles.c
89
pos = event_entry(sample->event);
tools/perf/dlfilters/dlfilter-show-cycles.c
92
cycles[cpu][pos] += sample->cyc_cnt;
tools/perf/dlfilters/dlfilter-show-cycles.c
94
add_entry(tid, pos, sample->cyc_cnt);
tools/perf/dlfilters/dlfilter-test-api-v0.c
181
if (sample->x != expected.x) \
tools/perf/dlfilters/dlfilter-test-api-v0.c
185
static int check_sample(struct filter_data *d, const struct perf_dlfilter_sample *sample)
tools/perf/dlfilters/dlfilter-test-api-v0.c
202
CHECK(sample->size >= sizeof(struct perf_dlfilter_sample));
tools/perf/dlfilters/dlfilter-test-api-v0.c
217
CHECK(!sample->raw_data);
tools/perf/dlfilters/dlfilter-test-api-v0.c
219
CHECK(!sample->brstack);
tools/perf/dlfilters/dlfilter-test-api-v0.c
221
CHECK(!sample->raw_callchain);
tools/perf/dlfilters/dlfilter-test-api-v0.c
224
CHECK(!strncmp(sample->event, EVENT_NAME, strlen(EVENT_NAME)));
tools/perf/dlfilters/dlfilter-test-api-v0.c
257
static int check_address_al(void *ctx, const struct perf_dlfilter_sample *sample)
tools/perf/dlfilters/dlfilter-test-api-v0.c
267
if (perf_dlfilter_fns.resolve_address(ctx, sample->ip, &address_al))
tools/perf/dlfilters/dlfilter-test-api-v0.c
292
static int check_object_code(void *ctx, const struct perf_dlfilter_sample *sample)
tools/perf/dlfilters/dlfilter-test-api-v0.c
296
CHECK(perf_dlfilter_fns.object_code(ctx, sample->ip, buf, sizeof(buf)) > 0);
tools/perf/dlfilters/dlfilter-test-api-v0.c
301
static int do_checks(void *data, const struct perf_dlfilter_sample *sample, void *ctx, bool early)
tools/perf/dlfilters/dlfilter-test-api-v0.c
317
if (check_sample(data, sample))
tools/perf/dlfilters/dlfilter-test-api-v0.c
326
if (check_al(ctx) || check_addr_al(ctx) || check_address_al(ctx, sample) ||
tools/perf/dlfilters/dlfilter-test-api-v0.c
327
check_object_code(ctx, sample))
tools/perf/dlfilters/dlfilter-test-api-v0.c
336
int filter_event_early(void *data, const struct perf_dlfilter_sample *sample, void *ctx)
tools/perf/dlfilters/dlfilter-test-api-v0.c
340
return do_checks(data, sample, ctx, true);
tools/perf/dlfilters/dlfilter-test-api-v0.c
343
int filter_event(void *data, const struct perf_dlfilter_sample *sample, void *ctx)
tools/perf/dlfilters/dlfilter-test-api-v0.c
347
return do_checks(data, sample, ctx, false);
tools/perf/dlfilters/dlfilter-test-api-v2.c
196
if (sample->x != expected.x) \
tools/perf/dlfilters/dlfilter-test-api-v2.c
200
static int check_sample(struct filter_data *d, const struct perf_dlfilter_sample *sample)
tools/perf/dlfilters/dlfilter-test-api-v2.c
217
CHECK(sample->size >= sizeof(struct perf_dlfilter_sample));
tools/perf/dlfilters/dlfilter-test-api-v2.c
232
CHECK(!sample->raw_data);
tools/perf/dlfilters/dlfilter-test-api-v2.c
234
CHECK(!sample->brstack);
tools/perf/dlfilters/dlfilter-test-api-v2.c
236
CHECK(!sample->raw_callchain);
tools/perf/dlfilters/dlfilter-test-api-v2.c
239
CHECK(!strncmp(sample->event, EVENT_NAME, strlen(EVENT_NAME)));
tools/perf/dlfilters/dlfilter-test-api-v2.c
272
static int check_address_al(void *ctx, const struct perf_dlfilter_sample *sample)
tools/perf/dlfilters/dlfilter-test-api-v2.c
282
if (perf_dlfilter_fns.resolve_address(ctx, sample->ip, &address_al))
tools/perf/dlfilters/dlfilter-test-api-v2.c
311
static int check_object_code(void *ctx, const struct perf_dlfilter_sample *sample)
tools/perf/dlfilters/dlfilter-test-api-v2.c
315
CHECK(perf_dlfilter_fns.object_code(ctx, sample->ip, buf, sizeof(buf)) > 0);
tools/perf/dlfilters/dlfilter-test-api-v2.c
320
static int do_checks(void *data, const struct perf_dlfilter_sample *sample, void *ctx, bool early)
tools/perf/dlfilters/dlfilter-test-api-v2.c
336
if (check_sample(data, sample))
tools/perf/dlfilters/dlfilter-test-api-v2.c
345
if (check_al(ctx) || check_addr_al(ctx) || check_address_al(ctx, sample) ||
tools/perf/dlfilters/dlfilter-test-api-v2.c
346
check_object_code(ctx, sample))
tools/perf/dlfilters/dlfilter-test-api-v2.c
355
int filter_event_early(void *data, const struct perf_dlfilter_sample *sample, void *ctx)
tools/perf/dlfilters/dlfilter-test-api-v2.c
359
return do_checks(data, sample, ctx, true);
tools/perf/dlfilters/dlfilter-test-api-v2.c
362
int filter_event(void *data, const struct perf_dlfilter_sample *sample, void *ctx)
tools/perf/dlfilters/dlfilter-test-api-v2.c
366
return do_checks(data, sample, ctx, false);
tools/perf/include/perf/perf_dlfilter.h
151
int filter_event(void *data, const struct perf_dlfilter_sample *sample, void *ctx);
tools/perf/include/perf/perf_dlfilter.h
157
int filter_event_early(void *data, const struct perf_dlfilter_sample *sample, void *ctx);
tools/perf/scripts/python/Perf-Trace-Util/Context.c
101
return _PyBytes_FromStringAndSize(c->sample->insn, c->sample->insn_len);
tools/perf/scripts/python/Perf-Trace-Util/Context.c
93
if (c->sample->ip && !c->sample->insn_len && thread__maps(c->al->thread)) {
tools/perf/scripts/python/Perf-Trace-Util/Context.c
96
perf_sample__fetch_insn(c->sample, c->al->thread, machine);
tools/perf/scripts/python/Perf-Trace-Util/Context.c
98
if (!c->sample->insn_len)
tools/perf/tests/code-reading.c
537
struct perf_sample sample;
tools/perf/tests/code-reading.c
541
perf_sample__init(&sample, /*all=*/false);
tools/perf/tests/code-reading.c
542
ret = evlist__parse_sample(evlist, event, &sample);
tools/perf/tests/code-reading.c
549
thread = machine__findnew_thread(machine, sample.pid, sample.tid);
tools/perf/tests/code-reading.c
556
ret = read_object_code(sample.ip, READLEN, sample.cpumode, thread,
tools/perf/tests/code-reading.c
560
perf_sample__exit(&sample);
tools/perf/tests/cpumap.c
16
struct perf_sample *sample __maybe_unused,
tools/perf/tests/cpumap.c
52
struct perf_sample *sample __maybe_unused,
tools/perf/tests/cpumap.c
78
struct perf_sample *sample __maybe_unused,
tools/perf/tests/dlfilter-test.c
176
struct perf_sample sample = {
tools/perf/tests/dlfilter-test.c
191
event->header.size = perf_event__sample_event_size(&sample, sample_type,
tools/perf/tests/dlfilter-test.c
196
/*branch_sample_type=*/0, &sample);
tools/perf/tests/dlfilter-test.c
200
err = process(&td->tool, event, &sample, td->machine);
tools/perf/tests/dlfilter-test.c
65
struct perf_sample *sample __maybe_unused,
tools/perf/tests/dwarf-unwind.c
100
perf_sample__init(&sample, /*all=*/true);
tools/perf/tests/dwarf-unwind.c
101
if (test__arch_unwind_sample(&sample, thread)) {
tools/perf/tests/dwarf-unwind.c
107
&sample, MAX_STACK, false);
tools/perf/tests/dwarf-unwind.c
117
zfree(&sample.user_stack.data);
tools/perf/tests/dwarf-unwind.c
118
zfree(&sample.user_regs->regs);
tools/perf/tests/dwarf-unwind.c
119
perf_sample__exit(&sample);
tools/perf/tests/dwarf-unwind.c
96
struct perf_sample sample;
tools/perf/tests/event_update.c
18
struct perf_sample *sample __maybe_unused,
tools/perf/tests/event_update.c
31
struct perf_sample *sample __maybe_unused,
tools/perf/tests/event_update.c
49
struct perf_sample *sample __maybe_unused,
tools/perf/tests/event_update.c
63
struct perf_sample *sample __maybe_unused,
tools/perf/tests/hists_common.c
108
struct perf_sample sample = {
tools/perf/tests/hists_common.c
124
machine__process_mmap_event(machine, &fake_mmap_event, &sample);
tools/perf/tests/hists_cumulate.c
100
sample.pid = fake_samples[i].pid;
tools/perf/tests/hists_cumulate.c
101
sample.tid = fake_samples[i].pid;
tools/perf/tests/hists_cumulate.c
102
sample.ip = fake_samples[i].ip;
tools/perf/tests/hists_cumulate.c
103
sample.callchain = (struct ip_callchain *)fake_callchains[i];
tools/perf/tests/hists_cumulate.c
105
if (machine__resolve(machine, &al, &sample) < 0)
tools/perf/tests/hists_cumulate.c
26
static struct sample fake_samples[] = {
tools/perf/tests/hists_cumulate.c
84
struct perf_sample sample = { .evsel = evsel, .period = 1000, };
tools/perf/tests/hists_cumulate.c
90
.sample = &sample,
tools/perf/tests/hists_cumulate.c
99
sample.cpumode = PERF_RECORD_MISC_USER;
tools/perf/tests/hists_filter.c
26
static struct sample fake_samples[] = {
tools/perf/tests/hists_filter.c
54
struct perf_sample sample = { .period = 100, };
tools/perf/tests/hists_filter.c
66
.sample = &sample,
tools/perf/tests/hists_filter.c
72
sample.evsel = evsel;
tools/perf/tests/hists_filter.c
78
sample.cpumode = PERF_RECORD_MISC_USER;
tools/perf/tests/hists_filter.c
79
sample.pid = fake_samples[i].pid;
tools/perf/tests/hists_filter.c
80
sample.tid = fake_samples[i].pid;
tools/perf/tests/hists_filter.c
81
sample.ip = fake_samples[i].ip;
tools/perf/tests/hists_filter.c
83
if (machine__resolve(machine, &al, &sample) < 0)
tools/perf/tests/hists_link.c
106
sample.pid = fake_samples[i][k].pid;
tools/perf/tests/hists_link.c
107
sample.tid = fake_samples[i][k].pid;
tools/perf/tests/hists_link.c
108
sample.ip = fake_samples[i][k].ip;
tools/perf/tests/hists_link.c
109
if (machine__resolve(machine, &al, &sample) < 0)
tools/perf/tests/hists_link.c
113
NULL, NULL, NULL, &sample, true);
tools/perf/tests/hists_link.c
147
static int find_sample(struct sample *samples, size_t nr_samples,
tools/perf/tests/hists_link.c
26
static struct sample fake_common_samples[] = {
tools/perf/tests/hists_link.c
39
static struct sample fake_samples[][5] = {
tools/perf/tests/hists_link.c
71
struct perf_sample sample = { .period = 1, .weight = 1, };
tools/perf/tests/hists_link.c
84
sample.cpumode = PERF_RECORD_MISC_USER;
tools/perf/tests/hists_link.c
85
sample.pid = fake_common_samples[k].pid;
tools/perf/tests/hists_link.c
86
sample.tid = fake_common_samples[k].pid;
tools/perf/tests/hists_link.c
87
sample.ip = fake_common_samples[k].ip;
tools/perf/tests/hists_link.c
89
if (machine__resolve(machine, &al, &sample) < 0)
tools/perf/tests/hists_link.c
93
NULL, NULL, NULL, &sample, true);
tools/perf/tests/hists_output.c
27
static struct sample fake_samples[] = {
tools/perf/tests/hists_output.c
54
struct perf_sample sample = { .evsel = evsel, .period = 100, };
tools/perf/tests/hists_output.c
60
.sample = &sample,
tools/perf/tests/hists_output.c
65
sample.cpumode = PERF_RECORD_MISC_USER;
tools/perf/tests/hists_output.c
66
sample.cpu = fake_samples[i].cpu;
tools/perf/tests/hists_output.c
67
sample.pid = fake_samples[i].pid;
tools/perf/tests/hists_output.c
68
sample.tid = fake_samples[i].pid;
tools/perf/tests/hists_output.c
69
sample.ip = fake_samples[i].ip;
tools/perf/tests/hists_output.c
71
if (machine__resolve(machine, &al, &sample) < 0)
tools/perf/tests/mmap-basic.c
132
struct perf_sample sample;
tools/perf/tests/mmap-basic.c
140
perf_sample__init(&sample, /*all=*/false);
tools/perf/tests/mmap-basic.c
141
err = evlist__parse_sample(evlist, event, &sample);
tools/perf/tests/mmap-basic.c
144
perf_sample__exit(&sample);
tools/perf/tests/mmap-basic.c
149
evsel = sample.evsel;
tools/perf/tests/mmap-basic.c
151
evsel = evlist__id2evsel(evlist, sample.id);
tools/perf/tests/mmap-basic.c
152
perf_sample__exit(&sample);
tools/perf/tests/mmap-basic.c
155
" doesn't map to an evsel\n", sample.id);
tools/perf/tests/openat-syscall-tp-fields.c
104
struct perf_sample sample;
tools/perf/tests/openat-syscall-tp-fields.c
113
perf_sample__init(&sample, /*all=*/false);
tools/perf/tests/openat-syscall-tp-fields.c
114
err = evsel__parse_sample(evsel, event, &sample);
tools/perf/tests/openat-syscall-tp-fields.c
117
perf_sample__exit(&sample);
tools/perf/tests/openat-syscall-tp-fields.c
121
tp_flags = perf_sample__intval(&sample, "flags");
tools/perf/tests/openat-syscall-tp-fields.c
122
perf_sample__exit(&sample);
tools/perf/tests/parse-no-sample-id-all.c
15
struct perf_sample sample;
tools/perf/tests/parse-no-sample-id-all.c
32
perf_sample__init(&sample, /*all=*/false);
tools/perf/tests/parse-no-sample-id-all.c
33
ret = evlist__parse_sample(*pevlist, event, &sample);
tools/perf/tests/parse-no-sample-id-all.c
34
perf_sample__exit(&sample);
tools/perf/tests/perf-record.c
207
err = evlist__parse_sample(evlist, event, &sample);
tools/perf/tests/perf-record.c
216
pr_info("%" PRIu64" %d ", sample.time, sample.cpu);
tools/perf/tests/perf-record.c
220
if (prev_time > sample.time) {
tools/perf/tests/perf-record.c
222
name, prev_time, sample.time);
tools/perf/tests/perf-record.c
226
prev_time = sample.time;
tools/perf/tests/perf-record.c
228
if (sample.cpu != cpu) {
tools/perf/tests/perf-record.c
230
name, cpu, sample.cpu);
tools/perf/tests/perf-record.c
234
if ((pid_t)sample.pid != evlist->workload.pid) {
tools/perf/tests/perf-record.c
236
name, evlist->workload.pid, sample.pid);
tools/perf/tests/perf-record.c
240
if ((pid_t)sample.tid != evlist->workload.pid) {
tools/perf/tests/perf-record.c
242
name, evlist->workload.pid, sample.tid);
tools/perf/tests/perf-record.c
303
perf_sample__exit(&sample);
tools/perf/tests/perf-record.c
357
perf_sample__exit(&sample);
tools/perf/tests/perf-record.c
62
struct perf_sample sample;
tools/perf/tests/perf-record.c
86
perf_sample__init(&sample, /*all=*/false);
tools/perf/tests/perf-time-to-tsc.c
154
struct perf_sample sample;
tools/perf/tests/perf-time-to-tsc.c
156
perf_sample__init(&sample, /*all=*/false);
tools/perf/tests/perf-time-to-tsc.c
164
CHECK__(evsel__parse_sample(evsel, event, &sample));
tools/perf/tests/perf-time-to-tsc.c
165
comm1_time = sample.time;
tools/perf/tests/perf-time-to-tsc.c
169
CHECK__(evsel__parse_sample(evsel, event, &sample));
tools/perf/tests/perf-time-to-tsc.c
170
comm2_time = sample.time;
tools/perf/tests/perf-time-to-tsc.c
174
perf_sample__exit(&sample);
tools/perf/tests/sample-parsing.c
246
struct perf_sample sample = {
tools/perf/tests/sample-parsing.c
305
sample.read.group.nr = 4;
tools/perf/tests/sample-parsing.c
306
sample.read.group.values = values;
tools/perf/tests/sample-parsing.c
308
sample.read.one.value = 0x08789faeb786aa87ULL;
tools/perf/tests/sample-parsing.c
309
sample.read.one.id = 99;
tools/perf/tests/sample-parsing.c
310
sample.read.one.lost = 1;
tools/perf/tests/sample-parsing.c
313
sz = perf_event__sample_event_size(&sample, sample_type, read_format,
tools/perf/tests/sample-parsing.c
328
evsel.core.attr.branch_sample_type, &sample);
tools/perf/tests/sample-parsing.c
355
if (!samples_same(&sample, &sample_out, sample_type, read_format, evsel.needs_swap)) {
tools/perf/tests/sample-parsing.c
371
if (!samples_same(&sample, &sample_out_endian, sample_type, read_format, evsel.needs_swap)) {
tools/perf/tests/stat.c
100
struct perf_sample *sample __maybe_unused,
tools/perf/tests/stat.c
26
struct perf_sample *sample __maybe_unused,
tools/perf/tests/stat.c
69
struct perf_sample *sample __maybe_unused,
tools/perf/tests/sw-clock.c
106
struct perf_sample sample;
tools/perf/tests/sw-clock.c
108
perf_sample__init(&sample, /*all=*/false);
tools/perf/tests/sw-clock.c
112
err = evlist__parse_sample(evlist, event, &sample);
tools/perf/tests/sw-clock.c
115
perf_sample__exit(&sample);
tools/perf/tests/sw-clock.c
119
total_periods += sample.period;
tools/perf/tests/sw-clock.c
123
perf_sample__exit(&sample);
tools/perf/tests/switch-tracking.c
129
struct perf_sample sample;
tools/perf/tests/switch-tracking.c
134
perf_sample__init(&sample, /*all=*/false);
tools/perf/tests/switch-tracking.c
135
if (evlist__parse_sample(evlist, event, &sample)) {
tools/perf/tests/switch-tracking.c
141
evsel = sample.evsel;
tools/perf/tests/switch-tracking.c
143
evsel = evlist__id2evsel(evlist, sample.id);
tools/perf/tests/switch-tracking.c
146
next_tid = perf_sample__intval(&sample, "next_pid");
tools/perf/tests/switch-tracking.c
147
prev_tid = perf_sample__intval(&sample, "prev_pid");
tools/perf/tests/switch-tracking.c
148
cpu = sample.cpu;
tools/perf/tests/switch-tracking.c
180
perf_sample__exit(&sample);
tools/perf/tests/switch-tracking.c
227
struct perf_sample sample;
tools/perf/tests/switch-tracking.c
238
if (evlist__parse_sample(evlist, event, &sample)) {
tools/perf/tests/switch-tracking.c
243
if (!sample.time) {
tools/perf/tests/switch-tracking.c
245
perf_sample__exit(&sample);
tools/perf/tests/switch-tracking.c
249
node->event_time = sample.time;
tools/perf/tests/switch-tracking.c
251
perf_sample__exit(&sample);
tools/perf/tests/tests.h
210
int test__arch_unwind_sample(struct perf_sample *sample,
tools/perf/tests/thread-map.c
64
struct perf_sample *sample __maybe_unused,
tools/perf/trace/beauty/include/uapi/drm/i915_drm.h
269
#define __I915_PMU_ENGINE(class, instance, sample) \
tools/perf/trace/beauty/include/uapi/drm/i915_drm.h
272
(sample))
tools/perf/util/amd-sample-raw.c
298
static void amd_dump_ibs_op(struct perf_sample *sample)
tools/perf/util/amd-sample-raw.c
300
struct perf_ibs_data *data = sample->raw_data;
tools/perf/util/amd-sample-raw.c
333
static void amd_dump_ibs_fetch(struct perf_sample *sample)
tools/perf/util/amd-sample-raw.c
335
struct perf_ibs_data *data = sample->raw_data;
tools/perf/util/amd-sample-raw.c
350
static bool is_valid_ibs_fetch_sample(struct perf_sample *sample)
tools/perf/util/amd-sample-raw.c
352
struct perf_ibs_data *data = sample->raw_data;
tools/perf/util/amd-sample-raw.c
361
static bool is_valid_ibs_op_sample(struct perf_sample *sample)
tools/perf/util/amd-sample-raw.c
363
struct perf_ibs_data *data = sample->raw_data;
tools/perf/util/amd-sample-raw.c
377
struct perf_sample *sample)
tools/perf/util/amd-sample-raw.c
381
if (event->header.type != PERF_RECORD_SAMPLE || !sample->raw_size)
tools/perf/util/amd-sample-raw.c
389
if (!is_valid_ibs_fetch_sample(sample)) {
tools/perf/util/amd-sample-raw.c
393
amd_dump_ibs_fetch(sample);
tools/perf/util/amd-sample-raw.c
395
if (!is_valid_ibs_op_sample(sample)) {
tools/perf/util/amd-sample-raw.c
399
amd_dump_ibs_op(sample);
tools/perf/util/annotate.c
217
struct perf_sample *sample)
tools/perf/util/annotate.c
219
struct evsel *evsel = sample->evsel;
tools/perf/util/annotate.c
255
h->period += sample->period;
tools/perf/util/annotate.c
257
entry->period += sample->period;
tools/perf/util/annotate.c
324
struct perf_sample *sample)
tools/perf/util/annotate.c
331
src = symbol__hists(sym, sample->evsel->evlist->core.nr_entries);
tools/perf/util/annotate.c
332
return src ? __symbol__inc_addr_samples(ms, src, addr, sample) : 0;
tools/perf/util/annotate.c
586
int addr_map_symbol__inc_samples(struct addr_map_symbol *ams, struct perf_sample *sample)
tools/perf/util/annotate.c
588
return symbol__inc_addr_samples(&ams->ms, ams->al_addr, sample);
tools/perf/util/annotate.c
591
int hist_entry__inc_addr_samples(struct hist_entry *he, struct perf_sample *sample, u64 ip)
tools/perf/util/annotate.c
593
return symbol__inc_addr_samples(&he->ms, ip, sample);
tools/perf/util/annotate.h
425
int addr_map_symbol__inc_samples(struct addr_map_symbol *ams, struct perf_sample *sample);
tools/perf/util/annotate.h
435
int hist_entry__inc_addr_samples(struct hist_entry *he, struct perf_sample *sample, u64 addr);
tools/perf/util/arm-spe.c
1423
struct perf_sample *sample)
tools/perf/util/arm-spe.c
1433
cpu = sample->cpu;
tools/perf/util/arm-spe.c
1443
struct perf_sample *sample,
tools/perf/util/arm-spe.c
1459
if (sample->time && (sample->time != (u64) -1))
tools/perf/util/arm-spe.c
1460
timestamp = perf_time_to_tsc(sample->time, &spe->tc);
tools/perf/util/arm-spe.c
1474
sample->time);
tools/perf/util/arm-spe.c
1484
err = arm_spe_context_switch(spe, event, sample);
tools/perf/util/arm-spe.c
388
struct perf_sample *sample)
tools/perf/util/arm-spe.c
393
sample->time = tsc_to_perf_time(record->timestamp, &spe->tc);
tools/perf/util/arm-spe.c
395
sample->ip = record->from_ip;
tools/perf/util/arm-spe.c
396
sample->cpumode = arm_spe_cpumode(spe, sample->ip);
tools/perf/util/arm-spe.c
397
sample->pid = speq->pid;
tools/perf/util/arm-spe.c
398
sample->tid = speq->tid;
tools/perf/util/arm-spe.c
399
sample->period = spe->synth_opts.period;
tools/perf/util/arm-spe.c
400
sample->cpu = speq->cpu;
tools/perf/util/arm-spe.c
401
sample->simd_flags = arm_spe__synth_simd_flags(record);
tools/perf/util/arm-spe.c
403
event->sample.header.type = PERF_RECORD_SAMPLE;
tools/perf/util/arm-spe.c
404
event->sample.header.misc = sample->cpumode;
tools/perf/util/arm-spe.c
405
event->sample.header.size = sizeof(struct perf_event_header);
tools/perf/util/arm-spe.c
491
struct perf_sample *sample, u64 type)
tools/perf/util/arm-spe.c
493
struct evsel *evsel = sample->evsel;
tools/perf/util/arm-spe.c
498
evsel = evlist__id2evsel(spe->session->evlist, sample->id);
tools/perf/util/arm-spe.c
504
sz = perf_event__sample_event_size(sample, type, /*read_format=*/0,
tools/perf/util/arm-spe.c
513
branch_sample_type, sample);
tools/perf/util/arm-spe.c
520
struct perf_sample *sample)
tools/perf/util/arm-spe.c
525
ret = arm_spe__inject_event(spe, event, sample, spe->sample_type);
tools/perf/util/arm-spe.c
530
ret = perf_session__deliver_synth_event(spe->session, event, sample);
tools/perf/util/arm-spe.c
544
struct perf_sample sample;
tools/perf/util/arm-spe.c
547
perf_sample__init(&sample, /*all=*/true);
tools/perf/util/arm-spe.c
548
arm_spe_prep_sample(spe, speq, event, &sample);
tools/perf/util/arm-spe.c
550
sample.id = spe_events_id;
tools/perf/util/arm-spe.c
551
sample.stream_id = spe_events_id;
tools/perf/util/arm-spe.c
552
sample.addr = record->virt_addr;
tools/perf/util/arm-spe.c
553
sample.phys_addr = record->phys_addr;
tools/perf/util/arm-spe.c
554
sample.data_src = data_src.val;
tools/perf/util/arm-spe.c
555
sample.weight = record->latency;
tools/perf/util/arm-spe.c
557
ret = arm_spe_deliver_synth_event(spe, speq, event, &sample);
tools/perf/util/arm-spe.c
558
perf_sample__exit(&sample);
tools/perf/util/arm-spe.c
568
struct perf_sample sample;
tools/perf/util/arm-spe.c
571
perf_sample__init(&sample, /*all=*/true);
tools/perf/util/arm-spe.c
572
arm_spe_prep_sample(spe, speq, event, &sample);
tools/perf/util/arm-spe.c
574
sample.id = spe_events_id;
tools/perf/util/arm-spe.c
575
sample.stream_id = spe_events_id;
tools/perf/util/arm-spe.c
576
sample.addr = record->to_ip;
tools/perf/util/arm-spe.c
577
sample.weight = record->latency;
tools/perf/util/arm-spe.c
578
sample.flags = speq->flags;
tools/perf/util/arm-spe.c
579
sample.branch_stack = speq->last_branch;
tools/perf/util/arm-spe.c
581
ret = arm_spe_deliver_synth_event(spe, speq, event, &sample);
tools/perf/util/arm-spe.c
582
perf_sample__exit(&sample);
tools/perf/util/arm-spe.c
593
struct perf_sample sample;
tools/perf/util/arm-spe.c
596
perf_sample__init(&sample, /*all=*/true);
tools/perf/util/arm-spe.c
597
arm_spe_prep_sample(spe, speq, event, &sample);
tools/perf/util/arm-spe.c
599
sample.id = spe_events_id;
tools/perf/util/arm-spe.c
600
sample.stream_id = spe_events_id;
tools/perf/util/arm-spe.c
601
sample.addr = record->to_ip;
tools/perf/util/arm-spe.c
602
sample.phys_addr = record->phys_addr;
tools/perf/util/arm-spe.c
603
sample.data_src = data_src.val;
tools/perf/util/arm-spe.c
604
sample.weight = record->latency;
tools/perf/util/arm-spe.c
605
sample.flags = speq->flags;
tools/perf/util/arm-spe.c
606
sample.branch_stack = speq->last_branch;
tools/perf/util/arm-spe.c
608
ret = arm_spe_deliver_synth_event(spe, speq, event, &sample);
tools/perf/util/arm-spe.c
609
perf_sample__exit(&sample);
tools/perf/util/arm64-frame-pointer-unwind-support.c
25
static bool get_leaf_frame_caller_enabled(struct perf_sample *sample)
tools/perf/util/arm64-frame-pointer-unwind-support.c
32
regs = perf_sample__user_regs(sample);
tools/perf/util/arm64-frame-pointer-unwind-support.c
44
u64 get_leaf_frame_caller_aarch64(struct perf_sample *sample, struct thread *thread, int usr_idx)
tools/perf/util/arm64-frame-pointer-unwind-support.c
50
if (!get_leaf_frame_caller_enabled(sample))
tools/perf/util/arm64-frame-pointer-unwind-support.c
58
regs = perf_sample__user_regs(sample);
tools/perf/util/arm64-frame-pointer-unwind-support.c
62
regs->cache_regs[PERF_REG_ARM64_PC] = sample->callchain->ips[usr_idx+1];
tools/perf/util/arm64-frame-pointer-unwind-support.c
70
ret = unwind__get_entries(add_entry, &entries, thread, sample, 2, true);
tools/perf/util/arm64-frame-pointer-unwind-support.h
12
u64 get_leaf_frame_caller_aarch64(struct perf_sample *sample, struct thread *thread, int user_idx);
tools/perf/util/aslr.c
1119
new_event->sample.header.size = sizeof(struct perf_event_header) + j * sizeof(u64);
tools/perf/util/aslr.c
1139
ret = delegate->sample(delegate, new_event, &new_sample, machine);
tools/perf/util/aslr.c
1258
aslr->tool.tool.sample = aslr_tool__process_sample;
tools/perf/util/aslr.c
436
struct perf_sample *sample,
tools/perf/util/aslr.c
461
err = perf_event__process_mmap(tool, event, sample, aslr_machine);
tools/perf/util/aslr.c
485
err = delegate->mmap(delegate, new_event, sample, machine);
tools/perf/util/aslr.c
492
struct perf_sample *sample,
tools/perf/util/aslr.c
517
err = perf_event__process_mmap2(tool, event, sample, aslr_machine);
tools/perf/util/aslr.c
541
err = delegate->mmap2(delegate, new_event, sample, machine);
tools/perf/util/aslr.c
548
struct perf_sample *sample,
tools/perf/util/aslr.c
568
err = perf_event__process_comm(tool, event, sample, aslr_machine);
tools/perf/util/aslr.c
572
return delegate->comm(delegate, event, sample, machine);
tools/perf/util/aslr.c
577
struct perf_sample *sample,
tools/perf/util/aslr.c
597
err = perf_event__process_fork(tool, event, sample, aslr_machine);
tools/perf/util/aslr.c
601
return delegate->fork(delegate, event, sample, machine);
tools/perf/util/aslr.c
606
struct perf_sample *sample,
tools/perf/util/aslr.c
626
err = perf_event__process_exit(tool, event, sample, aslr_machine);
tools/perf/util/aslr.c
630
return delegate->exit(delegate, event, sample, machine);
tools/perf/util/aslr.c
635
struct perf_sample *sample __maybe_unused,
tools/perf/util/aslr.c
644
struct perf_sample *sample,
tools/perf/util/aslr.c
681
err = perf_event__process_ksymbol(tool, event, sample, aslr_machine);
tools/perf/util/aslr.c
683
err = perf_event__process_ksymbol(tool, event, sample, aslr_machine);
tools/perf/util/aslr.c
695
err = delegate->ksymbol(delegate, new_event, sample, machine);
tools/perf/util/aslr.c
702
struct perf_sample *sample,
tools/perf/util/aslr.c
705
struct evsel *evsel = sample->evsel;
tools/perf/util/aslr.c
733
return delegate->sample(delegate, event, sample, machine);
tools/perf/util/aslr.c
757
cpumode = sample->cpumode;
tools/perf/util/aslr.c
767
thread = machine__findnew_thread(aslr_machine, sample->pid, sample->tid);
tools/perf/util/aslr.c
775
new_event->sample.header = event->sample.header;
tools/perf/util/aslr.c
777
in_array = &event->sample.array[0];
tools/perf/util/aslr.c
778
out_array = &new_event->sample.array[0];
tools/perf/util/aslr.c
807
REMAP_U64(sample->ip);
tools/perf/util/aslr.c
818
u.val32[0] = sample->pid;
tools/perf/util/aslr.c
819
u.val32[1] = sample->tid;
tools/perf/util/aslr.c
826
REMAP_U64(sample->addr);
tools/perf/util/aslr.c
935
size_t bytes = sizeof(u32) + sample->raw_size;
tools/perf/util/aslr.c
978
from = aslr_tool__remap_address(aslr, thread, sample->cpumode, from);
tools/perf/util/aslr.c
979
to = aslr_tool__remap_address(aslr, thread, sample->cpumode, to);
tools/perf/util/auxtrace.c
1130
struct perf_sample *sample,
tools/perf/util/auxtrace.c
1137
id = sample->id;
tools/perf/util/auxtrace.c
1155
struct perf_sample *sample, u64 data_offset,
tools/perf/util/auxtrace.c
1162
.size = sample->aux_sample.size,
tools/perf/util/auxtrace.c
1165
u64 id = sample->id;
tools/perf/util/auxtrace.c
1192
struct perf_sample sample;
tools/perf/util/auxtrace.c
1206
perf_sample__init(&sample, /*all=*/false);
tools/perf/util/auxtrace.c
1207
err = evlist__parse_sample(session->evlist, event, &sample);
tools/perf/util/auxtrace.c
1211
if (sample.aux_sample.size) {
tools/perf/util/auxtrace.c
1212
offset += sample.aux_sample.data - (void *)event;
tools/perf/util/auxtrace.c
1214
err = session->auxtrace->queue_data(session, &sample, NULL, offset);
tools/perf/util/auxtrace.c
1217
perf_sample__exit(&sample);
tools/perf/util/auxtrace.c
2945
struct perf_sample *sample, const struct perf_tool *tool)
tools/perf/util/auxtrace.c
2950
return session->auxtrace->process_event(session, event, sample, tool);
tools/perf/util/auxtrace.c
2954
struct perf_sample *sample)
tools/perf/util/auxtrace.c
2960
session->auxtrace->dump_auxtrace_sample(session, sample);
tools/perf/util/auxtrace.h
206
struct perf_sample *sample,
tools/perf/util/auxtrace.h
212
struct perf_sample *sample, union perf_event *event,
tools/perf/util/auxtrace.h
215
struct perf_sample *sample);
tools/perf/util/auxtrace.h
526
struct perf_sample *sample,
tools/perf/util/auxtrace.h
530
struct perf_sample *sample, u64 data_offset,
tools/perf/util/auxtrace.h
639
struct perf_sample *sample, const struct perf_tool *tool);
tools/perf/util/auxtrace.h
641
struct perf_sample *sample);
tools/perf/util/bpf-event.c
45
struct perf_sample *sample __maybe_unused)
tools/perf/util/bpf-event.c
85
struct perf_sample *sample)
tools/perf/util/bpf-event.c
92
return machine__process_bpf_event_load(machine, event, sample);
tools/perf/util/bpf-event.h
41
struct perf_sample *sample);
tools/perf/util/bpf-event.h
50
struct perf_sample *sample __maybe_unused)
tools/perf/util/bpf-filter.y
37
} sample;
tools/perf/util/bpf-filter.y
45
%type <sample> BFT_SAMPLE BFT_SAMPLE_PATH
tools/perf/util/branch.h
65
static inline struct branch_entry *perf_sample__branch_entries(struct perf_sample *sample)
tools/perf/util/branch.h
67
u64 *entry = (u64 *)sample->branch_stack;
tools/perf/util/branch.h
73
if (sample->no_hw_idx)
tools/perf/util/build-id.c
58
struct perf_sample *sample,
tools/perf/util/build-id.c
62
struct thread *thread = machine__findnew_thread(machine, sample->pid,
tools/perf/util/build-id.c
63
sample->tid);
tools/perf/util/build-id.c
67
perf_event__name(event->header.type), sample->file_offset);
tools/perf/util/build-id.c
72
if (thread__find_map(thread, sample->cpumode, sample->ip, &al))
tools/perf/util/build-id.c
77
sample__for_each_callchain_node(thread, sample, PERF_MAX_STACK_DEPTH,
tools/perf/util/build-id.h
37
struct perf_sample *sample, struct machine *machine);
tools/perf/util/callchain.c
1171
int sample__resolve_callchain(struct perf_sample *sample,
tools/perf/util/callchain.c
1176
if (sample->callchain == NULL && !symbol_conf.show_branchflag_count)
tools/perf/util/callchain.c
1181
return thread__resolve_callchain(al->thread, cursor, sample,
tools/perf/util/callchain.c
1187
int hist_entry__append_callchain(struct hist_entry *he, struct perf_sample *sample)
tools/perf/util/callchain.c
1189
if ((!symbol_conf.use_callchain || sample->callchain == NULL) &&
tools/perf/util/callchain.c
1192
return callchain_append(he->callchain, get_tls_callchain_cursor(), sample->period);
tools/perf/util/callchain.c
1872
struct perf_sample *sample, int max_stack,
tools/perf/util/callchain.c
1882
ret = __thread__resolve_callchain(thread, cursor, sample,
tools/perf/util/callchain.h
244
int sample__resolve_callchain(struct perf_sample *sample,
tools/perf/util/callchain.h
248
int hist_entry__append_callchain(struct hist_entry *he, struct perf_sample *sample);
tools/perf/util/callchain.h
309
struct perf_sample *sample, int max_stack,
tools/perf/util/cs-etm.c
1463
struct perf_sample *sample, u64 type)
tools/perf/util/cs-etm.c
1465
struct evsel *evsel = sample->evsel;
tools/perf/util/cs-etm.c
1470
evsel = evlist__id2evsel(etm->session->evlist, sample->id);
tools/perf/util/cs-etm.c
1475
sz = perf_event__sample_event_size(sample, type, /*read_format=*/0,
tools/perf/util/cs-etm.c
1484
branch_sample_type, sample);
tools/perf/util/cs-etm.c
1586
struct perf_sample *sample)
tools/perf/util/cs-etm.c
1593
sample->insn_len = 0;
tools/perf/util/cs-etm.c
1602
sample->insn_len = cs_etm__t32_instr_size(etmq, tidq, packet,
tools/perf/util/cs-etm.c
1603
sample->ip);
tools/perf/util/cs-etm.c
1606
sample->insn_len = 4;
tools/perf/util/cs-etm.c
1608
cs_etm__frontend_mem_access(etmq, tidq, packet, sample->ip,
tools/perf/util/cs-etm.c
1609
sample->insn_len, (void *)sample->insn);
tools/perf/util/cs-etm.c
1642
struct perf_sample sample;
tools/perf/util/cs-etm.c
1644
perf_sample__init(&sample, /*all=*/true);
tools/perf/util/cs-etm.c
1645
event->sample.header.type = PERF_RECORD_SAMPLE;
tools/perf/util/cs-etm.c
1646
event->sample.header.misc = cs_etm__cpu_mode(etmq, addr, packet->el);
tools/perf/util/cs-etm.c
1647
event->sample.header.size = sizeof(struct perf_event_header);
tools/perf/util/cs-etm.c
1650
sample.time = cs_etm__resolve_sample_time(etmq, tidq);
tools/perf/util/cs-etm.c
1652
sample.ip = addr;
tools/perf/util/cs-etm.c
1653
sample.pid = thread__pid(tidq->frontend_thread);
tools/perf/util/cs-etm.c
1654
sample.tid = thread__tid(tidq->frontend_thread);
tools/perf/util/cs-etm.c
1655
sample.id = etmq->etm->instructions_id;
tools/perf/util/cs-etm.c
1656
sample.stream_id = etmq->etm->instructions_id;
tools/perf/util/cs-etm.c
1657
sample.period = period;
tools/perf/util/cs-etm.c
1658
sample.cpu = packet->cpu;
tools/perf/util/cs-etm.c
1659
sample.flags = tidq->prev_packet->flags;
tools/perf/util/cs-etm.c
1660
sample.cpumode = event->sample.header.misc;
tools/perf/util/cs-etm.c
1662
cs_etm__copy_insn(etmq, tidq, packet, &sample);
tools/perf/util/cs-etm.c
1665
sample.branch_stack = tidq->last_branch;
tools/perf/util/cs-etm.c
1668
ret = cs_etm__inject_event(etm, event, &sample,
tools/perf/util/cs-etm.c
1674
ret = perf_session__deliver_synth_event(etm->session, event, &sample);
tools/perf/util/cs-etm.c
1681
perf_sample__exit(&sample);
tools/perf/util/cs-etm.c
1694
struct perf_sample sample = {.ip = 0,};
tools/perf/util/cs-etm.c
1705
event->sample.header.type = PERF_RECORD_SAMPLE;
tools/perf/util/cs-etm.c
1706
event->sample.header.misc = cs_etm__cpu_mode(etmq, ip,
tools/perf/util/cs-etm.c
1708
event->sample.header.size = sizeof(struct perf_event_header);
tools/perf/util/cs-etm.c
1711
sample.time = cs_etm__resolve_sample_time(etmq, tidq);
tools/perf/util/cs-etm.c
1713
sample.ip = ip;
tools/perf/util/cs-etm.c
1714
sample.pid = thread__pid(tidq->frontend_thread);
tools/perf/util/cs-etm.c
1715
sample.tid = thread__tid(tidq->frontend_thread);
tools/perf/util/cs-etm.c
1716
sample.addr = cs_etm__first_executed_instr(tidq->packet);
tools/perf/util/cs-etm.c
1717
sample.id = etmq->etm->branches_id;
tools/perf/util/cs-etm.c
1718
sample.stream_id = etmq->etm->branches_id;
tools/perf/util/cs-etm.c
1719
sample.period = 1;
tools/perf/util/cs-etm.c
1720
sample.cpu = tidq->packet->cpu;
tools/perf/util/cs-etm.c
1721
sample.flags = tidq->prev_packet->flags;
tools/perf/util/cs-etm.c
1722
sample.cpumode = event->sample.header.misc;
tools/perf/util/cs-etm.c
1724
cs_etm__copy_insn(etmq, tidq, tidq->prev_packet, &sample);
tools/perf/util/cs-etm.c
1734
.from = sample.ip,
tools/perf/util/cs-etm.c
1735
.to = sample.addr,
tools/perf/util/cs-etm.c
1738
sample.branch_stack = (struct branch_stack *)&dummy_bs;
tools/perf/util/cs-etm.c
1742
ret = cs_etm__inject_event(etm, event, &sample,
tools/perf/util/cs-etm.c
1748
ret = perf_session__deliver_synth_event(etm->session, event, &sample);
tools/perf/util/cs-etm.c
2892
struct perf_sample *sample,
tools/perf/util/cs-etm.c
2934
if (sample->time && (sample->time != (u64)-1))
tools/perf/util/cs-etm.c
2935
etm->latest_kernel_timestamp = sample->time;
tools/perf/util/cs-etm.c
3089
struct perf_record_aux *aux_event, struct perf_sample *sample)
tools/perf/util/cs-etm.c
3129
if (auxtrace_event->tid != sample->tid)
tools/perf/util/cs-etm.c
3131
} else if (auxtrace_event->cpu != sample->cpu) {
tools/perf/util/cs-etm.c
3179
" tid: %d cpu: %d\n", aux_size, aux_offset, sample->tid, sample->cpu);
tools/perf/util/cs-etm.c
3213
struct perf_sample sample;
tools/perf/util/cs-etm.c
3238
perf_sample__init(&sample, /*all=*/false);
tools/perf/util/cs-etm.c
3239
ret = evsel__parse_sample(evsel, event, &sample);
tools/perf/util/cs-etm.c
3250
ent->sz, &event->aux, &sample);
tools/perf/util/cs-etm.c
3265
" tid: %d cpu: %d\n", event->aux.aux_offset, sample.tid, sample.cpu);
tools/perf/util/cs-etm.c
3268
perf_sample__exit(&sample);
tools/perf/util/cs-etm.c
509
struct perf_sample sample;
tools/perf/util/cs-etm.c
534
perf_sample__init(&sample, /*all=*/false);
tools/perf/util/cs-etm.c
535
err = evsel__parse_sample(evsel, event, &sample);
tools/perf/util/cs-etm.c
538
cpu = sample.cpu;
tools/perf/util/cs-etm.c
553
perf_sample__exit(&sample);
tools/perf/util/data-convert-bt.c
1723
c.tool.sample = process_sample_event;
tools/perf/util/data-convert-bt.c
302
struct perf_sample *sample,
tools/perf/util/data-convert-bt.c
309
void *data = sample->raw_data;
tools/perf/util/data-convert-bt.c
415
struct perf_sample *sample)
tools/perf/util/data-convert-bt.c
421
ret = add_tracepoint_field_value(cw, event_class, event, sample,
tools/perf/util/data-convert-bt.c
433
struct perf_sample *sample)
tools/perf/util/data-convert-bt.c
441
common_fields, sample);
tools/perf/util/data-convert-bt.c
444
fields, sample);
tools/perf/util/data-convert-bt.c
452
struct perf_sample *sample)
tools/perf/util/data-convert-bt.c
456
unsigned int raw_size = sample->raw_size;
tools/perf/util/data-convert-bt.c
503
((u32 *)(sample->raw_data))[i]);
tools/perf/util/data-convert-bt.c
605
struct perf_sample *sample)
tools/perf/util/data-convert-bt.c
622
ret = value_set_u64_hex(cw, event, "perf_ip", sample->ip);
tools/perf/util/data-convert-bt.c
628
ret = value_set_s32(cw, event, "perf_tid", sample->tid);
tools/perf/util/data-convert-bt.c
632
ret = value_set_s32(cw, event, "perf_pid", sample->pid);
tools/perf/util/data-convert-bt.c
639
ret = value_set_u64(cw, event, "perf_id", sample->id);
tools/perf/util/data-convert-bt.c
645
ret = value_set_u64(cw, event, "perf_stream_id", sample->stream_id);
tools/perf/util/data-convert-bt.c
651
ret = value_set_u64(cw, event, "perf_period", sample->period);
tools/perf/util/data-convert-bt.c
657
ret = value_set_u64(cw, event, "perf_weight", sample->weight);
tools/perf/util/data-convert-bt.c
664
sample->data_src);
tools/perf/util/data-convert-bt.c
671
sample->transaction);
tools/perf/util/data-convert-bt.c
772
static int get_sample_cpu(struct ctf_writer *cw, struct perf_sample *sample,
tools/perf/util/data-convert-bt.c
778
cpu = sample->cpu;
tools/perf/util/data-convert-bt.c
804
struct perf_sample *sample,
tools/perf/util/data-convert-bt.c
808
struct evsel *evsel = sample->evsel;
tools/perf/util/data-convert-bt.c
820
if (perf_time__ranges_skip_sample(c->ptime_range, c->range_num, sample->time)) {
tools/perf/util/data-convert-bt.c
831
pr_time2(sample->time, "sample %" PRIu64 "\n", c->events_count);
tools/perf/util/data-convert-bt.c
839
bt_ctf_clock_set_time(cw->clock, sample->time);
tools/perf/util/data-convert-bt.c
841
ret = add_generic_values(cw, event, evsel, sample);
tools/perf/util/data-convert-bt.c
847
evsel, sample);
tools/perf/util/data-convert-bt.c
854
event, sample->callchain);
tools/perf/util/data-convert-bt.c
860
ret = add_bpf_output_values(event_class, event, sample);
tools/perf/util/data-convert-bt.c
865
cs = ctf_stream(cw, get_sample_cpu(cw, sample, evsel));
tools/perf/util/data-convert-bt.c
888
struct perf_sample *sample, \
tools/perf/util/data-convert-bt.c
906
bt_ctf_clock_set_time(cw->clock, sample->time); \
tools/perf/util/data-convert-bt.c
918
return perf_event__process_##_name(tool, _event, sample, machine);\
tools/perf/util/data-convert-json.c
162
struct perf_sample *sample,
tools/perf/util/data-convert-json.c
168
u64 sample_type = __evlist__combined_sample_type(sample->evsel->evlist);
tools/perf/util/data-convert-json.c
172
if (machine__resolve(machine, &al, sample) < 0) {
tools/perf/util/data-convert-json.c
178
if (perf_time__ranges_skip_sample(c->ptime_range, c->range_num, sample->time)) {
tools/perf/util/data-convert-json.c
192
output_json_key_format(out, false, 3, "timestamp", "%" PRIi64, sample->time);
tools/perf/util/data-convert-json.c
197
output_json_key_format(out, true, 3, "cpu", "%i", sample->cpu);
tools/perf/util/data-convert-json.c
204
if (sample->callchain) {
tools/perf/util/data-convert-json.c
209
for (i = 0; i < sample->callchain->nr; ++i) {
tools/perf/util/data-convert-json.c
210
u64 ip = sample->callchain->ips[i];
tools/perf/util/data-convert-json.c
243
output_sample_callchain_entry(tool, sample->ip, &al);
tools/perf/util/data-convert-json.c
248
if (sample->raw_data) {
tools/perf/util/data-convert-json.c
249
struct tep_event *tp_format = evsel__tp_format(sample->evsel);
tools/perf/util/data-convert-json.c
259
tep_print_field(&s, sample->raw_data, fields[i]);
tools/perf/util/data-convert-json.c
352
c.tool.sample = process_sample_event;
tools/perf/util/db-export.c
211
struct perf_sample *sample)
tools/perf/util/db-export.c
219
if (!symbol_conf.use_callchain || !sample->callchain)
tools/perf/util/db-export.c
230
sample, NULL, NULL, PERF_MAX_STACK_DEPTH);
tools/perf/util/db-export.c
347
struct perf_sample *sample,
tools/perf/util/db-export.c
353
.sample = sample,
tools/perf/util/db-export.c
366
err = db_export__evsel(dbe, sample->evsel);
tools/perf/util/db-export.c
391
thread, sample);
tools/perf/util/db-export.c
404
err = thread_stack__process(thread, comm, sample, al,
tools/perf/util/db-export.c
555
struct perf_sample *sample, struct machine *machine)
tools/perf/util/db-export.c
574
err = db_export__pid_tid(dbe, machine, sample->pid, sample->tid,
tools/perf/util/db-export.c
611
return dbe->export_context_switch(dbe, db_id, machine, sample,
tools/perf/util/db-export.h
107
struct perf_sample *sample, struct machine *machine);
tools/perf/util/db-export.h
27
struct perf_sample *sample;
tools/perf/util/db-export.h
61
struct perf_sample *sample,
tools/perf/util/db-export.h
98
struct perf_sample *sample,
tools/perf/util/dlfilter.c
108
d_al->is_kernel_ip = machine__kernel_ip(d->machine, d->sample->ip);
tools/perf/util/dlfilter.c
133
thread__resolve(thread, addr_al, d->sample);
tools/perf/util/dlfilter.c
138
d_addr_al->is_kernel_ip = machine__kernel_ip(d->machine, d->sample->addr);
tools/perf/util/dlfilter.c
180
thread__find_symbol_fb(thread, d->sample->cpumode, address, &al);
tools/perf/util/dlfilter.c
227
if (d->sample->ip && !d->sample->insn_len) {
tools/perf/util/dlfilter.c
230
if (!al->thread && machine__resolve(d->machine, al, d->sample) < 0)
tools/perf/util/dlfilter.c
237
perf_sample__fetch_insn(d->sample, al->thread, machine);
tools/perf/util/dlfilter.c
241
if (!d->sample->insn_len)
tools/perf/util/dlfilter.c
244
*len = d->sample->insn_len;
tools/perf/util/dlfilter.c
246
return (__u8 *)d->sample->insn;
tools/perf/util/dlfilter.c
312
machine__kernel_ip(d->machine, ip) == machine__kernel_ip(d->machine, d->sample->ip))
tools/perf/util/dlfilter.c
317
thread__find_map_fb(al->thread, d->sample->cpumode, ip, &a);
tools/perf/util/dlfilter.c
488
#define ASSIGN(x) d_sample.x = sample->x
tools/perf/util/dlfilter.c
492
struct perf_sample *sample,
tools/perf/util/dlfilter.c
505
d->sample = sample;
tools/perf/util/dlfilter.c
515
d_sample.p_stage_cyc = sample->weight3;
tools/perf/util/dlfilter.c
546
if (sample->branch_stack) {
tools/perf/util/dlfilter.c
547
d_sample.brstack_nr = sample->branch_stack->nr;
tools/perf/util/dlfilter.c
548
d_sample.brstack = (struct perf_branch_entry *)perf_sample__branch_entries(sample);
tools/perf/util/dlfilter.c
554
if (sample->callchain) {
tools/perf/util/dlfilter.c
555
d_sample.raw_callchain_nr = sample->callchain->nr;
tools/perf/util/dlfilter.c
556
d_sample.raw_callchain = (__u64 *)sample->callchain->ips;
tools/perf/util/dlfilter.c
77
if (!al->thread && machine__resolve(d->machine, al, d->sample) < 0)
tools/perf/util/dlfilter.h
32
struct perf_sample *sample;
tools/perf/util/dlfilter.h
45
const struct perf_dlfilter_sample *sample,
tools/perf/util/dlfilter.h
48
const struct perf_dlfilter_sample *sample,
tools/perf/util/dlfilter.h
60
struct perf_sample *sample,
tools/perf/util/dlfilter.h
71
struct perf_sample *sample,
tools/perf/util/dlfilter.h
79
return dlfilter__do_filter_event(d, event, sample, evsel, machine, al, addr_al, false);
tools/perf/util/dlfilter.h
84
struct perf_sample *sample,
tools/perf/util/dlfilter.h
92
return dlfilter__do_filter_event(d, event, sample, evsel, machine, al, addr_al, true);
tools/perf/util/event.c
229
struct perf_sample *sample,
tools/perf/util/event.c
232
return machine__process_comm_event(machine, event, sample);
tools/perf/util/event.c
237
struct perf_sample *sample,
tools/perf/util/event.c
240
return machine__process_namespaces_event(machine, event, sample);
tools/perf/util/event.c
245
struct perf_sample *sample,
tools/perf/util/event.c
248
return machine__process_cgroup_event(machine, event, sample);
tools/perf/util/event.c
253
struct perf_sample *sample,
tools/perf/util/event.c
256
return machine__process_lost_event(machine, event, sample);
tools/perf/util/event.c
261
struct perf_sample *sample __maybe_unused,
tools/perf/util/event.c
269
struct perf_sample *sample __maybe_unused,
tools/perf/util/event.c
277
struct perf_sample *sample __maybe_unused,
tools/perf/util/event.c
285
struct perf_sample *sample,
tools/perf/util/event.c
288
return machine__process_lost_samples_event(machine, event, sample);
tools/perf/util/event.c
293
struct perf_sample *sample __maybe_unused,
tools/perf/util/event.c
301
struct perf_sample *sample __maybe_unused,
tools/perf/util/event.c
304
return machine__process_ksymbol(machine, event, sample);
tools/perf/util/event.c
309
struct perf_sample *sample,
tools/perf/util/event.c
312
return machine__process_bpf(machine, event, sample);
tools/perf/util/event.c
317
struct perf_sample *sample,
tools/perf/util/event.c
320
return machine__process_text_poke(machine, event, sample);
tools/perf/util/event.c
400
struct perf_sample *sample,
tools/perf/util/event.c
403
return machine__process_mmap_event(machine, event, sample);
tools/perf/util/event.c
408
struct perf_sample *sample,
tools/perf/util/event.c
411
return machine__process_mmap2_event(machine, event, sample);
tools/perf/util/event.c
423
struct perf_sample *sample,
tools/perf/util/event.c
426
return machine__process_fork_event(machine, event, sample);
tools/perf/util/event.c
431
struct perf_sample *sample,
tools/perf/util/event.c
434
return machine__process_exit_event(machine, event, sample);
tools/perf/util/event.c
439
struct perf_sample *sample __maybe_unused,
tools/perf/util/event.c
688
struct perf_sample *sample,
tools/perf/util/event.c
691
return machine__process_event(machine, event, sample);
tools/perf/util/event.c
806
struct perf_sample *sample)
tools/perf/util/event.c
812
thread = machine__findnew_guest_code(machine, sample->pid);
tools/perf/util/event.c
814
thread = machine__findnew_thread(machine, sample->pid, sample->tid);
tools/perf/util/event.c
819
thread__find_map(thread, sample->cpumode, sample->ip, al);
tools/perf/util/event.c
833
al->cpu = sample->cpu;
tools/perf/util/event.c
863
al->latency = sample->period * 1000 / al->parallelism;
tools/perf/util/event.c
935
struct perf_sample *sample)
tools/perf/util/event.c
937
thread__find_map_fb(thread, sample->cpumode, sample->addr, al);
tools/perf/util/event.c
939
al->cpu = sample->cpu;
tools/perf/util/event.h
303
struct perf_sample *sample,
tools/perf/util/event.h
307
struct perf_sample *sample,
tools/perf/util/event.h
311
struct perf_sample *sample,
tools/perf/util/event.h
315
struct perf_sample *sample,
tools/perf/util/event.h
319
struct perf_sample *sample,
tools/perf/util/event.h
323
struct perf_sample *sample,
tools/perf/util/event.h
327
struct perf_sample *sample,
tools/perf/util/event.h
331
struct perf_sample *sample,
tools/perf/util/event.h
335
struct perf_sample *sample,
tools/perf/util/event.h
339
struct perf_sample *sample,
tools/perf/util/event.h
343
struct perf_sample *sample,
tools/perf/util/event.h
347
struct perf_sample *sample,
tools/perf/util/event.h
351
struct perf_sample *sample,
tools/perf/util/event.h
355
struct perf_sample *sample,
tools/perf/util/event.h
359
struct perf_sample *sample,
tools/perf/util/event.h
363
struct perf_sample *sample,
tools/perf/util/event.h
367
struct perf_sample *sample,
tools/perf/util/event.h
371
struct perf_sample *sample,
tools/perf/util/evlist.c
1635
int evlist__parse_sample(struct evlist *evlist, union perf_event *event, struct perf_sample *sample)
tools/perf/util/evlist.c
1642
perf_sample__init(sample, /*all=*/false);
tools/perf/util/evlist.c
1645
ret = evsel__parse_sample(evsel, event, sample);
tools/perf/util/evlist.c
1648
if (perf_guest && sample->id) {
tools/perf/util/evlist.c
1649
struct perf_sample_id *sid = evlist__id2sid(evlist, sample->id);
tools/perf/util/evlist.c
1652
sample->machine_pid = sid->machine_pid;
tools/perf/util/evlist.c
1653
sample->vcpu = sid->vcpu.cpu;
tools/perf/util/evlist.c
723
const __u64 *array = event->sample.array;
tools/perf/util/evlist.h
227
int evlist__parse_sample(struct evlist *evlist, union perf_event *event, struct perf_sample *sample);
tools/perf/util/evlist.h
79
struct perf_sample *sample);
tools/perf/util/evsel.c
3179
struct perf_sample *sample)
tools/perf/util/evsel.c
3181
const struct evsel *evsel = sample->evsel;
tools/perf/util/evsel.c
3183
const __u64 *array = event->sample.array;
tools/perf/util/evsel.c
3192
sample->id = array[i--];
tools/perf/util/evsel.c
3205
sample->cpu = u.val32[0];
tools/perf/util/evsel.c
3212
sample->stream_id = array[i--];
tools/perf/util/evsel.c
3219
sample->id = array[i--];
tools/perf/util/evsel.c
3226
sample->time = array[i--];
tools/perf/util/evsel.c
3241
sample->pid = u.val32[0];
tools/perf/util/evsel.c
3242
sample->tid = u.val32[1];
tools/perf/util/evsel.c
3443
array = event->sample.array;
tools/perf/util/evsel.c
3814
array = event->sample.array;
tools/perf/util/evsel.c
3895
void *perf_sample__rawptr(struct perf_sample *sample, const char *name)
tools/perf/util/evsel.c
3897
struct tep_format_field *field = evsel__field(sample->evsel, name);
tools/perf/util/evsel.c
3908
if (out_of_bounds(field, offset, 4, sample->raw_size))
tools/perf/util/evsel.c
3911
dynamic_data = *(int *)(sample->raw_data + field->offset);
tools/perf/util/evsel.c
3913
if (sample->evsel->needs_swap)
tools/perf/util/evsel.c
3930
if (out_of_bounds(field, offset, size, sample->raw_size))
tools/perf/util/evsel.c
3933
return sample->raw_data + offset;
tools/perf/util/evsel.c
3936
u64 format_field__intval(struct tep_format_field *field, struct perf_sample *sample,
tools/perf/util/evsel.c
3940
void *ptr = sample->raw_data + field->offset;
tools/perf/util/evsel.c
3942
if (out_of_bounds(field, field->offset, field->size, sample->raw_size))
tools/perf/util/evsel.c
3978
u64 perf_sample__intval(struct perf_sample *sample, const char *name)
tools/perf/util/evsel.c
3980
struct tep_format_field *field = evsel__field(sample->evsel, name);
tools/perf/util/evsel.c
3982
return field ? format_field__intval(field, sample, sample->evsel->needs_swap) : 0;
tools/perf/util/evsel.c
3985
u64 perf_sample__intval_common(struct perf_sample *sample, const char *name)
tools/perf/util/evsel.c
3987
struct tep_format_field *field = evsel__common_field(sample->evsel, name);
tools/perf/util/evsel.c
3989
return field ? format_field__intval(field, sample, sample->evsel->needs_swap) : 0;
tools/perf/util/evsel.c
3992
char perf_sample__taskstate(struct perf_sample *sample, const char *name)
tools/perf/util/evsel.c
4001
field = evsel__field(sample->evsel, name);
tools/perf/util/evsel.c
4020
val = perf_sample__intval(sample, name);
tools/perf/util/evsel.h
390
void *perf_sample__rawptr(struct perf_sample *sample, const char *name);
tools/perf/util/evsel.h
391
u64 perf_sample__intval(struct perf_sample *sample, const char *name);
tools/perf/util/evsel.h
392
u64 perf_sample__intval_common(struct perf_sample *sample, const char *name);
tools/perf/util/evsel.h
393
char perf_sample__taskstate(struct perf_sample *sample, const char *name);
tools/perf/util/evsel.h
395
static inline char *perf_sample__strval(struct perf_sample *sample, const char *name)
tools/perf/util/evsel.h
397
return perf_sample__rawptr(sample, name);
tools/perf/util/evsel.h
403
u64 format_field__intval(struct tep_format_field *field, struct perf_sample *sample, bool needs_swap);
tools/perf/util/evsel_fprintf.c
112
int sample__fprintf_callchain(struct perf_sample *sample, int left_alignment,
tools/perf/util/evsel_fprintf.c
134
if (sample->callchain) {
tools/perf/util/evsel_fprintf.c
171
if (sample->deferred_callchain &&
tools/perf/util/evsel_fprintf.c
172
sample->deferred_cookie == node->ip) {
tools/perf/util/evsel_fprintf.c
216
int sample__fprintf_sym(struct perf_sample *sample, struct addr_location *al,
tools/perf/util/evsel_fprintf.c
230
printed += sample__fprintf_callchain(sample, left_alignment, print_opts,
tools/perf/util/evsel_fprintf.c
236
printed += fprintf(fp, "%16" PRIx64, sample->ip);
tools/perf/util/evsel_fprintf.h
37
int sample__fprintf_callchain(struct perf_sample *sample, int left_alignment,
tools/perf/util/evsel_fprintf.h
41
int sample__fprintf_sym(struct perf_sample *sample, struct addr_location *al,
tools/perf/util/hisi-ptt.c
81
struct perf_sample *sample __maybe_unused,
tools/perf/util/hist.c
1001
iter->total = sample->branch_stack->nr;
tools/perf/util/hist.c
1039
struct perf_sample *sample = iter->sample;
tools/perf/util/hist.c
1040
struct evsel *evsel = sample->evsel;
tools/perf/util/hist.c
1055
sample->period = 1;
tools/perf/util/hist.c
1056
sample->weight = bi->flags.cycles ? bi->flags.cycles : 1;
tools/perf/util/hist.c
1059
sample, true);
tools/perf/util/hist.c
1081
struct evsel *evsel = iter->sample->evsel;
tools/perf/util/hist.c
1106
struct perf_sample *sample = iter->sample;
tools/perf/util/hist.c
1107
struct evsel *evsel = sample->evsel;
tools/perf/util/hist.c
1111
NULL, sample, true);
tools/perf/util/hist.c
1124
struct perf_sample *sample = iter->sample;
tools/perf/util/hist.c
1125
struct evsel *evsel = sample->evsel;
tools/perf/util/hist.c
1134
return hist_entry__append_callchain(he, sample);
tools/perf/util/hist.c
1168
struct perf_sample *sample = iter->sample;
tools/perf/util/hist.c
1169
struct evsel *evsel = sample->evsel;
tools/perf/util/hist.c
1176
sample, true);
tools/perf/util/hist.c
1183
hist_entry__append_callchain(he, sample);
tools/perf/util/hist.c
1227
struct perf_sample *sample = iter->sample;
tools/perf/util/hist.c
1228
struct evsel *evsel = sample->evsel;
tools/perf/util/hist.c
1244
.raw_data = sample->raw_data,
tools/perf/util/hist.c
1245
.raw_size = sample->raw_size,
tools/perf/util/hist.c
1279
NULL, sample, false);
tools/perf/util/hist.c
1287
callchain_append(he->callchain, &cursor, sample->period);
tools/perf/util/hist.c
1344
err = sample__resolve_callchain(iter->sample, get_tls_callchain_cursor(), &iter->parent,
tools/perf/util/hist.c
2828
struct perf_sample *sample, bool nonany_branch_mode,
tools/perf/util/hist.c
2832
struct branch_entry *entries = perf_sample__branch_entries(sample);
tools/perf/util/hist.c
2836
bi = sample__resolve_bstack(sample, al);
tools/perf/util/hist.c
2853
bi[i].flags.cycles, sample->evsel,
tools/perf/util/hist.c
778
static void hists__res_sample(struct hist_entry *he, struct perf_sample *sample)
tools/perf/util/hist.c
789
r->time = sample->time;
tools/perf/util/hist.c
790
r->cpu = sample->cpu;
tools/perf/util/hist.c
791
r->tid = sample->tid;
tools/perf/util/hist.c
802
struct perf_sample *sample,
tools/perf/util/hist.c
814
.cgroup = sample->cgroup,
tools/perf/util/hist.c
826
.code_page_size = sample->code_page_size,
tools/perf/util/hist.c
830
.period = sample->period,
tools/perf/util/hist.c
831
.weight1 = sample->weight,
tools/perf/util/hist.c
832
.weight2 = sample->ins_lat,
tools/perf/util/hist.c
833
.weight3 = sample->weight3,
tools/perf/util/hist.c
843
.transaction = sample->transaction,
tools/perf/util/hist.c
844
.raw_data = sample->raw_data,
tools/perf/util/hist.c
845
.raw_size = sample->raw_size,
tools/perf/util/hist.c
847
.time = hist_time(sample->time),
tools/perf/util/hist.c
848
.weight = sample->weight,
tools/perf/util/hist.c
849
.ins_lat = sample->ins_lat,
tools/perf/util/hist.c
850
.weight3 = sample->weight3,
tools/perf/util/hist.c
851
.simd_flags = sample->simd_flags,
tools/perf/util/hist.c
857
hists__res_sample(he, sample);
tools/perf/util/hist.c
867
struct perf_sample *sample,
tools/perf/util/hist.c
871
sample, sample_self, NULL);
tools/perf/util/hist.c
881
struct perf_sample *sample,
tools/perf/util/hist.c
885
sample, sample_self, ops);
tools/perf/util/hist.c
922
struct perf_sample *sample = iter->sample;
tools/perf/util/hist.c
925
mi = sample__resolve_mem(sample, al);
tools/perf/util/hist.c
938
struct perf_sample *sample = iter->sample;
tools/perf/util/hist.c
939
struct hists *hists = evsel__hists(sample->evsel);
tools/perf/util/hist.c
945
cost = sample->weight;
tools/perf/util/hist.c
956
sample->period = cost;
tools/perf/util/hist.c
959
sample, true);
tools/perf/util/hist.c
971
struct evsel *evsel = iter->sample->evsel;
tools/perf/util/hist.c
981
err = hist_entry__append_callchain(he, iter->sample);
tools/perf/util/hist.c
994
struct perf_sample *sample = iter->sample;
tools/perf/util/hist.c
996
bi = sample__resolve_bstack(sample, al);
tools/perf/util/hist.h
159
struct perf_sample *sample;
tools/perf/util/hist.h
350
struct perf_sample *sample,
tools/perf/util/hist.h
360
struct perf_sample *sample,
tools/perf/util/hist.h
801
struct perf_sample *sample, bool nonany_branch_mode,
tools/perf/util/intel-bts.c
131
static int intel_bts_lost(struct intel_bts *bts, struct perf_sample *sample)
tools/perf/util/intel-bts.c
137
INTEL_BTS_ERR_LOST, sample->cpu, sample->pid,
tools/perf/util/intel-bts.c
138
sample->tid, 0, "Lost trace data", sample->time);
tools/perf/util/intel-bts.c
278
struct perf_sample sample;
tools/perf/util/intel-bts.c
284
perf_sample__init(&sample, /*all=*/true);
tools/perf/util/intel-bts.c
285
sample.ip = le64_to_cpu(branch->from);
tools/perf/util/intel-bts.c
286
sample.cpumode = intel_bts_cpumode(bts, sample.ip);
tools/perf/util/intel-bts.c
287
sample.pid = btsq->pid;
tools/perf/util/intel-bts.c
288
sample.tid = btsq->tid;
tools/perf/util/intel-bts.c
289
sample.addr = le64_to_cpu(branch->to);
tools/perf/util/intel-bts.c
290
sample.id = btsq->bts->branches_id;
tools/perf/util/intel-bts.c
291
sample.stream_id = btsq->bts->branches_id;
tools/perf/util/intel-bts.c
292
sample.period = 1;
tools/perf/util/intel-bts.c
293
sample.cpu = btsq->cpu;
tools/perf/util/intel-bts.c
294
sample.flags = btsq->sample_flags;
tools/perf/util/intel-bts.c
295
sample.insn_len = btsq->intel_pt_insn.length;
tools/perf/util/intel-bts.c
296
memcpy(sample.insn, btsq->intel_pt_insn.buf, INTEL_PT_INSN_BUF_SZ);
tools/perf/util/intel-bts.c
298
event.sample.header.type = PERF_RECORD_SAMPLE;
tools/perf/util/intel-bts.c
299
event.sample.header.misc = sample.cpumode;
tools/perf/util/intel-bts.c
300
event.sample.header.size = sizeof(struct perf_event_header);
tools/perf/util/intel-bts.c
303
event.sample.header.size = bts->branches_event_size;
tools/perf/util/intel-bts.c
307
&sample);
tools/perf/util/intel-bts.c
312
ret = perf_session__deliver_synth_event(bts->session, &event, &sample);
tools/perf/util/intel-bts.c
317
perf_sample__exit(&sample);
tools/perf/util/intel-bts.c
596
struct perf_sample *sample,
tools/perf/util/intel-bts.c
612
if (sample->time && sample->time != (u64)-1)
tools/perf/util/intel-bts.c
613
timestamp = perf_time_to_tsc(sample->time, &bts->tc);
tools/perf/util/intel-bts.c
633
err = intel_bts_lost(bts, sample);
tools/perf/util/intel-pt.c
1238
struct perf_sample *sample)
tools/perf/util/intel-pt.c
1241
sample->pid,
tools/perf/util/intel-pt.c
1242
sample->tid);
tools/perf/util/intel-pt.c
1244
thread_stack__sample_late(thread, sample->cpu, pt->chain,
tools/perf/util/intel-pt.c
1245
pt->synth_opts.callchain_sz + 1, sample->ip,
tools/perf/util/intel-pt.c
1248
sample->callchain = pt->chain;
tools/perf/util/intel-pt.c
1276
struct perf_sample *sample)
tools/perf/util/intel-pt.c
1279
sample->pid,
tools/perf/util/intel-pt.c
1280
sample->tid);
tools/perf/util/intel-pt.c
1282
thread_stack__br_sample_late(thread, sample->cpu, pt->br_stack,
tools/perf/util/intel-pt.c
1283
pt->br_stack_sz, sample->ip,
tools/perf/util/intel-pt.c
1286
sample->branch_stack = pt->br_stack;
tools/perf/util/intel-pt.c
1690
struct perf_sample *sample)
tools/perf/util/intel-pt.c
1692
event->sample.header.type = PERF_RECORD_SAMPLE;
tools/perf/util/intel-pt.c
1693
event->sample.header.size = sizeof(struct perf_event_header);
tools/perf/util/intel-pt.c
1695
sample->pid = ptq->pid;
tools/perf/util/intel-pt.c
1696
sample->tid = ptq->tid;
tools/perf/util/intel-pt.c
1701
sample->pid = ptq->guest_pid;
tools/perf/util/intel-pt.c
1702
sample->tid = ptq->guest_tid;
tools/perf/util/intel-pt.c
1703
sample->machine_pid = ptq->guest_machine_pid;
tools/perf/util/intel-pt.c
1704
sample->vcpu = ptq->vcpu;
tools/perf/util/intel-pt.c
1708
sample->cpu = ptq->cpu;
tools/perf/util/intel-pt.c
1709
sample->insn_len = ptq->insn_len;
tools/perf/util/intel-pt.c
1710
memcpy(sample->insn, ptq->insn, INTEL_PT_INSN_BUF_SZ);
tools/perf/util/intel-pt.c
1716
struct perf_sample *sample)
tools/perf/util/intel-pt.c
1718
intel_pt_prep_a_sample(ptq, event, sample);
tools/perf/util/intel-pt.c
1721
sample->time = tsc_to_perf_time(ptq->timestamp, &pt->tc);
tools/perf/util/intel-pt.c
1723
sample->ip = ptq->state->from_ip;
tools/perf/util/intel-pt.c
1724
sample->addr = ptq->state->to_ip;
tools/perf/util/intel-pt.c
1725
sample->cpumode = intel_pt_cpumode(ptq, sample->ip, sample->addr);
tools/perf/util/intel-pt.c
1726
sample->period = 1;
tools/perf/util/intel-pt.c
1727
sample->flags = ptq->flags;
tools/perf/util/intel-pt.c
1729
event->sample.header.misc = sample->cpumode;
tools/perf/util/intel-pt.c
1733
struct perf_sample *sample, u64 type)
tools/perf/util/intel-pt.c
1735
struct evsel *evsel = sample->evsel;
tools/perf/util/intel-pt.c
1740
evsel = evlist__id2evsel(pt->session->evlist, sample->id);
tools/perf/util/intel-pt.c
1746
sz = perf_event__sample_event_size(sample, type, /*read_format=*/0,
tools/perf/util/intel-pt.c
1755
branch_sample_type, sample);
tools/perf/util/intel-pt.c
1760
struct perf_sample *sample, u64 type)
tools/perf/util/intel-pt.c
1765
return intel_pt_inject_event(pt, event, sample, type);
tools/perf/util/intel-pt.c
1770
struct perf_sample *sample, u64 type)
tools/perf/util/intel-pt.c
1774
ret = intel_pt_opt_inject(pt, event, sample, type);
tools/perf/util/intel-pt.c
1778
ret = perf_session__deliver_synth_event(pt->session, event, sample);
tools/perf/util/intel-pt.c
1789
struct perf_sample sample;
tools/perf/util/intel-pt.c
1803
perf_sample__init(&sample, /*all=*/true);
tools/perf/util/intel-pt.c
1804
intel_pt_prep_b_sample(pt, ptq, event, &sample);
tools/perf/util/intel-pt.c
1806
sample.id = ptq->pt->branches_id;
tools/perf/util/intel-pt.c
1807
sample.stream_id = ptq->pt->branches_id;
tools/perf/util/intel-pt.c
1818
.from = sample.ip,
tools/perf/util/intel-pt.c
1819
.to = sample.addr,
tools/perf/util/intel-pt.c
1822
sample.branch_stack = (struct branch_stack *)&dummy_bs;
tools/perf/util/intel-pt.c
1826
sample.cyc_cnt = ptq->ipc_cyc_cnt - ptq->last_br_cyc_cnt;
tools/perf/util/intel-pt.c
1827
if (sample.cyc_cnt) {
tools/perf/util/intel-pt.c
1828
sample.insn_cnt = ptq->ipc_insn_cnt - ptq->last_br_insn_cnt;
tools/perf/util/intel-pt.c
1833
perf_sample__exit(&sample);
tools/perf/util/intel-pt.c
1834
ret = intel_pt_deliver_synth_event(pt, event, &sample,
tools/perf/util/intel-pt.c
1842
struct perf_sample *sample)
tools/perf/util/intel-pt.c
1844
intel_pt_prep_b_sample(pt, ptq, event, sample);
tools/perf/util/intel-pt.c
1849
sample->ip, pt->kernel_start);
tools/perf/util/intel-pt.c
1850
sample->callchain = ptq->chain;
tools/perf/util/intel-pt.c
1856
sample->branch_stack = ptq->last_branch;
tools/perf/util/intel-pt.c
1864
struct perf_sample sample;
tools/perf/util/intel-pt.c
1870
perf_sample__init(&sample, /*all=*/true);
tools/perf/util/intel-pt.c
1871
intel_pt_prep_sample(pt, ptq, event, &sample);
tools/perf/util/intel-pt.c
1873
sample.id = ptq->pt->instructions_id;
tools/perf/util/intel-pt.c
1874
sample.stream_id = ptq->pt->instructions_id;
tools/perf/util/intel-pt.c
1876
sample.period = 1;
tools/perf/util/intel-pt.c
1878
sample.period = ptq->state->tot_insn_cnt - ptq->last_insn_cnt;
tools/perf/util/intel-pt.c
1881
sample.cyc_cnt = ptq->ipc_cyc_cnt - ptq->last_in_cyc_cnt;
tools/perf/util/intel-pt.c
1882
if (sample.cyc_cnt) {
tools/perf/util/intel-pt.c
1883
sample.insn_cnt = ptq->ipc_insn_cnt - ptq->last_in_insn_cnt;
tools/perf/util/intel-pt.c
1890
ret = intel_pt_deliver_synth_event(pt, event, &sample,
tools/perf/util/intel-pt.c
1892
perf_sample__exit(&sample);
tools/perf/util/intel-pt.c
1900
struct perf_sample sample;
tools/perf/util/intel-pt.c
1910
perf_sample__init(&sample, /*all=*/true);
tools/perf/util/intel-pt.c
1911
intel_pt_prep_sample(pt, ptq, event, &sample);
tools/perf/util/intel-pt.c
1913
sample.id = ptq->pt->cycles_id;
tools/perf/util/intel-pt.c
1914
sample.stream_id = ptq->pt->cycles_id;
tools/perf/util/intel-pt.c
1915
sample.period = period;
tools/perf/util/intel-pt.c
1917
sample.cyc_cnt = period;
tools/perf/util/intel-pt.c
1918
sample.insn_cnt = ptq->ipc_insn_cnt - ptq->last_cy_insn_cnt;
tools/perf/util/intel-pt.c
1922
ret = intel_pt_deliver_synth_event(pt, event, &sample, pt->cycles_sample_type);
tools/perf/util/intel-pt.c
1923
perf_sample__exit(&sample);
tools/perf/util/intel-pt.c
1931
struct perf_sample sample;
tools/perf/util/intel-pt.c
1937
perf_sample__init(&sample, /*all=*/true);
tools/perf/util/intel-pt.c
1938
intel_pt_prep_sample(pt, ptq, event, &sample);
tools/perf/util/intel-pt.c
1940
sample.id = ptq->pt->transactions_id;
tools/perf/util/intel-pt.c
1941
sample.stream_id = ptq->pt->transactions_id;
tools/perf/util/intel-pt.c
1943
ret = intel_pt_deliver_synth_event(pt, event, &sample,
tools/perf/util/intel-pt.c
1945
perf_sample__exit(&sample);
tools/perf/util/intel-pt.c
1952
struct perf_sample *sample)
tools/perf/util/intel-pt.c
1954
intel_pt_prep_sample(pt, ptq, event, sample);
tools/perf/util/intel-pt.c
1960
if (!sample->ip)
tools/perf/util/intel-pt.c
1961
sample->flags = 0;
tools/perf/util/intel-pt.c
1968
struct perf_sample sample = { .ip = 0, };
tools/perf/util/intel-pt.c
1974
intel_pt_prep_p_sample(pt, ptq, event, &sample);
tools/perf/util/intel-pt.c
1976
sample.id = ptq->pt->ptwrites_id;
tools/perf/util/intel-pt.c
1977
sample.stream_id = ptq->pt->ptwrites_id;
tools/perf/util/intel-pt.c
1983
sample.raw_size = perf_synth__raw_size(raw);
tools/perf/util/intel-pt.c
1984
sample.raw_data = perf_synth__raw_data(&raw);
tools/perf/util/intel-pt.c
1986
return intel_pt_deliver_synth_event(pt, event, &sample,
tools/perf/util/intel-pt.c
1994
struct perf_sample sample;
tools/perf/util/intel-pt.c
2004
perf_sample__init(&sample, /*all=*/true);
tools/perf/util/intel-pt.c
2005
intel_pt_prep_p_sample(pt, ptq, event, &sample);
tools/perf/util/intel-pt.c
2007
sample.id = ptq->pt->cbr_id;
tools/perf/util/intel-pt.c
2008
sample.stream_id = ptq->pt->cbr_id;
tools/perf/util/intel-pt.c
2015
sample.raw_size = perf_synth__raw_size(raw);
tools/perf/util/intel-pt.c
2016
sample.raw_data = perf_synth__raw_data(&raw);
tools/perf/util/intel-pt.c
2018
ret = intel_pt_deliver_synth_event(pt, event, &sample,
tools/perf/util/intel-pt.c
2020
perf_sample__exit(&sample);
tools/perf/util/intel-pt.c
2028
struct perf_sample sample;
tools/perf/util/intel-pt.c
2035
perf_sample__init(&sample, /*all=*/true);
tools/perf/util/intel-pt.c
2036
intel_pt_prep_p_sample(pt, ptq, event, &sample);
tools/perf/util/intel-pt.c
2038
sample.id = ptq->pt->psb_id;
tools/perf/util/intel-pt.c
2039
sample.stream_id = ptq->pt->psb_id;
tools/perf/util/intel-pt.c
2040
sample.flags = 0;
tools/perf/util/intel-pt.c
2045
sample.raw_size = perf_synth__raw_size(raw);
tools/perf/util/intel-pt.c
2046
sample.raw_data = perf_synth__raw_data(&raw);
tools/perf/util/intel-pt.c
2048
ret = intel_pt_deliver_synth_event(pt, event, &sample,
tools/perf/util/intel-pt.c
2050
perf_sample__exit(&sample);
tools/perf/util/intel-pt.c
2058
struct perf_sample sample;
tools/perf/util/intel-pt.c
2065
perf_sample__init(&sample, /*all=*/true);
tools/perf/util/intel-pt.c
2066
intel_pt_prep_p_sample(pt, ptq, event, &sample);
tools/perf/util/intel-pt.c
2068
sample.id = ptq->pt->mwait_id;
tools/perf/util/intel-pt.c
2069
sample.stream_id = ptq->pt->mwait_id;
tools/perf/util/intel-pt.c
2074
sample.raw_size = perf_synth__raw_size(raw);
tools/perf/util/intel-pt.c
2075
sample.raw_data = perf_synth__raw_data(&raw);
tools/perf/util/intel-pt.c
2077
ret = intel_pt_deliver_synth_event(pt, event, &sample,
tools/perf/util/intel-pt.c
2079
perf_sample__exit(&sample);
tools/perf/util/intel-pt.c
2087
struct perf_sample sample;
tools/perf/util/intel-pt.c
2094
perf_sample__init(&sample, /*all=*/true);
tools/perf/util/intel-pt.c
2095
intel_pt_prep_p_sample(pt, ptq, event, &sample);
tools/perf/util/intel-pt.c
2097
sample.id = ptq->pt->pwre_id;
tools/perf/util/intel-pt.c
2098
sample.stream_id = ptq->pt->pwre_id;
tools/perf/util/intel-pt.c
2103
sample.raw_size = perf_synth__raw_size(raw);
tools/perf/util/intel-pt.c
2104
sample.raw_data = perf_synth__raw_data(&raw);
tools/perf/util/intel-pt.c
2106
ret = intel_pt_deliver_synth_event(pt, event, &sample,
tools/perf/util/intel-pt.c
2108
perf_sample__exit(&sample);
tools/perf/util/intel-pt.c
2116
struct perf_sample sample;
tools/perf/util/intel-pt.c
2123
perf_sample__init(&sample, /*all=*/true);
tools/perf/util/intel-pt.c
2124
intel_pt_prep_p_sample(pt, ptq, event, &sample);
tools/perf/util/intel-pt.c
2126
sample.id = ptq->pt->exstop_id;
tools/perf/util/intel-pt.c
2127
sample.stream_id = ptq->pt->exstop_id;
tools/perf/util/intel-pt.c
2132
sample.raw_size = perf_synth__raw_size(raw);
tools/perf/util/intel-pt.c
2133
sample.raw_data = perf_synth__raw_data(&raw);
tools/perf/util/intel-pt.c
2135
ret = intel_pt_deliver_synth_event(pt, event, &sample,
tools/perf/util/intel-pt.c
2137
perf_sample__exit(&sample);
tools/perf/util/intel-pt.c
2145
struct perf_sample sample;
tools/perf/util/intel-pt.c
2152
perf_sample__init(&sample, /*all=*/true);
tools/perf/util/intel-pt.c
2153
intel_pt_prep_p_sample(pt, ptq, event, &sample);
tools/perf/util/intel-pt.c
2155
sample.id = ptq->pt->pwrx_id;
tools/perf/util/intel-pt.c
2156
sample.stream_id = ptq->pt->pwrx_id;
tools/perf/util/intel-pt.c
2161
sample.raw_size = perf_synth__raw_size(raw);
tools/perf/util/intel-pt.c
2162
sample.raw_data = perf_synth__raw_data(&raw);
tools/perf/util/intel-pt.c
2164
ret = intel_pt_deliver_synth_event(pt, event, &sample,
tools/perf/util/intel-pt.c
2166
perf_sample__exit(&sample);
tools/perf/util/intel-pt.c
2439
struct perf_sample sample;
tools/perf/util/intel-pt.c
2444
u64 regs[8 * sizeof(sample.intr_regs->mask)];
tools/perf/util/intel-pt.c
2450
perf_sample__init(&sample, /*all=*/true);
tools/perf/util/intel-pt.c
2451
intel_pt_prep_a_sample(ptq, event, &sample);
tools/perf/util/intel-pt.c
2453
sample.id = id;
tools/perf/util/intel-pt.c
2454
sample.stream_id = id;
tools/perf/util/intel-pt.c
2457
sample.period = evsel->core.attr.sample_period;
tools/perf/util/intel-pt.c
2461
sample.ip = items->ip;
tools/perf/util/intel-pt.c
2463
sample.ip = items->rip;
tools/perf/util/intel-pt.c
2465
sample.ip = ptq->state->from_ip;
tools/perf/util/intel-pt.c
2467
cpumode = intel_pt_cpumode(ptq, sample.ip, 0);
tools/perf/util/intel-pt.c
2469
event->sample.header.misc = cpumode | PERF_RECORD_MISC_EXACT_IP;
tools/perf/util/intel-pt.c
2471
sample.cpumode = cpumode;
tools/perf/util/intel-pt.c
2481
sample.time = tsc_to_perf_time(timestamp, &pt->tc);
tools/perf/util/intel-pt.c
2487
pt->synth_opts.callchain_sz, sample.ip,
tools/perf/util/intel-pt.c
2489
sample.callchain = ptq->chain;
tools/perf/util/intel-pt.c
2497
struct regs_dump *intr_regs = perf_sample__intr_regs(&sample);
tools/perf/util/intel-pt.c
2521
sample.branch_stack = ptq->last_branch;
tools/perf/util/intel-pt.c
2525
sample.addr = items->mem_access_address;
tools/perf/util/intel-pt.c
2546
sample.weight = weight & 0xffff;
tools/perf/util/intel-pt.c
2547
sample.ins_lat = items->mem_access_latency & 0xffff;
tools/perf/util/intel-pt.c
2549
sample.weight = items->mem_access_latency;
tools/perf/util/intel-pt.c
2551
if (!sample.weight && items->has_tsx_aux_info) {
tools/perf/util/intel-pt.c
2553
sample.weight = (u32)items->tsx_aux_info;
tools/perf/util/intel-pt.c
2563
sample.data_src = intel_pt_get_data_src(items->mem_aux_info, data_src_fmt);
tools/perf/util/intel-pt.c
2565
sample.data_src = PERF_MEM_NA;
tools/perf/util/intel-pt.c
2577
sample.transaction = txn;
tools/perf/util/intel-pt.c
2580
ret = intel_pt_deliver_synth_event(pt, event, &sample,
tools/perf/util/intel-pt.c
2582
perf_sample__exit(&sample);
tools/perf/util/intel-pt.c
2630
struct perf_sample sample;
tools/perf/util/intel-pt.c
2640
perf_sample__init(&sample, /*all=*/true);
tools/perf/util/intel-pt.c
2641
intel_pt_prep_p_sample(pt, ptq, event, &sample);
tools/perf/util/intel-pt.c
2643
sample.id = ptq->pt->evt_id;
tools/perf/util/intel-pt.c
2644
sample.stream_id = ptq->pt->evt_id;
tools/perf/util/intel-pt.c
2658
sample.raw_size = perf_synth__raw_size(raw) +
tools/perf/util/intel-pt.c
2660
sample.raw_data = perf_synth__raw_data(&raw);
tools/perf/util/intel-pt.c
2662
ret = intel_pt_deliver_synth_event(pt, event, &sample,
tools/perf/util/intel-pt.c
2664
perf_sample__exit(&sample);
tools/perf/util/intel-pt.c
2672
struct perf_sample sample;
tools/perf/util/intel-pt.c
2679
perf_sample__init(&sample, /*all=*/true);
tools/perf/util/intel-pt.c
2680
intel_pt_prep_p_sample(pt, ptq, event, &sample);
tools/perf/util/intel-pt.c
2682
sample.id = ptq->pt->iflag_chg_id;
tools/perf/util/intel-pt.c
2683
sample.stream_id = ptq->pt->iflag_chg_id;
tools/perf/util/intel-pt.c
2692
sample.addr = 0;
tools/perf/util/intel-pt.c
2694
sample.flags = ptq->flags;
tools/perf/util/intel-pt.c
2696
sample.raw_size = perf_synth__raw_size(raw);
tools/perf/util/intel-pt.c
2697
sample.raw_data = perf_synth__raw_data(&raw);
tools/perf/util/intel-pt.c
2699
ret = intel_pt_deliver_synth_event(pt, event, &sample,
tools/perf/util/intel-pt.c
2701
perf_sample__exit(&sample);
tools/perf/util/intel-pt.c
291
struct perf_sample *sample)
tools/perf/util/intel-pt.c
297
intel_pt_dump(pt, sample->aux_sample.data, sample->aux_sample.size);
tools/perf/util/intel-pt.c
3311
struct perf_sample *sample)
tools/perf/util/intel-pt.c
3315
ptq->pid = sample->pid;
tools/perf/util/intel-pt.c
3316
ptq->tid = sample->tid;
tools/perf/util/intel-pt.c
3338
struct perf_sample *sample)
tools/perf/util/intel-pt.c
3344
queue = auxtrace_queues__sample_queue(&pt->queues, sample, pt->session);
tools/perf/util/intel-pt.c
3353
ptq->time = sample->time;
tools/perf/util/intel-pt.c
3354
intel_pt_sample_set_pid_tid_cpu(ptq, queue, sample);
tools/perf/util/intel-pt.c
3359
static int intel_pt_lost(struct intel_pt *pt, struct perf_sample *sample)
tools/perf/util/intel-pt.c
3361
return intel_pt_synth_error(pt, INTEL_PT_ERR_LOST, sample->cpu,
tools/perf/util/intel-pt.c
3362
sample->pid, sample->tid, 0, sample->time,
tools/perf/util/intel-pt.c
3363
sample->machine_pid, sample->vcpu);
tools/perf/util/intel-pt.c
3441
struct perf_sample *sample)
tools/perf/util/intel-pt.c
3445
struct evsel *evsel = evlist__id2evsel(pt->session->evlist, sample->id);
tools/perf/util/intel-pt.c
3450
tid = perf_sample__intval(sample, "next_pid");
tools/perf/util/intel-pt.c
3451
cpu = sample->cpu;
tools/perf/util/intel-pt.c
3454
cpu, tid, sample->time, perf_time_to_tsc(sample->time,
tools/perf/util/intel-pt.c
3457
ret = intel_pt_sync_switch(pt, cpu, tid, sample->time);
tools/perf/util/intel-pt.c
3466
struct perf_sample *sample)
tools/perf/util/intel-pt.c
3468
pid_t pid = sample->pid;
tools/perf/util/intel-pt.c
3469
pid_t tid = sample->tid;
tools/perf/util/intel-pt.c
3470
int cpu = sample->cpu;
tools/perf/util/intel-pt.c
3505
struct perf_sample *sample)
tools/perf/util/intel-pt.c
3509
struct machine *machine = machines__find(machines, sample->machine_pid);
tools/perf/util/intel-pt.c
3527
return machine__set_current_tid(machine, sample->vcpu, sample->pid, sample->tid);
tools/perf/util/intel-pt.c
3531
struct perf_sample *sample)
tools/perf/util/intel-pt.c
3538
return intel_pt_guest_context_switch(pt, event, sample);
tools/perf/util/intel-pt.c
3540
cpu = sample->cpu;
tools/perf/util/intel-pt.c
3544
return intel_pt_context_switch_in(pt, sample);
tools/perf/util/intel-pt.c
3554
pid = sample->pid;
tools/perf/util/intel-pt.c
3555
tid = sample->tid;
tools/perf/util/intel-pt.c
3561
ret = intel_pt_sync_switch(pt, cpu, tid, sample->time);
tools/perf/util/intel-pt.c
3570
struct perf_sample *sample)
tools/perf/util/intel-pt.c
3576
sample->cpu, event->itrace_start.pid,
tools/perf/util/intel-pt.c
3577
event->itrace_start.tid, sample->time,
tools/perf/util/intel-pt.c
3578
perf_time_to_tsc(sample->time, &pt->tc));
tools/perf/util/intel-pt.c
3580
return machine__set_current_tid(pt->machine, sample->cpu,
tools/perf/util/intel-pt.c
3630
struct perf_sample *sample)
tools/perf/util/intel-pt.c
3637
queue = auxtrace_queues__sample_queue(&pt->queues, sample, pt->session);
tools/perf/util/intel-pt.c
3638
evsel = evlist__id2evsel_strict(pt->session->evlist, sample->id);
tools/perf/util/intel-pt.c
3647
ptq->pebs[hw_id].id = sample->id;
tools/perf/util/intel-pt.c
3722
struct perf_sample *sample,
tools/perf/util/intel-pt.c
3738
if (sample->time && sample->time != (u64)-1)
tools/perf/util/intel-pt.c
3739
timestamp = perf_time_to_tsc(sample->time, &pt->tc);
tools/perf/util/intel-pt.c
3751
if (sample->aux_sample.size)
tools/perf/util/intel-pt.c
3753
sample);
tools/perf/util/intel-pt.c
3757
sample->time);
tools/perf/util/intel-pt.c
3768
if (pt->synth_opts.add_callchain && !sample->callchain)
tools/perf/util/intel-pt.c
3769
intel_pt_add_callchain(pt, sample);
tools/perf/util/intel-pt.c
3770
if (pt->synth_opts.add_last_branch && !sample->branch_stack)
tools/perf/util/intel-pt.c
3771
intel_pt_add_br_stack(pt, sample);
tools/perf/util/intel-pt.c
3777
err = intel_pt_lost(pt, sample);
tools/perf/util/intel-pt.c
3784
err = intel_pt_process_switch(pt, sample);
tools/perf/util/intel-pt.c
3788
err = intel_pt_process_itrace_start(pt, event, sample);
tools/perf/util/intel-pt.c
3790
err = intel_pt_process_aux_output_hw_id(pt, event, sample);
tools/perf/util/intel-pt.c
3793
err = intel_pt_context_switch(pt, event, sample);
tools/perf/util/intel-pt.c
3798
if (intel_pt_enable_logging && intel_pt_log_events(pt, sample->time)) {
tools/perf/util/intel-pt.c
3800
event->header.type, sample->cpu, sample->time, timestamp);
tools/perf/util/intel-pt.c
3912
struct perf_sample *sample,
tools/perf/util/intel-pt.c
3924
if (sample->time && sample->time != (u64)-1)
tools/perf/util/intel-pt.c
3925
timestamp = perf_time_to_tsc(sample->time, &pt->tc);
tools/perf/util/intel-pt.c
3929
return auxtrace_queues__add_sample(&pt->queues, session, sample,
tools/perf/util/intel-tpebs.c
167
static bool should_ignore_sample(const struct perf_sample *sample, const struct tpebs_retire_lat *t)
tools/perf/util/intel-tpebs.c
169
pid_t workload_pid, sample_pid = sample->pid;
tools/perf/util/intel-tpebs.c
191
struct perf_sample *sample,
tools/perf/util/intel-tpebs.c
202
t = tpebs_retire_lat__find(sample->evsel);
tools/perf/util/intel-tpebs.c
207
if (should_ignore_sample(sample, t)) {
tools/perf/util/intel-tpebs.c
216
t->last = sample->weight3;
tools/perf/util/intel-tpebs.c
217
update_stats(&t->stats, sample->weight3);
tools/perf/util/intel-tpebs.c
233
tool.sample = process_sample_event;
tools/perf/util/jitdump.c
427
struct perf_sample sample;
tools/perf/util/jitdump.c
521
perf_sample__init(&sample, /*all=*/true);
tools/perf/util/jitdump.c
522
sample.cpumode = PERF_RECORD_MISC_USER;
tools/perf/util/jitdump.c
523
sample.pid = pid;
tools/perf/util/jitdump.c
524
sample.tid = tid;
tools/perf/util/jitdump.c
525
sample.time = id->time;
tools/perf/util/jitdump.c
526
sample.ip = addr;
tools/perf/util/jitdump.c
528
ret = perf_event__process_mmap2(tool, event, &sample, jd->machine);
tools/perf/util/jitdump.c
555
perf_sample__exit(&sample);
tools/perf/util/jitdump.c
562
struct perf_sample sample;
tools/perf/util/jitdump.c
632
perf_sample__init(&sample, /*all=*/true);
tools/perf/util/jitdump.c
633
sample.cpumode = PERF_RECORD_MISC_USER;
tools/perf/util/jitdump.c
634
sample.pid = pid;
tools/perf/util/jitdump.c
635
sample.tid = tid;
tools/perf/util/jitdump.c
636
sample.time = id->time;
tools/perf/util/jitdump.c
637
sample.ip = jr->move.new_code_addr;
tools/perf/util/jitdump.c
639
ret = perf_event__process_mmap2(tool, event, &sample, jd->machine);
tools/perf/util/jitdump.c
645
build_id__mark_dso_hit(tool, event, &sample, jd->machine);
tools/perf/util/jitdump.c
647
perf_sample__exit(&sample);
tools/perf/util/kvm-stat-arch/kvm-stat-arm64.c
20
static void event_get_key(struct perf_sample *sample,
tools/perf/util/kvm-stat-arch/kvm-stat-arm64.c
24
key->key = perf_sample__intval(sample, kvm_exit_reason(EM_AARCH64));
tools/perf/util/kvm-stat-arch/kvm-stat-arm64.c
33
key->key = perf_sample__intval(sample, kvm_trap_exit_reason);
tools/perf/util/kvm-stat-arch/kvm-stat-arm64.c
38
static bool event_begin(struct perf_sample *sample,
tools/perf/util/kvm-stat-arch/kvm-stat-arm64.c
41
return evsel__name_is(sample->evsel, kvm_entry_trace(EM_AARCH64));
tools/perf/util/kvm-stat-arch/kvm-stat-arm64.c
44
static bool event_end(struct perf_sample *sample,
tools/perf/util/kvm-stat-arch/kvm-stat-arm64.c
47
if (evsel__name_is(sample->evsel, kvm_exit_trace(EM_AARCH64))) {
tools/perf/util/kvm-stat-arch/kvm-stat-arm64.c
48
event_get_key(sample, key);
tools/perf/util/kvm-stat-arch/kvm-stat-loongarch.c
56
static bool event_begin(struct perf_sample *sample, struct event_key *key)
tools/perf/util/kvm-stat-arch/kvm-stat-loongarch.c
58
return exit_event_begin(sample, key);
tools/perf/util/kvm-stat-arch/kvm-stat-loongarch.c
61
static bool event_end(struct perf_sample *sample,
tools/perf/util/kvm-stat-arch/kvm-stat-loongarch.c
72
return evsel__name_is(sample->evsel, kvm_entry_trace(EM_LOONGARCH)) ||
tools/perf/util/kvm-stat-arch/kvm-stat-loongarch.c
73
evsel__name_is(sample->evsel, kvm_reenter_trace);
tools/perf/util/kvm-stat-arch/kvm-stat-loongarch.c
76
static void event_gspr_get_key(struct perf_sample *sample, struct event_key *key)
tools/perf/util/kvm-stat-arch/kvm-stat-loongarch.c
81
insn = perf_sample__intval(sample, "inst_word");
tools/perf/util/kvm-stat-arch/kvm-stat-powerpc.c
31
static void hcall_event_get_key(struct perf_sample *sample,
tools/perf/util/kvm-stat-arch/kvm-stat-powerpc.c
35
key->key = perf_sample__intval(sample, "req");
tools/perf/util/kvm-stat-arch/kvm-stat-powerpc.c
53
static bool hcall_event_end(struct perf_sample *sample,
tools/perf/util/kvm-stat-arch/kvm-stat-powerpc.c
56
return evsel__name_is(sample->evsel, __kvm_events_tp[3]);
tools/perf/util/kvm-stat-arch/kvm-stat-powerpc.c
59
static bool hcall_event_begin(struct perf_sample *sample, struct event_key *key)
tools/perf/util/kvm-stat-arch/kvm-stat-powerpc.c
61
if (evsel__name_is(sample->evsel, __kvm_events_tp[2])) {
tools/perf/util/kvm-stat-arch/kvm-stat-powerpc.c
62
hcall_event_get_key(sample, key);
tools/perf/util/kvm-stat-arch/kvm-stat-riscv.c
23
static void event_get_key(struct perf_sample *sample,
tools/perf/util/kvm-stat-arch/kvm-stat-riscv.c
29
key->key = perf_sample__intval(sample, kvm_exit_reason(EM_RISCV)) & ~CAUSE_IRQ_FLAG(xlen);
tools/perf/util/kvm-stat-arch/kvm-stat-riscv.c
33
static bool event_begin(struct perf_sample *sample,
tools/perf/util/kvm-stat-arch/kvm-stat-riscv.c
36
return evsel__name_is(sample->evsel, kvm_entry_trace(EM_RISCV));
tools/perf/util/kvm-stat-arch/kvm-stat-riscv.c
39
static bool event_end(struct perf_sample *sample,
tools/perf/util/kvm-stat-arch/kvm-stat-riscv.c
42
if (evsel__name_is(sample->evsel, kvm_exit_trace(EM_RISCV))) {
tools/perf/util/kvm-stat-arch/kvm-stat-riscv.c
43
event_get_key(sample, key);
tools/perf/util/kvm-stat-arch/kvm-stat-s390.c
21
static void event_icpt_insn_get_key(struct perf_sample *sample,
tools/perf/util/kvm-stat-arch/kvm-stat-s390.c
26
insn = perf_sample__intval(sample, "instruction");
tools/perf/util/kvm-stat-arch/kvm-stat-s390.c
31
static void event_sigp_get_key(struct perf_sample *sample,
tools/perf/util/kvm-stat-arch/kvm-stat-s390.c
34
key->key = perf_sample__intval(sample, "order_code");
tools/perf/util/kvm-stat-arch/kvm-stat-s390.c
38
static void event_diag_get_key(struct perf_sample *sample,
tools/perf/util/kvm-stat-arch/kvm-stat-s390.c
41
key->key = perf_sample__intval(sample, "code");
tools/perf/util/kvm-stat-arch/kvm-stat-s390.c
45
static void event_icpt_prog_get_key(struct perf_sample *sample,
tools/perf/util/kvm-stat-arch/kvm-stat-s390.c
48
key->key = perf_sample__intval(sample, "code");
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
105
static bool ioport_event_end(struct perf_sample *sample, struct event_key *key __maybe_unused)
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
107
return kvm_entry_event(sample->evsel);
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
127
static void msr_event_get_key(struct perf_sample *sample, struct event_key *key)
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
129
key->key = perf_sample__intval(sample, "ecx");
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
130
key->info = perf_sample__intval(sample, "write");
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
133
static bool msr_event_begin(struct perf_sample *sample, struct event_key *key)
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
135
if (evsel__name_is(sample->evsel, "kvm:kvm_msr")) {
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
136
msr_event_get_key(sample, key);
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
143
static bool msr_event_end(struct perf_sample *sample, struct event_key *key __maybe_unused)
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
145
return kvm_entry_event(sample->evsel);
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
27
static void mmio_event_get_key(struct perf_sample *sample,
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
30
key->key = perf_sample__intval(sample, "gpa");
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
31
key->info = perf_sample__intval(sample, "type");
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
38
static bool mmio_event_begin(struct perf_sample *sample, struct event_key *key)
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
41
if (kvm_exit_event(sample->evsel))
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
45
if (evsel__name_is(sample->evsel, "kvm:kvm_mmio") &&
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
46
perf_sample__intval(sample, "type") == KVM_TRACE_MMIO_WRITE) {
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
47
mmio_event_get_key(sample, key);
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
54
static bool mmio_event_end(struct perf_sample *sample, struct event_key *key)
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
57
if (kvm_entry_event(sample->evsel))
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
61
if (evsel__name_is(sample->evsel, "kvm:kvm_mmio") &&
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
62
perf_sample__intval(sample, "type") == KVM_TRACE_MMIO_READ) {
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
63
mmio_event_get_key(sample, key);
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
87
static void ioport_event_get_key(struct perf_sample *sample,
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
90
key->key = perf_sample__intval(sample, "port");
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
91
key->info = perf_sample__intval(sample, "rw");
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
94
static bool ioport_event_begin(struct perf_sample *sample,
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
97
if (evsel__name_is(sample->evsel, "kvm:kvm_pio")) {
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
98
ioport_event_get_key(sample, key);
tools/perf/util/kvm-stat.c
14
void exit_event_get_key(struct perf_sample *sample,
tools/perf/util/kvm-stat.c
17
uint16_t e_machine = evsel__e_machine(sample->evsel, /*e_flags=*/NULL);
tools/perf/util/kvm-stat.c
20
key->key = perf_sample__intval(sample, kvm_exit_reason(e_machine));
tools/perf/util/kvm-stat.c
24
bool exit_event_begin(struct perf_sample *sample, struct event_key *key)
tools/perf/util/kvm-stat.c
26
if (kvm_exit_event(sample->evsel)) {
tools/perf/util/kvm-stat.c
27
exit_event_get_key(sample, key);
tools/perf/util/kvm-stat.c
41
bool exit_event_end(struct perf_sample *sample,
tools/perf/util/kvm-stat.c
44
return kvm_entry_event(sample->evsel);
tools/perf/util/kvm-stat.h
116
void exit_event_get_key(struct perf_sample *sample,
tools/perf/util/kvm-stat.h
118
bool exit_event_begin(struct perf_sample *sample,
tools/perf/util/kvm-stat.h
120
bool exit_event_end(struct perf_sample *sample,
tools/perf/util/kvm-stat.h
56
void (*get_key)(struct perf_sample *sample,
tools/perf/util/kvm-stat.h
62
bool (*is_begin_event)(struct perf_sample *sample,
tools/perf/util/kvm-stat.h
64
bool (*is_end_event)(struct perf_sample *sample, struct event_key *key);
tools/perf/util/kwork.h
161
struct perf_sample *sample,
tools/perf/util/kwork.h
179
struct perf_sample *sample, struct machine *machine);
tools/perf/util/kwork.h
183
struct perf_sample *sample, struct machine *machine);
tools/perf/util/kwork.h
187
struct perf_sample *sample, struct machine *machine);
tools/perf/util/kwork.h
191
struct perf_sample *sample, struct machine *machine);
tools/perf/util/libunwind-arch/libunwind-arch.c
246
struct perf_sample *sample, int max_stack,
tools/perf/util/libunwind-arch/libunwind-arch.c
252
return __libunwind_arch_unwind_info__new_arm(thread, sample, max_stack,
tools/perf/util/libunwind-arch/libunwind-arch.c
255
return __libunwind_arch_unwind_info__new_arm64(thread, sample, max_stack,
tools/perf/util/libunwind-arch/libunwind-arch.c
258
return __libunwind_arch_unwind_info__new_loongarch(thread, sample, max_stack,
tools/perf/util/libunwind-arch/libunwind-arch.c
261
return __libunwind_arch_unwind_info__new_mips(thread, sample, max_stack,
tools/perf/util/libunwind-arch/libunwind-arch.c
264
return __libunwind_arch_unwind_info__new_ppc32(thread, sample, max_stack,
tools/perf/util/libunwind-arch/libunwind-arch.c
267
return __libunwind_arch_unwind_info__new_ppc64(thread, sample, max_stack,
tools/perf/util/libunwind-arch/libunwind-arch.c
270
return __libunwind_arch_unwind_info__new_riscv(thread, sample, max_stack,
tools/perf/util/libunwind-arch/libunwind-arch.c
273
return __libunwind_arch_unwind_info__new_s390(thread, sample, max_stack,
tools/perf/util/libunwind-arch/libunwind-arch.c
276
return __libunwind_arch_unwind_info__new_i386(thread, sample, max_stack,
tools/perf/util/libunwind-arch/libunwind-arch.c
279
return __libunwind_arch_unwind_info__new_x86_64(thread, sample, max_stack,
tools/perf/util/libunwind-arch/libunwind-arch.h
17
struct perf_sample *sample;
tools/perf/util/libunwind-arch/libunwind-arch.h
226
struct perf_sample *sample,
tools/perf/util/libunwind-arch/libunwind-arch.h
231
struct perf_sample *sample,
tools/perf/util/libunwind-arch/libunwind-arch.h
236
struct perf_sample *sample,
tools/perf/util/libunwind-arch/libunwind-arch.h
241
struct perf_sample *sample,
tools/perf/util/libunwind-arch/libunwind-arch.h
246
struct perf_sample *sample,
tools/perf/util/libunwind-arch/libunwind-arch.h
251
struct perf_sample *sample,
tools/perf/util/libunwind-arch/libunwind-arch.h
256
struct perf_sample *sample,
tools/perf/util/libunwind-arch/libunwind-arch.h
261
struct perf_sample *sample,
tools/perf/util/libunwind-arch/libunwind-arch.h
266
struct perf_sample *sample,
tools/perf/util/libunwind-arch/libunwind-arch.h
271
struct perf_sample *sample,
tools/perf/util/libunwind-arch/libunwind-arch.h
276
struct perf_sample *sample,
tools/perf/util/libunwind-arch/libunwind-arm.c
211
struct perf_sample *sample __maybe_unused,
tools/perf/util/libunwind-arch/libunwind-arm.c
237
ui->ui.sample = sample;
tools/perf/util/libunwind-arch/libunwind-arm64.c
210
struct perf_sample *sample __maybe_unused,
tools/perf/util/libunwind-arch/libunwind-arm64.c
236
ui->ui.sample = sample;
tools/perf/util/libunwind-arch/libunwind-i386.c
233
struct perf_sample *sample __maybe_unused,
tools/perf/util/libunwind-arch/libunwind-i386.c
259
ui->ui.sample = sample;
tools/perf/util/libunwind-arch/libunwind-loongarch.c
218
struct perf_sample *sample __maybe_unused,
tools/perf/util/libunwind-arch/libunwind-loongarch.c
244
ui->ui.sample = sample;
tools/perf/util/libunwind-arch/libunwind-mips.c
220
struct perf_sample *sample __maybe_unused,
tools/perf/util/libunwind-arch/libunwind-mips.c
246
ui->ui.sample = sample;
tools/perf/util/libunwind-arch/libunwind-ppc32.c
224
struct perf_sample *sample __maybe_unused,
tools/perf/util/libunwind-arch/libunwind-ppc32.c
250
ui->ui.sample = sample;
tools/perf/util/libunwind-arch/libunwind-ppc64.c
224
struct perf_sample *sample __maybe_unused,
tools/perf/util/libunwind-arch/libunwind-ppc64.c
250
ui->ui.sample = sample;
tools/perf/util/libunwind-arch/libunwind-riscv.c
218
struct perf_sample *sample __maybe_unused,
tools/perf/util/libunwind-arch/libunwind-riscv.c
244
ui->ui.sample = sample;
tools/perf/util/libunwind-arch/libunwind-s390.c
220
struct perf_sample *sample __maybe_unused,
tools/perf/util/libunwind-arch/libunwind-s390.c
246
ui->ui.sample = sample;
tools/perf/util/libunwind-arch/libunwind-x86_64.c
242
struct perf_sample *sample __maybe_unused,
tools/perf/util/libunwind-arch/libunwind-x86_64.c
268
ui->ui.sample = sample;
tools/perf/util/machine.c
160
struct perf_sample *sample,
tools/perf/util/machine.c
163
return machine__process_mmap2_event(machine, event, sample);
tools/perf/util/machine.c
1773
struct perf_sample *sample)
tools/perf/util/machine.c
1794
if (sample->cpumode == PERF_RECORD_MISC_GUEST_KERNEL ||
tools/perf/util/machine.c
1795
sample->cpumode == PERF_RECORD_MISC_KERNEL) {
tools/perf/util/machine.c
1841
struct perf_sample *sample)
tools/perf/util/machine.c
1851
if (sample->cpumode == PERF_RECORD_MISC_GUEST_KERNEL ||
tools/perf/util/machine.c
1852
sample->cpumode == PERF_RECORD_MISC_KERNEL) {
tools/perf/util/machine.c
1904
struct perf_sample *sample)
tools/perf/util/machine.c
1959
thread__fork(thread, parent, sample->time, do_maps_clone) < 0) {
tools/perf/util/machine.c
1970
struct perf_sample *sample __maybe_unused)
tools/perf/util/machine.c
1992
struct perf_sample *sample)
tools/perf/util/machine.c
1998
ret = machine__process_comm_event(machine, event, sample); break;
tools/perf/util/machine.c
2000
ret = machine__process_mmap_event(machine, event, sample); break;
tools/perf/util/machine.c
2002
ret = machine__process_namespaces_event(machine, event, sample); break;
tools/perf/util/machine.c
2004
ret = machine__process_cgroup_event(machine, event, sample); break;
tools/perf/util/machine.c
2006
ret = machine__process_mmap2_event(machine, event, sample); break;
tools/perf/util/machine.c
2008
ret = machine__process_fork_event(machine, event, sample); break;
tools/perf/util/machine.c
2010
ret = machine__process_exit_event(machine, event, sample); break;
tools/perf/util/machine.c
2012
ret = machine__process_lost_event(machine, event, sample); break;
tools/perf/util/machine.c
2018
ret = machine__process_lost_samples_event(machine, event, sample); break;
tools/perf/util/machine.c
2023
ret = machine__process_ksymbol(machine, event, sample); break;
tools/perf/util/machine.c
2025
ret = machine__process_bpf(machine, event, sample); break;
tools/perf/util/machine.c
2027
ret = machine__process_text_poke(machine, event, sample); break;
tools/perf/util/machine.c
2091
struct mem_info *sample__resolve_mem(struct perf_sample *sample,
tools/perf/util/machine.c
2099
ip__resolve_ams(al->thread, mem_info__iaddr(mi), sample->ip);
tools/perf/util/machine.c
2101
sample->addr, sample->phys_addr,
tools/perf/util/machine.c
2102
sample->data_page_size);
tools/perf/util/machine.c
2103
mem_info__data_src(mi)->val = sample->data_src;
tools/perf/util/machine.c
2284
struct branch_info *sample__resolve_bstack(struct perf_sample *sample,
tools/perf/util/machine.c
2288
const struct branch_stack *bs = sample->branch_stack;
tools/perf/util/machine.c
2289
struct branch_entry *entries = perf_sample__branch_entries(sample);
tools/perf/util/machine.c
2290
u64 *branch_stack_cntr = sample->branch_stack_cntr;
tools/perf/util/machine.c
2372
struct perf_sample *sample,
tools/perf/util/machine.c
2379
struct ip_callchain *chain = sample->callchain;
tools/perf/util/machine.c
2438
struct perf_sample *sample,
tools/perf/util/machine.c
2445
struct branch_stack *lbr_stack = sample->branch_stack;
tools/perf/util/machine.c
2446
struct branch_entry *entries = perf_sample__branch_entries(sample);
tools/perf/util/machine.c
2473
if (sample->ip)
tools/perf/util/machine.c
2474
ip = sample->ip;
tools/perf/util/machine.c
2533
if (sample->ip)
tools/perf/util/machine.c
2534
ip = sample->ip;
tools/perf/util/machine.c
2706
struct perf_sample *sample,
tools/perf/util/machine.c
2714
struct ip_callchain *chain = sample->callchain;
tools/perf/util/machine.c
2730
if (thread__lbr_stitch_enable(thread) && !sample->no_hw_idx &&
tools/perf/util/machine.c
2734
stitched_lbr = has_stitched_lbr(thread, sample,
tools/perf/util/machine.c
2746
memcpy(&lbr_stitch->prev_sample, sample, sizeof(*sample));
tools/perf/util/machine.c
2751
err = lbr_callchain_add_kernel_ip(thread, cursor, sample,
tools/perf/util/machine.c
2757
err = lbr_callchain_add_lbr_ip(thread, cursor, sample, parent,
tools/perf/util/machine.c
2774
err = lbr_callchain_add_lbr_ip(thread, cursor, sample, parent,
tools/perf/util/machine.c
2780
err = lbr_callchain_add_kernel_ip(thread, cursor, sample,
tools/perf/util/machine.c
2813
static u64 get_leaf_frame_caller(struct perf_sample *sample,
tools/perf/util/machine.c
2817
return get_leaf_frame_caller_aarch64(sample, thread, usr_idx);
tools/perf/util/machine.c
2824
struct perf_sample *sample,
tools/perf/util/machine.c
2830
struct evsel *evsel = sample->evsel;
tools/perf/util/machine.c
2831
struct branch_stack *branch = sample->branch_stack;
tools/perf/util/machine.c
2832
struct branch_entry *entries = perf_sample__branch_entries(sample);
tools/perf/util/machine.c
2833
struct ip_callchain *chain = sample->callchain;
tools/perf/util/machine.c
2847
err = resolve_lbr_callchain_sample(thread, cursor, sample, parent,
tools/perf/util/machine.c
2977
leaf_frame_caller = get_leaf_frame_caller(sample, thread, usr_idx);
tools/perf/util/machine.c
3032
struct perf_sample *sample,
tools/perf/util/machine.c
3035
struct evsel *evsel = sample->evsel;
tools/perf/util/machine.c
3043
if (!sample->user_regs || !sample->user_regs->regs ||
tools/perf/util/machine.c
3044
!sample->user_stack.size)
tools/perf/util/machine.c
3051
thread, sample, max_stack, false);
tools/perf/util/machine.c
3056
struct perf_sample *sample,
tools/perf/util/machine.c
3071
sample,
tools/perf/util/machine.c
3077
sample,
tools/perf/util/machine.c
3081
sample,
tools/perf/util/machine.c
3086
sample,
tools/perf/util/machine.c
608
struct perf_sample *sample)
tools/perf/util/machine.c
623
__thread__set_comm(thread, event->comm.comm, sample->time, exec)) {
tools/perf/util/machine.c
635
struct perf_sample *sample __maybe_unused)
tools/perf/util/machine.c
654
thread__set_namespaces(thread, sample->time, &event->namespaces)) {
tools/perf/util/machine.c
666
struct perf_sample *sample __maybe_unused)
tools/perf/util/machine.c
681
union perf_event *event, struct perf_sample *sample __maybe_unused)
tools/perf/util/machine.c
689
union perf_event *event, struct perf_sample *sample)
tools/perf/util/machine.c
692
sample->id, event->lost_samples.lost,
tools/perf/util/machine.c
734
struct perf_sample *sample __maybe_unused)
tools/perf/util/machine.c
800
struct perf_sample *sample __maybe_unused)
tools/perf/util/machine.c
828
struct perf_sample *sample)
tools/perf/util/machine.c
844
sample);
tools/perf/util/machine.c
845
return machine__process_ksymbol_register(machine, event, sample);
tools/perf/util/machine.c
849
struct perf_sample *sample __maybe_unused)
tools/perf/util/machine.h
112
struct perf_sample *sample);
tools/perf/util/machine.h
114
struct perf_sample *sample);
tools/perf/util/machine.h
116
struct perf_sample *sample);
tools/perf/util/machine.h
118
struct perf_sample *sample);
tools/perf/util/machine.h
120
struct perf_sample *sample);
tools/perf/util/machine.h
131
struct perf_sample *sample);
tools/perf/util/machine.h
134
struct perf_sample *sample);
tools/perf/util/machine.h
136
struct perf_sample *sample);
tools/perf/util/machine.h
138
struct perf_sample *sample);
tools/perf/util/machine.h
141
struct perf_sample *sample);
tools/perf/util/machine.h
144
struct perf_sample *sample);
tools/perf/util/machine.h
146
struct perf_sample *sample);
tools/perf/util/machine.h
181
struct branch_info *sample__resolve_bstack(struct perf_sample *sample,
tools/perf/util/machine.h
183
struct mem_info *sample__resolve_mem(struct perf_sample *sample,
tools/perf/util/machine.h
190
struct perf_sample *sample,
tools/perf/util/machine.h
198
struct perf_sample *sample,
tools/perf/util/machine.h
205
sample,
tools/perf/util/machine.h
327
struct perf_sample *sample);
tools/perf/util/powerpc-vpadtl.c
184
struct perf_sample sample;
tools/perf/util/powerpc-vpadtl.c
188
perf_sample__init(&sample, /*all=*/true);
tools/perf/util/powerpc-vpadtl.c
189
sample.ip = be64_to_cpu(record->srr0);
tools/perf/util/powerpc-vpadtl.c
190
sample.period = 1;
tools/perf/util/powerpc-vpadtl.c
191
sample.cpu = cpu;
tools/perf/util/powerpc-vpadtl.c
192
sample.id = vpa->sample_id;
tools/perf/util/powerpc-vpadtl.c
193
sample.callchain = NULL;
tools/perf/util/powerpc-vpadtl.c
194
sample.branch_stack = NULL;
tools/perf/util/powerpc-vpadtl.c
196
sample.cpumode = PERF_RECORD_MISC_KERNEL;
tools/perf/util/powerpc-vpadtl.c
197
sample.time = save;
tools/perf/util/powerpc-vpadtl.c
198
sample.raw_data = record;
tools/perf/util/powerpc-vpadtl.c
199
sample.raw_size = sizeof(record);
tools/perf/util/powerpc-vpadtl.c
200
event.sample.header.type = PERF_RECORD_SAMPLE;
tools/perf/util/powerpc-vpadtl.c
201
event.sample.header.misc = sample.cpumode;
tools/perf/util/powerpc-vpadtl.c
202
event.sample.header.size = sizeof(struct perf_event_header);
tools/perf/util/powerpc-vpadtl.c
204
ret = perf_session__deliver_synth_event(vpa->session, &event, &sample);
tools/perf/util/powerpc-vpadtl.c
208
perf_sample__exit(&sample);
tools/perf/util/powerpc-vpadtl.c
515
struct perf_sample *sample,
tools/perf/util/powerpc-vpadtl.c
529
if (sample->time) {
tools/perf/util/powerpc-vpadtl.c
534
err = powerpc_vpadtl_process_queues(vpa, sample->time);
tools/perf/util/print_insn.c
26
size_t sample__fprintf_insn_raw(struct perf_sample *sample, FILE *fp)
tools/perf/util/print_insn.c
30
for (int i = 0; i < sample->insn_len; i++) {
tools/perf/util/print_insn.c
31
printed += fprintf(fp, "%02x", (unsigned char)sample->insn[i]);
tools/perf/util/print_insn.c
32
if (sample->insn_len - i > 1)
tools/perf/util/print_insn.c
58
size_t sample__fprintf_insn_asm(struct perf_sample *sample, struct thread *thread,
tools/perf/util/print_insn.c
65
printed = fprintf_insn_asm(machine, thread, sample->cpumode, is64bit,
tools/perf/util/print_insn.c
66
(uint8_t *)sample->insn, sample->insn_len,
tools/perf/util/print_insn.c
67
sample->ip, NULL, 0, fp);
tools/perf/util/print_insn.c
69
return sample__fprintf_insn_raw(sample, fp);
tools/perf/util/print_insn.h
18
size_t sample__fprintf_insn_asm(struct perf_sample *sample, struct thread *thread,
tools/perf/util/print_insn.h
20
size_t sample__fprintf_insn_raw(struct perf_sample *sample, FILE *fp);
tools/perf/util/python.c
1623
err = evsel__parse_sample(evsel, &pevent->event, &pevent->sample);
tools/perf/util/python.c
274
perf_sample__exit(&pevent->sample);
tools/perf/util/python.c
302
void *data = pe->sample.raw_data;
tools/perf/util/python.c
38
offsetof(struct pyrf_event, sample) + offsetof(struct perf_sample, member), \
tools/perf/util/python.c
44
struct perf_sample sample;
tools/perf/util/s390-cpumsf.c
197
struct perf_sample *sample)
tools/perf/util/s390-cpumsf.c
203
if (!sf->use_logfile || sf->queues.nr_queues <= sample->cpu)
tools/perf/util/s390-cpumsf.c
206
q = &sf->queues.queue_array[sample->cpu];
tools/perf/util/s390-cpumsf.c
216
sf->logdir, sample->cpu)
tools/perf/util/s390-cpumsf.c
217
: asprintf(&name, "aux.ctr.%02x", sample->cpu);
tools/perf/util/s390-cpumsf.c
230
size_t n = fwrite(sample->raw_data, sample->raw_size - 4, 1,
tools/perf/util/s390-cpumsf.c
507
struct perf_sample sample = {
tools/perf/util/s390-cpumsf.c
520
sample.cpumode = basic->P ? PERF_RECORD_MISC_USER
tools/perf/util/s390-cpumsf.c
523
sample.cpumode = basic->P ? PERF_RECORD_MISC_GUEST_USER
tools/perf/util/s390-cpumsf.c
527
sample.cpumode = basic->P ? PERF_RECORD_MISC_GUEST_USER
tools/perf/util/s390-cpumsf.c
530
sample.cpumode = basic->P ? PERF_RECORD_MISC_USER
tools/perf/util/s390-cpumsf.c
533
event.sample.header.type = PERF_RECORD_SAMPLE;
tools/perf/util/s390-cpumsf.c
534
event.sample.header.misc = sample.cpumode;
tools/perf/util/s390-cpumsf.c
535
event.sample.header.size = sizeof(struct perf_event_header);
tools/perf/util/s390-cpumsf.c
538
__func__, pos, sample.ip, basic->P, basic->CL, sample.pid,
tools/perf/util/s390-cpumsf.c
539
sample.tid, sample.cpumode, sample.cpu);
tools/perf/util/s390-cpumsf.c
540
ret = perf_session__deliver_synth_event(sfq->sf->session, &event, &sample);
tools/perf/util/s390-cpumsf.c
541
perf_sample__exit(&sample);
tools/perf/util/s390-cpumsf.c
906
static int s390_cpumsf_lost(struct s390_cpumsf *sf, struct perf_sample *sample)
tools/perf/util/s390-cpumsf.c
908
return s390_cpumsf_synth_error(sf, 1, sample->cpu,
tools/perf/util/s390-cpumsf.c
909
sample->pid, sample->tid, 0,
tools/perf/util/s390-cpumsf.c
910
sample->time);
tools/perf/util/s390-cpumsf.c
916
struct perf_sample *sample,
tools/perf/util/s390-cpumsf.c
922
u64 timestamp = sample->time;
tools/perf/util/s390-cpumsf.c
936
sample->raw_size) {
tools/perf/util/s390-cpumsf.c
941
err = s390_cpumcf_dumpctr(sf, sample);
tools/perf/util/s390-cpumsf.c
947
return s390_cpumsf_lost(sf, sample);
tools/perf/util/s390-sample-raw.c
225
static void s390_cpumcfdg_dump(struct perf_sample *sample)
tools/perf/util/s390-sample-raw.c
227
struct perf_pmu *pmu = sample->evsel->pmu;
tools/perf/util/s390-sample-raw.c
228
size_t i, len = sample->raw_size, offset = 0;
tools/perf/util/s390-sample-raw.c
229
unsigned char *buf = sample->raw_data;
tools/perf/util/s390-sample-raw.c
279
static bool s390_pai_all_test(struct perf_sample *sample)
tools/perf/util/s390-sample-raw.c
281
size_t len = sample->raw_size;
tools/perf/util/s390-sample-raw.c
288
static void s390_pai_all_dump(struct perf_sample *sample)
tools/perf/util/s390-sample-raw.c
290
struct evsel *evsel = sample->evsel;
tools/perf/util/s390-sample-raw.c
291
size_t len = sample->raw_size, offset = 0;
tools/perf/util/s390-sample-raw.c
292
unsigned char *p = sample->raw_data;
tools/perf/util/s390-sample-raw.c
334
struct perf_sample *sample)
tools/perf/util/s390-sample-raw.c
341
if (!sample->evsel) {
tools/perf/util/s390-sample-raw.c
342
sample->evsel = evlist__event2evsel(evlist, event);
tools/perf/util/s390-sample-raw.c
343
if (!sample->evsel)
tools/perf/util/s390-sample-raw.c
348
if (!sample->raw_size || !sample->raw_data)
tools/perf/util/s390-sample-raw.c
352
if (sample->evsel->core.attr.config == PERF_EVENT_CPUM_CF_DIAG) {
tools/perf/util/s390-sample-raw.c
353
if (!sample->evsel->pmu)
tools/perf/util/s390-sample-raw.c
354
sample->evsel->pmu = perf_pmus__find("cpum_cf");
tools/perf/util/s390-sample-raw.c
355
if (!s390_cpumcfdg_testctr(sample))
tools/perf/util/s390-sample-raw.c
358
s390_cpumcfdg_dump(sample);
tools/perf/util/s390-sample-raw.c
362
switch (sample->evsel->core.attr.config) {
tools/perf/util/s390-sample-raw.c
373
if (!s390_pai_all_test(sample)) {
tools/perf/util/s390-sample-raw.c
376
if (!sample->evsel->pmu)
tools/perf/util/s390-sample-raw.c
377
sample->evsel->pmu = perf_pmus__find_by_type(sample->evsel->core.attr.type);
tools/perf/util/s390-sample-raw.c
378
s390_pai_all_dump(sample);
tools/perf/util/s390-sample-raw.c
49
static bool s390_cpumcfdg_testctr(struct perf_sample *sample)
tools/perf/util/s390-sample-raw.c
51
size_t len = sample->raw_size, offset = 0;
tools/perf/util/s390-sample-raw.c
52
unsigned char *buf = sample->raw_data;
tools/perf/util/sample-raw.h
13
struct perf_sample *sample);
tools/perf/util/sample-raw.h
16
struct perf_sample *sample);
tools/perf/util/sample.c
105
if (!sample->ip || sample->insn_len != 0)
tools/perf/util/sample.c
110
len = thread__memcpy(thread, machine, sample->insn,
tools/perf/util/sample.c
111
sample->ip, len,
tools/perf/util/sample.c
116
sample->insn_len = len;
tools/perf/util/sample.c
122
ret = insn_decode(&insn, sample->insn, len,
tools/perf/util/sample.c
125
sample->insn_len = insn.length;
tools/perf/util/sample.c
17
void perf_sample__init(struct perf_sample *sample, bool all)
tools/perf/util/sample.c
20
memset(sample, 0, sizeof(*sample));
tools/perf/util/sample.c
22
sample->evsel = NULL;
tools/perf/util/sample.c
23
sample->user_regs = NULL;
tools/perf/util/sample.c
24
sample->intr_regs = NULL;
tools/perf/util/sample.c
25
sample->merged_callchain = false;
tools/perf/util/sample.c
26
sample->callchain = NULL;
tools/perf/util/sample.c
30
void perf_sample__exit(struct perf_sample *sample)
tools/perf/util/sample.c
32
zfree(&sample->user_regs);
tools/perf/util/sample.c
33
zfree(&sample->intr_regs);
tools/perf/util/sample.c
34
if (sample->merged_callchain) {
tools/perf/util/sample.c
35
zfree(&sample->callchain);
tools/perf/util/sample.c
36
sample->merged_callchain = false;
tools/perf/util/sample.c
40
struct regs_dump *perf_sample__user_regs(struct perf_sample *sample)
tools/perf/util/sample.c
42
if (!sample->user_regs) {
tools/perf/util/sample.c
43
sample->user_regs = zalloc(sizeof(*sample->user_regs));
tools/perf/util/sample.c
44
if (!sample->user_regs)
tools/perf/util/sample.c
47
return sample->user_regs;
tools/perf/util/sample.c
51
struct regs_dump *perf_sample__intr_regs(struct perf_sample *sample)
tools/perf/util/sample.c
53
if (!sample->intr_regs) {
tools/perf/util/sample.c
54
sample->intr_regs = zalloc(sizeof(*sample->intr_regs));
tools/perf/util/sample.c
55
if (!sample->intr_regs)
tools/perf/util/sample.c
58
return sample->intr_regs;
tools/perf/util/sample.c
97
void perf_sample__fetch_insn(struct perf_sample *sample,
tools/perf/util/sample.h
250
void perf_sample__init(struct perf_sample *sample, bool all);
tools/perf/util/sample.h
251
void perf_sample__exit(struct perf_sample *sample);
tools/perf/util/sample.h
252
struct regs_dump *perf_sample__user_regs(struct perf_sample *sample);
tools/perf/util/sample.h
253
struct regs_dump *perf_sample__intr_regs(struct perf_sample *sample);
tools/perf/util/sample.h
255
void perf_sample__fetch_insn(struct perf_sample *sample,
tools/perf/util/sample.h
263
static inline void *perf_sample__synth_ptr(struct perf_sample *sample)
tools/perf/util/sample.h
265
return sample->raw_data - 4;
tools/perf/util/scripting-engines/trace-event-perl.c
259
static SV *perl_process_callchain(struct perf_sample *sample,
tools/perf/util/scripting-engines/trace-event-perl.c
269
if (!symbol_conf.use_callchain || !sample->callchain)
tools/perf/util/scripting-engines/trace-event-perl.c
275
sample, NULL, NULL, scripting_max_stack) != 0) {
tools/perf/util/scripting-engines/trace-event-perl.c
341
static void perl_process_tracepoint(struct perf_sample *sample,
tools/perf/util/scripting-engines/trace-event-perl.c
351
int cpu = sample->cpu;
tools/perf/util/scripting-engines/trace-event-perl.c
352
void *data = sample->raw_data;
tools/perf/util/scripting-engines/trace-event-perl.c
353
unsigned long long nsecs = sample->time;
tools/perf/util/scripting-engines/trace-event-perl.c
356
struct evsel *evsel = sample->evsel;
tools/perf/util/scripting-engines/trace-event-perl.c
391
XPUSHs(sv_2mortal(perl_process_callchain(sample, al)));
tools/perf/util/scripting-engines/trace-event-perl.c
428
XPUSHs(sv_2mortal(perl_process_callchain(sample, al)));
tools/perf/util/scripting-engines/trace-event-perl.c
437
static void perl_process_event_generic(union perf_event *event, struct perf_sample *sample)
tools/perf/util/scripting-engines/trace-event-perl.c
448
XPUSHs(sv_2mortal(newSVpvn((const char *)&sample->evsel->core.attr,
tools/perf/util/scripting-engines/trace-event-perl.c
449
sizeof(sample->evsel->core.attr))));
tools/perf/util/scripting-engines/trace-event-perl.c
450
XPUSHs(sv_2mortal(newSVpvn((const char *)sample, sizeof(*sample))));
tools/perf/util/scripting-engines/trace-event-perl.c
451
XPUSHs(sv_2mortal(newSVpvn((const char *)sample->raw_data, sample->raw_size)));
tools/perf/util/scripting-engines/trace-event-perl.c
461
struct perf_sample *sample,
tools/perf/util/scripting-engines/trace-event-perl.c
465
scripting_context__update(scripting_context, event, sample, al, addr_al);
tools/perf/util/scripting-engines/trace-event-perl.c
466
perl_process_tracepoint(sample, al);
tools/perf/util/scripting-engines/trace-event-perl.c
467
perl_process_event_generic(event, sample);
tools/perf/util/scripting-engines/trace-event-python.c
1050
all_entries_dict = get_perf_sample_dict(sample, al, addr_al,
tools/perf/util/scripting-engines/trace-event-python.c
1068
static void python_process_tracepoint(struct perf_sample *sample __maybe_unused,
tools/perf/util/scripting-engines/trace-event-python.c
1310
tuple_set_d64(t, 1, es->sample->evsel->db_id);
tools/perf/util/scripting-engines/trace-event-python.c
1317
tuple_set_d64(t, 8, es->sample->ip);
tools/perf/util/scripting-engines/trace-event-python.c
1318
tuple_set_d64(t, 9, es->sample->time);
tools/perf/util/scripting-engines/trace-event-python.c
1319
tuple_set_s32(t, 10, es->sample->cpu);
tools/perf/util/scripting-engines/trace-event-python.c
1323
tuple_set_d64(t, 14, es->sample->addr);
tools/perf/util/scripting-engines/trace-event-python.c
1324
tuple_set_d64(t, 15, es->sample->period);
tools/perf/util/scripting-engines/trace-event-python.c
1325
tuple_set_d64(t, 16, es->sample->weight);
tools/perf/util/scripting-engines/trace-event-python.c
1326
tuple_set_d64(t, 17, es->sample->transaction);
tools/perf/util/scripting-engines/trace-event-python.c
1327
tuple_set_d64(t, 18, es->sample->data_src);
tools/perf/util/scripting-engines/trace-event-python.c
1328
tuple_set_s32(t, 19, es->sample->flags & PERF_BRANCH_MASK);
tools/perf/util/scripting-engines/trace-event-python.c
1329
tuple_set_s32(t, 20, !!(es->sample->flags & PERF_IP_FLAG_IN_TX));
tools/perf/util/scripting-engines/trace-event-python.c
1331
tuple_set_d64(t, 22, es->sample->insn_cnt);
tools/perf/util/scripting-engines/trace-event-python.c
1332
tuple_set_d64(t, 23, es->sample->cyc_cnt);
tools/perf/util/scripting-engines/trace-event-python.c
1333
tuple_set_s32(t, 24, es->sample->flags);
tools/perf/util/scripting-engines/trace-event-python.c
1334
tuple_set_d64(t, 25, es->sample->id);
tools/perf/util/scripting-engines/trace-event-python.c
1335
tuple_set_d64(t, 26, es->sample->stream_id);
tools/perf/util/scripting-engines/trace-event-python.c
1336
tuple_set_u32(t, 27, es->sample->ins_lat);
tools/perf/util/scripting-engines/trace-event-python.c
1351
tuple_set_d64(t, 1, es->sample->evsel->core.attr.config);
tools/perf/util/scripting-engines/trace-event-python.c
1352
tuple_set_bytes(t, 2, es->sample->raw_data, es->sample->raw_size);
tools/perf/util/scripting-engines/trace-event-python.c
1366
if (es->sample->evsel->core.attr.type == PERF_TYPE_SYNTH && tables->synth_handler)
tools/perf/util/scripting-engines/trace-event-python.c
1428
struct perf_sample *sample,
tools/perf/util/scripting-engines/trace-event-python.c
1439
tuple_set_d64(t, 2, sample->time);
tools/perf/util/scripting-engines/trace-event-python.c
1440
tuple_set_s32(t, 3, sample->cpu);
tools/perf/util/scripting-engines/trace-event-python.c
1462
static void python_process_general_event(struct perf_sample *sample,
tools/perf/util/scripting-engines/trace-event-python.c
1485
callchain = python_process_callchain(sample, al);
tools/perf/util/scripting-engines/trace-event-python.c
1486
dict = get_perf_sample_dict(sample, al, addr_al, callchain);
tools/perf/util/scripting-engines/trace-event-python.c
1498
struct perf_sample *sample,
tools/perf/util/scripting-engines/trace-event-python.c
1504
scripting_context__update(scripting_context, event, sample, al, addr_al);
tools/perf/util/scripting-engines/trace-event-python.c
1506
switch (sample->evsel->core.attr.type) {
tools/perf/util/scripting-engines/trace-event-python.c
1508
python_process_tracepoint(sample, al, addr_al);
tools/perf/util/scripting-engines/trace-event-python.c
1513
db_export__sample(&tables->dbe, event, sample, al, addr_al);
tools/perf/util/scripting-engines/trace-event-python.c
1515
python_process_general_event(sample, al, addr_al);
tools/perf/util/scripting-engines/trace-event-python.c
1520
struct perf_sample *sample,
tools/perf/util/scripting-engines/trace-event-python.c
1541
tuple_set_s32(t, 3, sample->cpu);
tools/perf/util/scripting-engines/trace-event-python.c
1542
tuple_set_s32(t, 4, sample->pid);
tools/perf/util/scripting-engines/trace-event-python.c
1543
tuple_set_s32(t, 5, sample->tid);
tools/perf/util/scripting-engines/trace-event-python.c
1551
struct perf_sample *sample,
tools/perf/util/scripting-engines/trace-event-python.c
1573
tuple_set_u64(t, 0, sample->time);
tools/perf/util/scripting-engines/trace-event-python.c
1574
tuple_set_s32(t, 1, sample->cpu);
tools/perf/util/scripting-engines/trace-event-python.c
1575
tuple_set_s32(t, 2, sample->pid);
tools/perf/util/scripting-engines/trace-event-python.c
1576
tuple_set_s32(t, 3, sample->tid);
tools/perf/util/scripting-engines/trace-event-python.c
1582
tuple_set_s32(t, 9, sample->machine_pid);
tools/perf/util/scripting-engines/trace-event-python.c
1583
tuple_set_s32(t, 10, sample->vcpu);
tools/perf/util/scripting-engines/trace-event-python.c
1591
struct perf_sample *sample,
tools/perf/util/scripting-engines/trace-event-python.c
1597
db_export__switch(&tables->dbe, event, sample, machine);
tools/perf/util/scripting-engines/trace-event-python.c
1599
python_do_process_switch(event, sample, machine);
tools/perf/util/scripting-engines/trace-event-python.c
1898
SET_TABLE_HANDLER(sample);
tools/perf/util/scripting-engines/trace-event-python.c
392
static PyObject *python_process_callchain(struct perf_sample *sample,
tools/perf/util/scripting-engines/trace-event-python.c
402
if (!symbol_conf.use_callchain || !sample->callchain)
tools/perf/util/scripting-engines/trace-event-python.c
407
sample, NULL, NULL,
tools/perf/util/scripting-engines/trace-event-python.c
483
static PyObject *python_process_brstack(struct perf_sample *sample,
tools/perf/util/scripting-engines/trace-event-python.c
486
struct branch_stack *br = sample->branch_stack;
tools/perf/util/scripting-engines/trace-event-python.c
487
struct branch_entry *entries = perf_sample__branch_entries(sample);
tools/perf/util/scripting-engines/trace-event-python.c
523
thread__find_map_fb(thread, sample->cpumode,
tools/perf/util/scripting-engines/trace-event-python.c
529
thread__find_map_fb(thread, sample->cpumode,
tools/perf/util/scripting-engines/trace-event-python.c
571
static PyObject *python_process_brstacksym(struct perf_sample *sample,
tools/perf/util/scripting-engines/trace-event-python.c
574
struct branch_stack *br = sample->branch_stack;
tools/perf/util/scripting-engines/trace-event-python.c
575
struct branch_entry *entries = perf_sample__branch_entries(sample);
tools/perf/util/scripting-engines/trace-event-python.c
596
thread__find_symbol_fb(thread, sample->cpumode,
tools/perf/util/scripting-engines/trace-event-python.c
602
thread__find_symbol_fb(thread, sample->cpumode,
tools/perf/util/scripting-engines/trace-event-python.c
653
static void set_sample_read_in_dict(PyObject *dict_sample, struct perf_sample *sample)
tools/perf/util/scripting-engines/trace-event-python.c
655
u64 read_format = sample->evsel->core.attr.read_format;
tools/perf/util/scripting-engines/trace-event-python.c
661
PyLong_FromUnsignedLongLong(sample->read.time_enabled));
tools/perf/util/scripting-engines/trace-event-python.c
666
PyLong_FromUnsignedLongLong(sample->read.time_running));
tools/perf/util/scripting-engines/trace-event-python.c
670
values = PyList_New(sample->read.group.nr);
tools/perf/util/scripting-engines/trace-event-python.c
678
struct sample_read_value *v = sample->read.group.values;
tools/perf/util/scripting-engines/trace-event-python.c
681
sample_read_group__for_each(v, sample->read.group.nr, read_format) {
tools/perf/util/scripting-engines/trace-event-python.c
687
PyObject *t = get_sample_value_as_tuple(&sample->read.one,
tools/perf/util/scripting-engines/trace-event-python.c
695
struct perf_sample *sample)
tools/perf/util/scripting-engines/trace-event-python.c
704
PyLong_FromUnsignedLongLong(sample->data_src));
tools/perf/util/scripting-engines/trace-event-python.c
706
mem_info__data_src(mi)->val = sample->data_src;
tools/perf/util/scripting-engines/trace-event-python.c
740
struct perf_sample *sample,
tools/perf/util/scripting-engines/trace-event-python.c
744
struct perf_event_attr *attr = &sample->evsel->core.attr;
tools/perf/util/scripting-engines/trace-event-python.c
749
if (sample->intr_regs) {
tools/perf/util/scripting-engines/trace-event-python.c
754
regs_map(sample->intr_regs, attr->sample_regs_intr, e_machine, e_flags, bf, size);
tools/perf/util/scripting-engines/trace-event-python.c
760
if (sample->user_regs) {
tools/perf/util/scripting-engines/trace-event-python.c
766
regs_map(sample->user_regs, attr->sample_regs_user, e_machine, e_flags, bf, size);
tools/perf/util/scripting-engines/trace-event-python.c
819
static void python_process_sample_flags(struct perf_sample *sample, PyObject *dict_sample)
tools/perf/util/scripting-engines/trace-event-python.c
823
set_sample_flags(dict_sample, sample->flags);
tools/perf/util/scripting-engines/trace-event-python.c
824
perf_sample__sprintf_flags(sample->flags, flags_disp, sizeof(flags_disp));
tools/perf/util/scripting-engines/trace-event-python.c
829
static PyObject *get_perf_sample_dict(struct perf_sample *sample,
tools/perf/util/scripting-engines/trace-event-python.c
837
struct evsel *evsel = sample->evsel;
tools/perf/util/scripting-engines/trace-event-python.c
851
PyLong_FromUnsignedLongLong(sample->id));
tools/perf/util/scripting-engines/trace-event-python.c
853
PyLong_FromUnsignedLongLong(sample->stream_id));
tools/perf/util/scripting-engines/trace-event-python.c
855
_PyLong_FromLong(sample->pid));
tools/perf/util/scripting-engines/trace-event-python.c
857
_PyLong_FromLong(sample->tid));
tools/perf/util/scripting-engines/trace-event-python.c
859
_PyLong_FromLong(sample->cpu));
tools/perf/util/scripting-engines/trace-event-python.c
861
PyLong_FromUnsignedLongLong(sample->ip));
tools/perf/util/scripting-engines/trace-event-python.c
863
PyLong_FromUnsignedLongLong(sample->time));
tools/perf/util/scripting-engines/trace-event-python.c
865
PyLong_FromUnsignedLongLong(sample->period));
tools/perf/util/scripting-engines/trace-event-python.c
867
PyLong_FromUnsignedLongLong(sample->phys_addr));
tools/perf/util/scripting-engines/trace-event-python.c
869
PyLong_FromUnsignedLongLong(sample->addr));
tools/perf/util/scripting-engines/trace-event-python.c
870
set_sample_read_in_dict(dict_sample, sample);
tools/perf/util/scripting-engines/trace-event-python.c
872
PyLong_FromUnsignedLongLong(sample->weight));
tools/perf/util/scripting-engines/trace-event-python.c
874
PyLong_FromUnsignedLong(sample->ins_lat));
tools/perf/util/scripting-engines/trace-event-python.c
876
PyLong_FromUnsignedLongLong(sample->transaction));
tools/perf/util/scripting-engines/trace-event-python.c
877
set_sample_datasrc_in_dict(dict_sample, sample);
tools/perf/util/scripting-engines/trace-event-python.c
881
(const char *)sample->raw_data, sample->raw_size));
tools/perf/util/scripting-engines/trace-event-python.c
889
brstack = python_process_brstack(sample, al->thread);
tools/perf/util/scripting-engines/trace-event-python.c
892
brstacksym = python_process_brstacksym(sample, al->thread);
tools/perf/util/scripting-engines/trace-event-python.c
895
if (sample->machine_pid) {
tools/perf/util/scripting-engines/trace-event-python.c
897
_PyLong_FromLong(sample->machine_pid));
tools/perf/util/scripting-engines/trace-event-python.c
899
_PyLong_FromLong(sample->vcpu));
tools/perf/util/scripting-engines/trace-event-python.c
903
_PyLong_FromLong((unsigned long)sample->cpumode));
tools/perf/util/scripting-engines/trace-event-python.c
913
if (sample->flags)
tools/perf/util/scripting-engines/trace-event-python.c
914
python_process_sample_flags(sample, dict_sample);
tools/perf/util/scripting-engines/trace-event-python.c
917
if (sample->insn_cnt && sample->cyc_cnt) {
tools/perf/util/scripting-engines/trace-event-python.c
919
PyLong_FromUnsignedLongLong(sample->insn_cnt));
tools/perf/util/scripting-engines/trace-event-python.c
921
PyLong_FromUnsignedLongLong(sample->cyc_cnt));
tools/perf/util/scripting-engines/trace-event-python.c
927
if (set_regs_in_dict(dict, sample, e_machine, e_flags))
tools/perf/util/scripting-engines/trace-event-python.c
934
static void python_process_tracepoint(struct perf_sample *sample,
tools/perf/util/scripting-engines/trace-event-python.c
946
int cpu = sample->cpu;
tools/perf/util/scripting-engines/trace-event-python.c
947
void *data = sample->raw_data;
tools/perf/util/scripting-engines/trace-event-python.c
948
unsigned long long nsecs = sample->time;
tools/perf/util/scripting-engines/trace-event-python.c
952
struct evsel *evsel = sample->evsel;
tools/perf/util/scripting-engines/trace-event-python.c
994
callchain = python_process_callchain(sample, al);
tools/perf/util/session.c
1270
static void callchain__lbr_callstack_printf(struct perf_sample *sample)
tools/perf/util/session.c
1272
struct ip_callchain *callchain = sample->callchain;
tools/perf/util/session.c
1273
struct branch_stack *lbr_stack = sample->branch_stack;
tools/perf/util/session.c
1274
struct branch_entry *entries = perf_sample__branch_entries(sample);
tools/perf/util/session.c
1341
struct perf_sample *sample)
tools/perf/util/session.c
1344
struct ip_callchain *callchain = sample->callchain;
tools/perf/util/session.c
1347
callchain__lbr_callstack_printf(sample);
tools/perf/util/session.c
1356
if (sample->deferred_callchain)
tools/perf/util/session.c
1360
static void branch_stack__printf(struct perf_sample *sample,
tools/perf/util/session.c
1363
struct branch_entry *entries = perf_sample__branch_entries(sample);
tools/perf/util/session.c
1365
u64 *branch_stack_cntr = sample->branch_stack_cntr;
tools/perf/util/session.c
1369
printf("%s: nr:%" PRIu64 "\n", "... branch stack", sample->branch_stack->nr);
tools/perf/util/session.c
1380
printf("%s: nr:%" PRIu64 "\n", "... branch callstack", sample->branch_stack->nr+1);
tools/perf/util/session.c
1383
for (i = 0; i < sample->branch_stack->nr; i++) {
tools/perf/util/session.c
1413
sample->branch_stack->nr, br_cntr_width, br_cntr_nr);
tools/perf/util/session.c
1414
for (i = 0; i < sample->branch_stack->nr; i++)
tools/perf/util/session.c
1458
static void regs_user__printf(struct perf_sample *sample, uint16_t e_machine, uint32_t e_flags)
tools/perf/util/session.c
1462
if (!sample->user_regs)
tools/perf/util/session.c
1465
user_regs = perf_sample__user_regs(sample);
tools/perf/util/session.c
1471
static void regs_intr__printf(struct perf_sample *sample, uint16_t e_machine, uint32_t e_flags)
tools/perf/util/session.c
1475
if (!sample->intr_regs)
tools/perf/util/session.c
1478
intr_regs = perf_sample__intr_regs(sample);
tools/perf/util/session.c
1490
static void evlist__print_tstamp(struct evlist *evlist, union perf_event *event, struct perf_sample *sample)
tools/perf/util/session.c
1501
printf("%u ", sample->cpu);
tools/perf/util/session.c
1504
printf("%" PRIu64 " ", sample->time);
tools/perf/util/session.c
1507
static void sample_read__printf(struct perf_sample *sample, u64 read_format)
tools/perf/util/session.c
1513
sample->read.time_enabled);
tools/perf/util/session.c
1517
sample->read.time_running);
tools/perf/util/session.c
1520
struct sample_read_value *value = sample->read.group.values;
tools/perf/util/session.c
1522
printf(".... group nr %" PRIu64 "\n", sample->read.group.nr);
tools/perf/util/session.c
1524
sample_read_group__for_each(value, sample->read.group.nr, read_format) {
tools/perf/util/session.c
1534
sample->read.one.id, sample->read.one.value);
tools/perf/util/session.c
1536
printf(", lost %" PRIu64, sample->read.one.lost);
tools/perf/util/session.c
1542
u64 file_offset, struct perf_sample *sample,
tools/perf/util/session.c
1553
evlist->trace_event_sample_raw(evlist, event, sample);
tools/perf/util/session.c
1555
if (sample)
tools/perf/util/session.c
1556
evlist__print_tstamp(evlist, event, sample);
tools/perf/util/session.c
1571
struct perf_sample *sample)
tools/perf/util/session.c
1573
struct evsel *evsel = sample->evsel;
tools/perf/util/session.c
1585
struct thread *thread = machine__find_thread(machine, sample->pid, sample->pid);
tools/perf/util/session.c
1591
event->header.misc, sample->pid, sample->tid, sample->ip,
tools/perf/util/session.c
1592
sample->period, sample->addr);
tools/perf/util/session.c
1595
callchain__printf(evsel, sample);
tools/perf/util/session.c
1598
branch_stack__printf(sample, evsel);
tools/perf/util/session.c
1601
regs_user__printf(sample, e_machine, e_flags);
tools/perf/util/session.c
1604
regs_intr__printf(sample, e_machine, e_flags);
tools/perf/util/session.c
1607
stack_user__printf(&sample->user_stack);
tools/perf/util/session.c
1610
printf("... weight: %" PRIu64 "", sample->weight);
tools/perf/util/session.c
1612
printf(",0x%"PRIx16"", sample->ins_lat);
tools/perf/util/session.c
1613
printf(",0x%"PRIx16"", sample->weight3);
tools/perf/util/session.c
1619
printf(" . data_src: 0x%"PRIx64"\n", sample->data_src);
tools/perf/util/session.c
1622
printf(" .. phys_addr: 0x%"PRIx64"\n", sample->phys_addr);
tools/perf/util/session.c
1625
printf(" .. data page size: %s\n", get_page_size_name(sample->data_page_size, str));
tools/perf/util/session.c
1628
printf(" .. code page size: %s\n", get_page_size_name(sample->code_page_size, str));
tools/perf/util/session.c
1631
printf("... transaction: %" PRIx64 "\n", sample->transaction);
tools/perf/util/session.c
1634
sample_read__printf(sample, evsel->core.attr.read_format);
tools/perf/util/session.c
1637
static void dump_deferred_callchain(union perf_event *event, struct perf_sample *sample)
tools/perf/util/session.c
1639
struct evsel *evsel = sample->evsel;
tools/perf/util/session.c
1645
event->header.misc, sample->pid, sample->tid, sample->deferred_cookie);
tools/perf/util/session.c
1648
callchain__printf(evsel, sample);
tools/perf/util/session.c
1702
struct perf_sample *sample)
tools/perf/util/session.c
1705
((sample->cpumode == PERF_RECORD_MISC_GUEST_KERNEL) ||
tools/perf/util/session.c
1706
(sample->cpumode == PERF_RECORD_MISC_GUEST_USER))) {
tools/perf/util/session.c
1709
if (sample->machine_pid)
tools/perf/util/session.c
1710
pid = sample->machine_pid;
tools/perf/util/session.c
1715
pid = sample->pid;
tools/perf/util/session.c
1733
struct perf_sample *sample,
tools/perf/util/session.c
1739
struct evsel *saved_evsel = sample->evsel;
tools/perf/util/session.c
1744
storage = perf_sample_id__get_period_storage(sid, sample->tid, per_thread);
tools/perf/util/session.c
1748
sample->id = v->id;
tools/perf/util/session.c
1749
sample->period = v->value - *storage;
tools/perf/util/session.c
1762
if (!sample->period)
tools/perf/util/session.c
1765
sample->evsel = container_of(sid->evsel, struct evsel, core);
tools/perf/util/session.c
1766
ret = tool->sample(tool, event, sample, machine);
tools/perf/util/session.c
1767
sample->evsel = saved_evsel;
tools/perf/util/session.c
1774
struct perf_sample *sample,
tools/perf/util/session.c
1780
struct sample_read_value *v = sample->read.group.values;
tools/perf/util/session.c
1783
return deliver_sample_value(evlist, tool, event, sample, v, machine,
tools/perf/util/session.c
1786
sample_read_group__for_each(v, sample->read.group.nr, read_format) {
tools/perf/util/session.c
1787
ret = deliver_sample_value(evlist, tool, event, sample, v,
tools/perf/util/session.c
1797
union perf_event *event, struct perf_sample *sample,
tools/perf/util/session.c
1800
struct evsel *evsel = sample->evsel;
tools/perf/util/session.c
1808
return tool->sample(tool, event, sample, machine);
tools/perf/util/session.c
1812
return deliver_sample_group(evlist, tool, event, sample,
tools/perf/util/session.c
1815
return deliver_sample_value(evlist, tool, event, sample,
tools/perf/util/session.c
1816
&sample->read.one, machine,
tools/perf/util/session.c
1838
struct perf_sample *sample,
tools/perf/util/session.c
1845
struct evsel *saved_evsel = sample->evsel;
tools/perf/util/session.c
1847
sample->evsel = evlist__id2evsel(evlist, sample->id);
tools/perf/util/session.c
1848
ret = tool->callchain_deferred(tool, event, sample, machine);
tools/perf/util/session.c
1849
sample->evsel = saved_evsel;
tools/perf/util/session.c
1865
if (sample->tid != orig_sample.tid) {
tools/perf/util/session.c
1871
sample__merge_deferred_callchain(&orig_sample, sample);
tools/perf/util/session.c
1903
struct perf_sample sample;
tools/perf/util/session.c
1905
perf_sample__init(&sample, /*all=*/false);
tools/perf/util/session.c
1906
ret = evlist__parse_sample(evlist, de->event, &sample);
tools/perf/util/session.c
1909
perf_sample__exit(&sample);
tools/perf/util/session.c
1912
sample.file_offset = de->file_offset;
tools/perf/util/session.c
1914
sample.evsel = evlist__id2evsel(evlist, sample.id);
tools/perf/util/session.c
1916
&sample, machine);
tools/perf/util/session.c
1918
perf_sample__exit(&sample);
tools/perf/util/session.c
1952
struct perf_sample *sample,
tools/perf/util/session.c
1958
dump_event(evlist, event, file_offset, sample, file_path);
tools/perf/util/session.c
1960
if (!sample->evsel)
tools/perf/util/session.c
1961
sample->evsel = evlist__id2evsel(evlist, sample->id);
tools/perf/util/session.c
1963
assert(sample->evsel == evlist__id2evsel(evlist, sample->id));
tools/perf/util/session.c
1965
machine = machines__find_for_cpumode(machines, event, sample);
tools/perf/util/session.c
1969
if (sample->evsel == NULL) {
tools/perf/util/session.c
1975
dump_sample(machine, event, sample);
tools/perf/util/session.c
1978
dump_sample(machine, event, sample);
tools/perf/util/session.c
1979
if (sample->deferred_callchain && tool->merge_deferred_callchains) {
tools/perf/util/session.c
1992
de->file_offset = sample->file_offset;
tools/perf/util/session.c
1996
return evlist__deliver_sample(evlist, tool, event, sample, machine);
tools/perf/util/session.c
2002
return tool->mmap(tool, event, sample, machine);
tools/perf/util/session.c
2010
return tool->mmap2(tool, event, sample, machine);
tools/perf/util/session.c
2016
return tool->comm(tool, event, sample, machine);
tools/perf/util/session.c
2036
return tool->namespaces(tool, event, sample, machine);
tools/perf/util/session.c
2043
return tool->cgroup(tool, event, sample, machine);
tools/perf/util/session.c
2045
return tool->fork(tool, event, sample, machine);
tools/perf/util/session.c
2047
return tool->exit(tool, event, sample, machine);
tools/perf/util/session.c
2051
return tool->lost(tool, event, sample, machine);
tools/perf/util/session.c
2057
return tool->lost_samples(tool, event, sample, machine);
tools/perf/util/session.c
2059
dump_read(sample->evsel, event);
tools/perf/util/session.c
2060
return tool->read(tool, event, sample, machine);
tools/perf/util/session.c
2062
return tool->throttle(tool, event, sample, machine);
tools/perf/util/session.c
2064
return tool->unthrottle(tool, event, sample, machine);
tools/perf/util/session.c
2074
return tool->aux(tool, event, sample, machine);
tools/perf/util/session.c
2076
return tool->itrace_start(tool, event, sample, machine);
tools/perf/util/session.c
2079
return tool->context_switch(tool, event, sample, machine);
tools/perf/util/session.c
2085
return tool->ksymbol(tool, event, sample, machine);
tools/perf/util/session.c
2087
return tool->bpf(tool, event, sample, machine);
tools/perf/util/session.c
2099
return tool->text_poke(tool, event, sample, machine);
tools/perf/util/session.c
2102
return tool->aux_output_hw_id(tool, event, sample, machine);
tools/perf/util/session.c
2104
dump_deferred_callchain(event, sample);
tools/perf/util/session.c
2106
sample, machine);
tools/perf/util/session.c
2119
struct perf_sample sample;
tools/perf/util/session.c
2123
perf_sample__init(&sample, /*all=*/false);
tools/perf/util/session.c
2132
ret = evsel__parse_sample(evsel, event, &sample);
tools/perf/util/session.c
2139
sample.file_offset = file_offset;
tools/perf/util/session.c
2146
if (perf_guest && sample.id) {
tools/perf/util/session.c
2147
struct perf_sample_id *sid = evlist__id2sid(session->evlist, sample.id);
tools/perf/util/session.c
2150
sample.machine_pid = sid->machine_pid;
tools/perf/util/session.c
2151
sample.vcpu = sid->vcpu.cpu;
tools/perf/util/session.c
2199
if (sample.cpu >= (u32)nr_cpus_avail &&
tools/perf/util/session.c
2200
sample.cpu != (u32)-1) {
tools/perf/util/session.c
2214
file_offset, sample.cpu, nr_cpus_avail);
tools/perf/util/session.c
2215
sample.cpu = 0;
tools/perf/util/session.c
2219
ret = auxtrace__process_event(session, event, &sample, tool);
tools/perf/util/session.c
2228
event, &sample, tool, file_offset, file_path);
tools/perf/util/session.c
2230
if (dump_trace && sample.aux_sample.size)
tools/perf/util/session.c
2231
auxtrace__dump_auxtrace_sample(session, &sample);
tools/perf/util/session.c
2233
perf_sample__exit(&sample);
tools/perf/util/session.c
2245
struct perf_sample sample;
tools/perf/util/session.c
2249
perf_sample__init(&sample, /*all=*/true);
tools/perf/util/session.c
2253
dump_event(session->evlist, event, file_offset, &sample, file_path);
tools/perf/util/session.c
2446
dump_event(session->evlist, event, file_offset, &sample, file_path);
tools/perf/util/session.c
2509
perf_sample__exit(&sample);
tools/perf/util/session.c
2515
struct perf_sample *sample)
tools/perf/util/session.c
2525
return machines__deliver_event(&session->machines, evlist, event, sample, tool, 0, NULL);
tools/perf/util/session.c
2691
struct perf_sample *sample)
tools/perf/util/session.c
2793
if (sample && event->header.type < PERF_RECORD_USER_TYPE_START &&
tools/perf/util/session.c
2794
evlist__parse_sample(session->evlist, event, sample))
tools/perf/util/session.h
128
struct perf_sample *sample);
tools/perf/util/session.h
200
struct perf_sample *sample);
tools/perf/util/synthetic-events.c
1458
size_t perf_event__sample_event_size(const struct perf_sample *sample, u64 type, u64 read_format,
tools/perf/util/synthetic-events.c
1499
result += sz * sample->read.group.nr;
tools/perf/util/synthetic-events.c
1508
sz = (sample->callchain->nr + 1) * sizeof(u64);
tools/perf/util/synthetic-events.c
1514
result += sample->raw_size;
tools/perf/util/synthetic-events.c
1518
sz = sample->branch_stack->nr * sizeof(struct branch_entry);
tools/perf/util/synthetic-events.c
1527
if (sample->user_regs && sample->user_regs->abi) {
tools/perf/util/synthetic-events.c
1529
sz = hweight64(sample->user_regs->mask) * sizeof(u64);
tools/perf/util/synthetic-events.c
1537
sz = sample->user_stack.size;
tools/perf/util/synthetic-events.c
1555
if (sample->intr_regs && sample->intr_regs->abi) {
tools/perf/util/synthetic-events.c
1557
sz = hweight64(sample->intr_regs->mask) * sizeof(u64);
tools/perf/util/synthetic-events.c
1578
result += sample->aux_sample.size;
tools/perf/util/synthetic-events.c
1597
const struct perf_sample *sample)
tools/perf/util/synthetic-events.c
1600
struct sample_read_value *v = sample->read.group.values;
tools/perf/util/synthetic-events.c
1602
sample_read_group__for_each(v, sample->read.group.nr, read_format) {
tools/perf/util/synthetic-events.c
1611
u64 branch_sample_type, const struct perf_sample *sample)
tools/perf/util/synthetic-events.c
1621
array = event->sample.array;
tools/perf/util/synthetic-events.c
1624
*array = sample->id;
tools/perf/util/synthetic-events.c
1629
*array = sample->ip;
tools/perf/util/synthetic-events.c
1634
u.val32[0] = sample->pid;
tools/perf/util/synthetic-events.c
1635
u.val32[1] = sample->tid;
tools/perf/util/synthetic-events.c
1641
*array = sample->time;
tools/perf/util/synthetic-events.c
1646
*array = sample->addr;
tools/perf/util/synthetic-events.c
1651
*array = sample->id;
tools/perf/util/synthetic-events.c
1656
*array = sample->stream_id;
tools/perf/util/synthetic-events.c
1661
u.val32[0] = sample->cpu;
tools/perf/util/synthetic-events.c
1668
*array = sample->period;
tools/perf/util/synthetic-events.c
1674
*array = sample->read.group.nr;
tools/perf/util/synthetic-events.c
1676
*array = sample->read.one.value;
tools/perf/util/synthetic-events.c
1680
*array = sample->read.time_enabled;
tools/perf/util/synthetic-events.c
1685
*array = sample->read.time_running;
tools/perf/util/synthetic-events.c
1692
sample);
tools/perf/util/synthetic-events.c
1694
*array = sample->read.one.id;
tools/perf/util/synthetic-events.c
1698
*array = sample->read.one.lost;
tools/perf/util/synthetic-events.c
1705
sz = (sample->callchain->nr + 1) * sizeof(u64);
tools/perf/util/synthetic-events.c
1706
memcpy(array, sample->callchain, sz);
tools/perf/util/synthetic-events.c
1713
*array32 = sample->raw_size;
tools/perf/util/synthetic-events.c
1716
memcpy(array32, sample->raw_data, sample->raw_size);
tools/perf/util/synthetic-events.c
1717
array = (void *)(array32 + (sample->raw_size / sizeof(u32)));
tools/perf/util/synthetic-events.c
1724
sz = sample->branch_stack->nr * sizeof(struct branch_entry);
tools/perf/util/synthetic-events.c
1726
*array++ = sample->branch_stack->nr;
tools/perf/util/synthetic-events.c
1729
if (sample->no_hw_idx)
tools/perf/util/synthetic-events.c
1732
*array++ = sample->branch_stack->hw_idx;
tools/perf/util/synthetic-events.c
1735
memcpy(array, perf_sample__branch_entries((struct perf_sample *)sample), sz);
tools/perf/util/synthetic-events.c
1740
if (sample->user_regs && sample->user_regs->abi) {
tools/perf/util/synthetic-events.c
1741
*array++ = sample->user_regs->abi;
tools/perf/util/synthetic-events.c
1742
sz = hweight64(sample->user_regs->mask) * sizeof(u64);
tools/perf/util/synthetic-events.c
1743
memcpy(array, sample->user_regs->regs, sz);
tools/perf/util/synthetic-events.c
1751
sz = sample->user_stack.size;
tools/perf/util/synthetic-events.c
1754
memcpy(array, sample->user_stack.data, sz);
tools/perf/util/synthetic-events.c
1761
perf_synthesize_sample_weight(sample, array, type);
tools/perf/util/synthetic-events.c
1766
*array = sample->data_src;
tools/perf/util/synthetic-events.c
1771
*array = sample->transaction;
tools/perf/util/synthetic-events.c
1776
if (sample->intr_regs && sample->intr_regs->abi) {
tools/perf/util/synthetic-events.c
1777
*array++ = sample->intr_regs->abi;
tools/perf/util/synthetic-events.c
1778
sz = hweight64(sample->intr_regs->mask) * sizeof(u64);
tools/perf/util/synthetic-events.c
1779
memcpy(array, sample->intr_regs->regs, sz);
tools/perf/util/synthetic-events.c
1787
*array = sample->phys_addr;
tools/perf/util/synthetic-events.c
1792
*array = sample->cgroup;
tools/perf/util/synthetic-events.c
1797
*array = sample->data_page_size;
tools/perf/util/synthetic-events.c
1802
*array = sample->code_page_size;
tools/perf/util/synthetic-events.c
1807
sz = sample->aux_sample.size;
tools/perf/util/synthetic-events.c
1809
memcpy(array, sample->aux_sample.data, sz);
tools/perf/util/synthetic-events.c
1816
int perf_event__synthesize_id_sample(__u64 *array, u64 type, const struct perf_sample *sample)
tools/perf/util/synthetic-events.c
1827
u.val32[0] = sample->pid;
tools/perf/util/synthetic-events.c
1828
u.val32[1] = sample->tid;
tools/perf/util/synthetic-events.c
1834
*array = sample->time;
tools/perf/util/synthetic-events.c
1839
*array = sample->id;
tools/perf/util/synthetic-events.c
1844
*array = sample->stream_id;
tools/perf/util/synthetic-events.c
1849
u.val32[0] = sample->cpu;
tools/perf/util/synthetic-events.c
1856
*array = sample->id;
tools/perf/util/synthetic-events.c
2280
struct perf_sample *sample,
tools/perf/util/synthetic-events.c
2289
u64 sample_type = sample->evsel ? sample->evsel->core.attr.sample_type : 0;
tools/perf/util/synthetic-events.c
2315
ret = perf_event__synthesize_id_sample(array, sample_type, sample);
tools/perf/util/synthetic-events.c
2325
return process(tool, &ev, sample, machine);
tools/perf/util/synthetic-events.c
2329
struct perf_sample *sample,
tools/perf/util/synthetic-events.c
2342
u64 sample_type = sample->evsel ? sample->evsel->core.attr.sample_type : 0;
tools/perf/util/synthetic-events.c
2379
ret = perf_event__synthesize_id_sample(array, sample_type, sample);
tools/perf/util/synthetic-events.c
2390
return process(tool, &ev, sample, machine);
tools/perf/util/synthetic-events.h
45
struct perf_sample *sample, struct machine *machine);
tools/perf/util/synthetic-events.h
50
struct perf_sample *sample,
tools/perf/util/synthetic-events.h
57
struct perf_sample *sample,
tools/perf/util/synthetic-events.h
76
int perf_event__synthesize_id_sample(__u64 *array, u64 type, const struct perf_sample *sample);
tools/perf/util/synthetic-events.h
83
u64 branch_sample_type, const struct perf_sample *sample);
tools/perf/util/synthetic-events.h
99
size_t perf_event__sample_event_size(const struct perf_sample *sample, u64 type,
tools/perf/util/thread-stack.c
1020
struct perf_sample *sample, u64 ref)
tools/perf/util/thread-stack.c
1033
ret_addr = sample->ip + sample->insn_len;
tools/perf/util/thread-stack.c
1035
return thread_stack__push_cp(ts, ret_addr, sample->time, ref, cp,
tools/perf/util/thread-stack.c
1050
struct perf_sample *sample,
tools/perf/util/thread-stack.c
1091
sample->addr, ts->kernel_start);
tools/perf/util/thread-stack.c
1102
struct perf_sample *sample,
tools/perf/util/thread-stack.c
1107
struct thread_stack *ts = thread__stack(thread, sample->cpu);
tools/perf/util/thread-stack.c
1118
ts = thread_stack__new(thread, sample->cpu, crp, true, 0);
tools/perf/util/thread-stack.c
1138
err = thread_stack__bottom(ts, sample, from_al, to_al, ref);
tools/perf/util/thread-stack.c
1144
ts->insn_count += sample->insn_cnt;
tools/perf/util/thread-stack.c
1145
ts->cyc_count += sample->cyc_cnt;
tools/perf/util/thread-stack.c
1146
ts->last_time = sample->time;
tools/perf/util/thread-stack.c
1148
if (sample->flags & PERF_IP_FLAG_CALL) {
tools/perf/util/thread-stack.c
1149
bool trace_end = sample->flags & PERF_IP_FLAG_TRACE_END;
tools/perf/util/thread-stack.c
1154
if (!sample->ip || !sample->addr)
tools/perf/util/thread-stack.c
1157
ret_addr = sample->ip + sample->insn_len;
tools/perf/util/thread-stack.c
1158
if (ret_addr == sample->addr)
tools/perf/util/thread-stack.c
1162
to_al->sym, sample->addr,
tools/perf/util/thread-stack.c
1164
err = thread_stack__push_cp(ts, ret_addr, sample->time, ref,
tools/perf/util/thread-stack.c
1176
} else if (sample->flags & PERF_IP_FLAG_RETURN) {
tools/perf/util/thread-stack.c
1177
if (!sample->addr) {
tools/perf/util/thread-stack.c
1181
if (!(sample->flags & return_from_kernel))
tools/perf/util/thread-stack.c
1185
return thread_stack__pop_ks(thread, ts, sample, ref);
tools/perf/util/thread-stack.c
1188
if (!sample->ip)
tools/perf/util/thread-stack.c
1193
ts->stack[ts->cnt - 1].ret_addr != sample->addr)
tools/perf/util/thread-stack.c
1194
return thread_stack__x86_retpoline(ts, sample, to_al);
tools/perf/util/thread-stack.c
1196
err = thread_stack__pop_cp(thread, ts, sample->addr,
tools/perf/util/thread-stack.c
1197
sample->time, ref, from_al->sym);
tools/perf/util/thread-stack.c
1201
err = thread_stack__no_call_return(thread, ts, sample,
tools/perf/util/thread-stack.c
1204
} else if (sample->flags & PERF_IP_FLAG_TRACE_BEGIN) {
tools/perf/util/thread-stack.c
1205
err = thread_stack__trace_begin(thread, ts, sample->time, ref);
tools/perf/util/thread-stack.c
1206
} else if (sample->flags & PERF_IP_FLAG_TRACE_END) {
tools/perf/util/thread-stack.c
1207
err = thread_stack__trace_end(ts, sample, ref);
tools/perf/util/thread-stack.c
1208
} else if (sample->flags & PERF_IP_FLAG_BRANCH &&
tools/perf/util/thread-stack.c
1221
to_al->sym, sample->addr,
tools/perf/util/thread-stack.c
1223
err = thread_stack__push_cp(ts, 0, sample->time, ref, cp, false,
tools/perf/util/thread-stack.c
860
struct perf_sample *sample,
tools/perf/util/thread-stack.c
869
if (sample->ip) {
tools/perf/util/thread-stack.c
870
ip = sample->ip;
tools/perf/util/thread-stack.c
872
} else if (sample->addr) {
tools/perf/util/thread-stack.c
873
ip = sample->addr;
tools/perf/util/thread-stack.c
882
return thread_stack__push_cp(ts, ip, sample->time, ref, cp,
tools/perf/util/thread-stack.c
887
struct perf_sample *sample, u64 ref)
tools/perf/util/thread-stack.c
889
u64 tm = sample->time;
tools/perf/util/thread-stack.c
905
struct perf_sample *sample,
tools/perf/util/thread-stack.c
915
u64 addr = sample->addr;
tools/perf/util/thread-stack.c
916
u64 tm = sample->time;
tools/perf/util/thread-stack.c
917
u64 ip = sample->ip;
tools/perf/util/thread-stack.c
922
err = thread_stack__pop_ks(thread, ts, sample, ref);
tools/perf/util/thread-stack.c
934
err = thread_stack__pop_ks(thread, ts, sample, ref);
tools/perf/util/thread-stack.h
105
struct perf_sample *sample,
tools/perf/util/thread.h
396
struct perf_sample *sample);
tools/perf/util/tool.c
161
struct perf_sample *sample __maybe_unused,
tools/perf/util/tool.c
170
struct perf_sample *sample __maybe_unused,
tools/perf/util/tool.c
338
tool->sample = process_event_sample_stub;
tools/perf/util/tool.c
399
struct perf_sample *sample, \
tools/perf/util/tool.c
404
return delegate->name(delegate, event, sample, machine); \
tools/perf/util/tool.c
407
CREATE_DELEGATE_SAMPLE(sample);
tools/perf/util/tool.c
436
struct perf_sample *sample, \
tools/perf/util/tool.c
441
return delegate->name(delegate, event, sample, machine); \
tools/perf/util/tool.c
525
tool->tool.sample = delegate_sample;
tools/perf/util/tool.h
104
struct perf_sample *sample,
tools/perf/util/tool.h
18
struct perf_sample *sample,
tools/perf/util/tool.h
22
struct perf_sample *sample, struct machine *machine);
tools/perf/util/tool.h
45
event_sample sample,
tools/perf/util/trace-event-scripting.c
105
struct perf_sample *sample,
tools/perf/util/trace-event-scripting.c
110
const struct tep_event *tp_format = evsel__tp_format(sample->evsel);
tools/perf/util/trace-event-scripting.c
116
c->event_data = sample->raw_data;
tools/perf/util/trace-event-scripting.c
118
c->sample = sample;
tools/perf/util/trace-event-scripting.c
134
struct perf_sample *sample __maybe_unused,
tools/perf/util/trace-event.h
100
struct perf_sample *sample,
tools/perf/util/trace-event.h
108
struct perf_sample *sample,
tools/perf/util/trace-event.h
125
struct perf_sample *sample;
tools/perf/util/trace-event.h
133
struct perf_sample *sample,
tools/perf/util/trace-event.h
96
struct perf_sample *sample,
tools/perf/util/unwind-libdw.c
216
struct stack_dump *stack = &ui->sample->user_stack;
tools/perf/util/unwind-libdw.c
221
if (!ui->sample->user_regs)
tools/perf/util/unwind-libdw.c
224
ret = perf_reg_value(&start, ui->sample->user_regs,
tools/perf/util/unwind-libdw.c
257
struct regs_dump *user_regs = perf_sample__user_regs(ui->sample);
tools/perf/util/unwind-libdw.c
366
.sample = data,
tools/perf/util/unwind-libdw.h
16
struct perf_sample *sample;
tools/perf/util/unwind-libunwind.c
475
struct stack_dump *stack = &ui->sample->user_stack;
tools/perf/util/unwind-libunwind.c
481
if (__write || !stack || !ui->sample->user_regs || !ui->sample->user_regs->regs) {
tools/perf/util/unwind-libunwind.c
488
ret = perf_reg_value(&start, perf_sample__user_regs(ui->sample),
tools/perf/util/unwind-libunwind.c
531
if (!ui->sample->user_regs || !ui->sample->user_regs->regs) {
tools/perf/util/unwind-libunwind.c
540
ret = perf_reg_value(&val, perf_sample__user_regs(ui->sample), id);
tools/perf/util/unwind-libunwind.c
616
struct perf_sample *sample, int max_stack,
tools/perf/util/unwind-libunwind.c
624
if (!sample->user_regs || !sample->user_regs->regs)
tools/perf/util/unwind-libunwind.c
636
ret = perf_reg_value(&first_ip, perf_sample__user_regs(sample),
tools/perf/util/unwind-libunwind.c
647
ui = libunwind_arch_unwind_info__new(thread, sample, max_stack, best_effort, e_machine, first_ip);
tools/testing/selftests/bpf/benchs/bench_bpf_timing.c
56
__u64 sample = t->samples[cpu][i];
tools/testing/selftests/bpf/benchs/bench_bpf_timing.c
58
if (sample == 0)
tools/testing/selftests/bpf/benchs/bench_bpf_timing.c
60
out[total++] = (double)sample / timed_iters;
tools/testing/selftests/bpf/prog_tests/ringbuf.c
144
const size_t rec_sz = BPF_RINGBUF_HDR_SZ + sizeof(struct sample);
tools/testing/selftests/bpf/prog_tests/ringbuf.c
397
struct sample *s = data;
tools/testing/selftests/bpf/prog_tests/ringbuf.c
449
struct sample *s;
tools/testing/selftests/bpf/prog_tests/ringbuf.c
47
struct sample *s = data;
tools/testing/selftests/bpf/prog_tests/ringbuf_multi.c
19
struct sample *s = data;
tools/testing/selftests/bpf/prog_tests/user_ringbuf.c
23
static const long c_sample_size = sizeof(struct sample) + BPF_RINGBUF_HDR_SZ;
tools/testing/selftests/bpf/prog_tests/user_ringbuf.c
311
void *sample;
tools/testing/selftests/bpf/prog_tests/user_ringbuf.c
317
sample = user_ring_buffer__reserve(ringbuf, c_ringbuf_size - BPF_RINGBUF_HDR_SZ);
tools/testing/selftests/bpf/prog_tests/user_ringbuf.c
318
if (!ASSERT_OK_PTR(sample, "full_sample"))
tools/testing/selftests/bpf/prog_tests/user_ringbuf.c
321
user_ring_buffer__submit(ringbuf, sample);
tools/testing/selftests/bpf/prog_tests/user_ringbuf.c
335
struct sample *sample;
tools/testing/selftests/bpf/prog_tests/user_ringbuf.c
343
sample = user_ring_buffer__reserve(ringbuf, sizeof(*sample) + 1);
tools/testing/selftests/bpf/prog_tests/user_ringbuf.c
344
ASSERT_OK_PTR(sample, "reserve_autoaligned");
tools/testing/selftests/bpf/prog_tests/user_ringbuf.c
345
user_ring_buffer__submit(ringbuf, sample);
tools/testing/selftests/bpf/prog_tests/user_ringbuf.c
37
struct sample *entry;
tools/testing/selftests/bpf/progs/bpf_cc_cubic.c
157
void BPF_PROG(bpf_cubic_acked, struct sock *sk, const struct ack_sample *sample)
tools/testing/selftests/bpf/progs/bpf_cc_cubic.c
159
cubictcp_acked(sk, sample);
tools/testing/selftests/bpf/progs/bpf_cc_cubic.c
30
extern void cubictcp_acked(struct sock *sk, const struct ack_sample *sample) __ksym;
tools/testing/selftests/bpf/progs/bpf_cubic.c
507
void BPF_PROG(bpf_cubic_acked, struct sock *sk, const struct ack_sample *sample)
tools/testing/selftests/bpf/progs/bpf_cubic.c
515
if (sample->rtt_us < 0)
tools/testing/selftests/bpf/progs/bpf_cubic.c
522
delay = sample->rtt_us;
tools/testing/selftests/bpf/progs/bpf_qdisc_fq.c
440
unsigned long sample;
tools/testing/selftests/bpf/progs/bpf_qdisc_fq.c
445
sample = (unsigned long)(now - q.time_next_delayed_flow);
tools/testing/selftests/bpf/progs/bpf_qdisc_fq.c
447
q.unthrottle_latency_ns += sample >> 3;
tools/testing/selftests/bpf/progs/dynptr_fail.c
100
bpf_ringbuf_reserve_dynptr(&ringbuf, sizeof(*sample), 0, &ptr1);
tools/testing/selftests/bpf/progs/dynptr_fail.c
101
bpf_ringbuf_reserve_dynptr(&ringbuf, sizeof(*sample), 0, &ptr2);
tools/testing/selftests/bpf/progs/dynptr_fail.c
103
sample = bpf_dynptr_data(&ptr1, 0, sizeof(*sample));
tools/testing/selftests/bpf/progs/dynptr_fail.c
104
if (!sample) {
tools/testing/selftests/bpf/progs/dynptr_fail.c
176
struct sample *sample;
tools/testing/selftests/bpf/progs/dynptr_fail.c
178
bpf_ringbuf_reserve_dynptr(&ringbuf, sizeof(*sample), 0, &ptr);
tools/testing/selftests/bpf/progs/dynptr_fail.c
179
sample = bpf_dynptr_data(&ptr, 0, sizeof(*sample));
tools/testing/selftests/bpf/progs/dynptr_fail.c
180
if (!sample)
tools/testing/selftests/bpf/progs/dynptr_fail.c
183
sample->pid = 123;
tools/testing/selftests/bpf/progs/dynptr_fail.c
186
bpf_ringbuf_submit(sample, 0);
tools/testing/selftests/bpf/progs/dynptr_fail.c
318
struct sample *sample;
tools/testing/selftests/bpf/progs/dynptr_fail.c
320
bpf_ringbuf_reserve_dynptr(&ringbuf, sizeof(*sample), 0, &ptr);
tools/testing/selftests/bpf/progs/dynptr_fail.c
321
sample = bpf_dynptr_data(&ptr, 0, sizeof(*sample));
tools/testing/selftests/bpf/progs/dynptr_fail.c
322
if (!sample)
tools/testing/selftests/bpf/progs/dynptr_fail.c
325
sample->pid = 123;
tools/testing/selftests/bpf/progs/dynptr_fail.c
330
val = sample->pid;
tools/testing/selftests/bpf/progs/dynptr_fail.c
350
struct sample *sample;
tools/testing/selftests/bpf/progs/dynptr_fail.c
353
bpf_ringbuf_reserve_dynptr(&ringbuf, sizeof(*sample), 0, &ptr2);
tools/testing/selftests/bpf/progs/dynptr_fail.c
355
sample = bpf_dynptr_data(&ptr2, 0, sizeof(*sample));
tools/testing/selftests/bpf/progs/dynptr_fail.c
356
if (!sample)
tools/testing/selftests/bpf/progs/dynptr_fail.c
359
sample->pid = 23;
tools/testing/selftests/bpf/progs/dynptr_fail.c
364
sample->pid = 23;
tools/testing/selftests/bpf/progs/dynptr_fail.c
98
struct sample *sample;
tools/testing/selftests/bpf/progs/dynptr_success.c
125
struct ringbuf_sample *sample;
tools/testing/selftests/bpf/progs/dynptr_success.c
129
sample = bpf_dynptr_data(ptr, 0, sizeof(*sample));
tools/testing/selftests/bpf/progs/dynptr_success.c
130
if (!sample)
tools/testing/selftests/bpf/progs/dynptr_success.c
133
sample->pid += index;
tools/testing/selftests/bpf/progs/dynptr_success.c
142
struct ringbuf_sample *sample;
tools/testing/selftests/bpf/progs/dynptr_success.c
152
sample = err ? NULL : bpf_dynptr_data(&ptr, 0, sizeof(*sample));
tools/testing/selftests/bpf/progs/dynptr_success.c
153
if (!sample) {
tools/testing/selftests/bpf/progs/dynptr_success.c
158
sample->pid = 10;
tools/testing/selftests/bpf/progs/dynptr_success.c
163
if (sample->pid != 55)
tools/testing/selftests/bpf/progs/ima.c
29
u64 *sample;
tools/testing/selftests/bpf/progs/ima.c
44
sample = bpf_ringbuf_reserve(&ringbuf, sizeof(u64), 0);
tools/testing/selftests/bpf/progs/ima.c
45
if (!sample)
tools/testing/selftests/bpf/progs/ima.c
48
*sample = ima_hash;
tools/testing/selftests/bpf/progs/ima.c
49
bpf_ringbuf_submit(sample, 0);
tools/testing/selftests/bpf/progs/ringbuf_bench.c
43
long *sample, flags;
tools/testing/selftests/bpf/progs/ringbuf_bench.c
48
sample = bpf_ringbuf_reserve(&ringbuf,
tools/testing/selftests/bpf/progs/ringbuf_bench.c
50
if (!sample) {
tools/testing/selftests/bpf/progs/ringbuf_bench.c
53
*sample = sample_val;
tools/testing/selftests/bpf/progs/ringbuf_bench.c
55
bpf_ringbuf_submit(sample, flags);
tools/testing/selftests/bpf/progs/strobemeta.h
600
struct strobelight_bpf_sample* sample;
tools/testing/selftests/bpf/progs/strobemeta.h
606
sample = bpf_map_lookup_elem(&sample_heap, &zero);
tools/testing/selftests/bpf/progs/strobemeta.h
607
if (!sample)
tools/testing/selftests/bpf/progs/strobemeta.h
610
sample->pid = pid;
tools/testing/selftests/bpf/progs/strobemeta.h
611
bpf_get_current_comm(&sample->comm, TASK_COMM_LEN);
tools/testing/selftests/bpf/progs/strobemeta.h
613
sample->ktime = ktime_ns;
tools/testing/selftests/bpf/progs/strobemeta.h
616
sample_end = read_strobe_meta(task, &sample->metadata);
tools/testing/selftests/bpf/progs/strobemeta.h
617
sample->has_meta = sample_end != NULL;
tools/testing/selftests/bpf/progs/strobemeta.h
618
sample_end = sample_end ? : &sample->metadata;
tools/testing/selftests/bpf/progs/strobemeta.h
621
sample->kernel_stack_id = bpf_get_stackid(ctx, &stacks_1, 0);
tools/testing/selftests/bpf/progs/strobemeta.h
622
sample->user_stack_id = bpf_get_stackid(ctx, &stacks_1, BPF_F_USER_STACK);
tools/testing/selftests/bpf/progs/strobemeta.h
624
sample->kernel_stack_id = bpf_get_stackid(ctx, &stacks_0, 0);
tools/testing/selftests/bpf/progs/strobemeta.h
625
sample->user_stack_id = bpf_get_stackid(ctx, &stacks_0, BPF_F_USER_STACK);
tools/testing/selftests/bpf/progs/strobemeta.h
628
uint64_t sample_size = sample_end - (void *)sample;
tools/testing/selftests/bpf/progs/strobemeta.h
631
bpf_perf_event_output(ctx, &samples, 0, sample, 1 + sample_size);
tools/testing/selftests/bpf/progs/tcp_ca_kfunc.c
107
void BPF_PROG(pkts_acked, struct sock *sk, const struct ack_sample *sample)
tools/testing/selftests/bpf/progs/tcp_ca_kfunc.c
109
cubictcp_acked(sk, sample);
tools/testing/selftests/bpf/progs/tcp_ca_kfunc.c
29
extern void cubictcp_acked(struct sock *sk, const struct ack_sample *sample) __ksym;
tools/testing/selftests/bpf/progs/test_lirc_mode2_kern.c
11
int bpf_decoder(unsigned int *sample)
tools/testing/selftests/bpf/progs/test_lirc_mode2_kern.c
13
if (LIRC_IS_PULSE(*sample)) {
tools/testing/selftests/bpf/progs/test_lirc_mode2_kern.c
14
unsigned int duration = LIRC_VALUE(*sample);
tools/testing/selftests/bpf/progs/test_lirc_mode2_kern.c
17
bpf_rc_keydown(sample, 0x40, duration & 0xffff, 0);
tools/testing/selftests/bpf/progs/test_lirc_mode2_kern.c
19
bpf_rc_pointer_rel(sample, (duration >> 8) & 0xff,
tools/testing/selftests/bpf/progs/test_ringbuf.c
43
struct sample *sample;
tools/testing/selftests/bpf/progs/test_ringbuf.c
48
sample = bpf_ringbuf_reserve(&ringbuf, sizeof(*sample), 0);
tools/testing/selftests/bpf/progs/test_ringbuf.c
49
if (!sample) {
tools/testing/selftests/bpf/progs/test_ringbuf.c
54
sample->pid = pid;
tools/testing/selftests/bpf/progs/test_ringbuf.c
55
bpf_get_current_comm(sample->comm, sizeof(sample->comm));
tools/testing/selftests/bpf/progs/test_ringbuf.c
56
sample->value = value;
tools/testing/selftests/bpf/progs/test_ringbuf.c
58
sample->seq = seq++;
tools/testing/selftests/bpf/progs/test_ringbuf.c
61
if (sample->seq & 1) {
tools/testing/selftests/bpf/progs/test_ringbuf.c
63
bpf_ringbuf_output(&ringbuf, sample, sizeof(*sample), flags);
tools/testing/selftests/bpf/progs/test_ringbuf.c
65
bpf_ringbuf_discard(sample, flags);
tools/testing/selftests/bpf/progs/test_ringbuf.c
68
bpf_ringbuf_submit(sample, flags);
tools/testing/selftests/bpf/progs/test_ringbuf_map_key.c
24
__type(key, struct sample);
tools/testing/selftests/bpf/progs/test_ringbuf_map_key.c
38
struct sample *sample;
tools/testing/selftests/bpf/progs/test_ringbuf_map_key.c
44
sample = bpf_ringbuf_reserve(&ringbuf, sizeof(*sample), 0);
tools/testing/selftests/bpf/progs/test_ringbuf_map_key.c
45
if (!sample)
tools/testing/selftests/bpf/progs/test_ringbuf_map_key.c
48
sample->pid = pid;
tools/testing/selftests/bpf/progs/test_ringbuf_map_key.c
49
bpf_get_current_comm(sample->comm, sizeof(sample->comm));
tools/testing/selftests/bpf/progs/test_ringbuf_map_key.c
50
sample->seq = ++seq;
tools/testing/selftests/bpf/progs/test_ringbuf_map_key.c
51
sample->value = 42;
tools/testing/selftests/bpf/progs/test_ringbuf_map_key.c
55
lookup_val = (int *)bpf_map_lookup_elem(&hash_map, sample);
tools/testing/selftests/bpf/progs/test_ringbuf_map_key.c
62
bpf_map_update_elem(&hash_map, sample, &sample->seq, BPF_ANY);
tools/testing/selftests/bpf/progs/test_ringbuf_map_key.c
64
bpf_ringbuf_submit(sample, 0);
tools/testing/selftests/bpf/progs/test_ringbuf_multi.c
60
struct sample *sample;
tools/testing/selftests/bpf/progs/test_ringbuf_multi.c
72
sample = bpf_ringbuf_reserve(rb, sizeof(*sample), 0);
tools/testing/selftests/bpf/progs/test_ringbuf_multi.c
73
if (!sample) {
tools/testing/selftests/bpf/progs/test_ringbuf_multi.c
78
sample->pid = pid;
tools/testing/selftests/bpf/progs/test_ringbuf_multi.c
79
bpf_get_current_comm(sample->comm, sizeof(sample->comm));
tools/testing/selftests/bpf/progs/test_ringbuf_multi.c
80
sample->value = value;
tools/testing/selftests/bpf/progs/test_ringbuf_multi.c
82
sample->seq = total;
tools/testing/selftests/bpf/progs/test_ringbuf_multi.c
85
bpf_ringbuf_submit(sample, 0);
tools/testing/selftests/bpf/progs/test_ringbuf_n.c
31
struct sample *sample;
tools/testing/selftests/bpf/progs/test_ringbuf_n.c
36
sample = bpf_ringbuf_reserve(&ringbuf, sizeof(*sample), 0);
tools/testing/selftests/bpf/progs/test_ringbuf_n.c
37
if (!sample)
tools/testing/selftests/bpf/progs/test_ringbuf_n.c
40
sample->pid = pid;
tools/testing/selftests/bpf/progs/test_ringbuf_n.c
41
sample->value = value;
tools/testing/selftests/bpf/progs/test_ringbuf_n.c
42
bpf_get_current_comm(sample->comm, sizeof(sample->comm));
tools/testing/selftests/bpf/progs/test_ringbuf_n.c
44
bpf_ringbuf_submit(sample, 0);
tools/testing/selftests/bpf/progs/user_ringbuf_fail.c
32
const struct sample *sample;
tools/testing/selftests/bpf/progs/user_ringbuf_fail.c
34
sample = bpf_dynptr_data(dynptr - 1, 0, sizeof(*sample));
tools/testing/selftests/bpf/progs/user_ringbuf_fail.c
55
const struct sample *sample;
tools/testing/selftests/bpf/progs/user_ringbuf_fail.c
57
sample = bpf_dynptr_data(dynptr + 1, 0, sizeof(*sample));
tools/testing/selftests/bpf/progs/user_ringbuf_success.c
40
const struct sample *sample = NULL;
tools/testing/selftests/bpf/progs/user_ringbuf_success.c
41
struct sample stack_sample;
tools/testing/selftests/bpf/progs/user_ringbuf_success.c
53
sample = bpf_dynptr_data(dynptr, 0, sizeof(*sample));
tools/testing/selftests/bpf/progs/user_ringbuf_success.c
54
if (!sample) {
tools/testing/selftests/bpf/progs/user_ringbuf_success.c
59
stack_sample = *sample;
tools/testing/selftests/powerpc/pmu/sampling_tests/mmcra_thresh_marked_sample_test.c
66
FAIL_IF((EV_CODE_EXTRACT(event.attr.config, sample) >> 2) !=
tools/testing/selftests/powerpc/pmu/sampling_tests/mmcra_thresh_marked_sample_test.c
68
FAIL_IF((EV_CODE_EXTRACT(event.attr.config, sample) & 0x3) !=
tools/testing/selftests/timers/freq-step.c
111
static void regress(struct sample *samples, int n, double *intercept,
tools/testing/selftests/timers/freq-step.c
148
struct sample samples[SAMPLES];
tools/testing/selftests/timers/freq-step.c
206
struct sample sample;
tools/testing/selftests/timers/freq-step.c
224
precision = get_sample(&sample) / 2.0;
tools/testing/selftests/timers/freq-step.c
48
static double get_sample(struct sample *sample)
tools/testing/selftests/timers/freq-step.c
70
sample->offset = diff_timespec(&ts2, &ts1);
tools/testing/selftests/timers/freq-step.c
71
sample->offset -= delay / 2.0;
tools/testing/selftests/timers/freq-step.c
72
sample->time = ts1.tv_sec + ts1.tv_nsec / 1e9;