Lines Matching full:sample
298 struct perf_sample *sample) in arm_spe_prep_sample() argument
303 sample->time = tsc_to_perf_time(record->timestamp, &spe->tc); in arm_spe_prep_sample()
305 sample->ip = record->from_ip; in arm_spe_prep_sample()
306 sample->cpumode = arm_spe_cpumode(spe, sample->ip); in arm_spe_prep_sample()
307 sample->pid = speq->pid; in arm_spe_prep_sample()
308 sample->tid = speq->tid; in arm_spe_prep_sample()
309 sample->period = 1; in arm_spe_prep_sample()
310 sample->cpu = speq->cpu; in arm_spe_prep_sample()
311 sample->simd_flags = arm_spe__synth_simd_flags(record); in arm_spe_prep_sample()
313 event->sample.header.type = PERF_RECORD_SAMPLE; in arm_spe_prep_sample()
314 event->sample.header.misc = sample->cpumode; in arm_spe_prep_sample()
315 event->sample.header.size = sizeof(struct perf_event_header); in arm_spe_prep_sample()
318 static int arm_spe__inject_event(union perf_event *event, struct perf_sample *sample, u64 type) in arm_spe__inject_event() argument
320 event->header.size = perf_event__sample_event_size(sample, type, 0); in arm_spe__inject_event()
321 return perf_event__synthesize_sample(event, type, 0, sample); in arm_spe__inject_event()
328 struct perf_sample *sample) in arm_spe_deliver_synth_event() argument
333 ret = arm_spe__inject_event(event, sample, spe->sample_type); in arm_spe_deliver_synth_event()
338 ret = perf_session__deliver_synth_event(spe->session, event, sample); in arm_spe_deliver_synth_event()
351 struct perf_sample sample = { .ip = 0, }; in arm_spe__synth_mem_sample() local
353 arm_spe_prep_sample(spe, speq, event, &sample); in arm_spe__synth_mem_sample()
355 sample.id = spe_events_id; in arm_spe__synth_mem_sample()
356 sample.stream_id = spe_events_id; in arm_spe__synth_mem_sample()
357 sample.addr = record->virt_addr; in arm_spe__synth_mem_sample()
358 sample.phys_addr = record->phys_addr; in arm_spe__synth_mem_sample()
359 sample.data_src = data_src; in arm_spe__synth_mem_sample()
360 sample.weight = record->latency; in arm_spe__synth_mem_sample()
362 return arm_spe_deliver_synth_event(spe, speq, event, &sample); in arm_spe__synth_mem_sample()
371 struct perf_sample sample = { .ip = 0, }; in arm_spe__synth_branch_sample() local
373 arm_spe_prep_sample(spe, speq, event, &sample); in arm_spe__synth_branch_sample()
375 sample.id = spe_events_id; in arm_spe__synth_branch_sample()
376 sample.stream_id = spe_events_id; in arm_spe__synth_branch_sample()
377 sample.addr = record->to_ip; in arm_spe__synth_branch_sample()
378 sample.weight = record->latency; in arm_spe__synth_branch_sample()
380 return arm_spe_deliver_synth_event(spe, speq, event, &sample); in arm_spe__synth_branch_sample()
389 struct perf_sample sample = { .ip = 0, }; in arm_spe__synth_instruction_sample() local
399 arm_spe_prep_sample(spe, speq, event, &sample); in arm_spe__synth_instruction_sample()
401 sample.id = spe_events_id; in arm_spe__synth_instruction_sample()
402 sample.stream_id = spe_events_id; in arm_spe__synth_instruction_sample()
403 sample.addr = record->virt_addr; in arm_spe__synth_instruction_sample()
404 sample.phys_addr = record->phys_addr; in arm_spe__synth_instruction_sample()
405 sample.data_src = data_src; in arm_spe__synth_instruction_sample()
406 sample.period = spe->instructions_sample_period; in arm_spe__synth_instruction_sample()
407 sample.weight = record->latency; in arm_spe__synth_instruction_sample()
409 return arm_spe_deliver_synth_event(spe, speq, event, &sample); in arm_spe__synth_instruction_sample()
620 * skip to synthesize memory sample for this case. in arm_spe_sample()
649 * based the record to synthesize sample; but here the flow is in arm_spe_run_decoder()
656 * is left to generate sample until run to here, so it's correct in arm_spe_run_decoder()
657 * to synthesize sample for the left record. in arm_spe_run_decoder()
662 * synthesize sample until run to here at the next time; so this in arm_spe_run_decoder()
881 struct perf_sample *sample) in arm_spe_context_switch() argument
891 cpu = sample->cpu; in arm_spe_context_switch()
901 struct perf_sample *sample, in arm_spe_process_event() argument
917 if (sample->time && (sample->time != (u64) -1)) in arm_spe_process_event()
918 timestamp = perf_time_to_tsc(sample->time, &spe->tc); in arm_spe_process_event()
932 sample->time); in arm_spe_process_event()
942 err = arm_spe_context_switch(spe, event, sample); in arm_spe_process_event()
1243 pr_warning("Arm SPE has a hardware-based sample period.\n" in arm_spe_synth_events()