Lines Matching defs:speq
137 struct arm_spe_queue *speq = data;
138 struct auxtrace_buffer *buffer = speq->buffer;
139 struct auxtrace_buffer *old_buffer = speq->old_buffer;
142 queue = &speq->spe->queues.queue_array[speq->queue_nr];
153 speq->buffer = buffer;
158 int fd = perf_data__fd(speq->spe->session->data);
171 speq->old_buffer = buffer;
184 struct arm_spe_queue *speq;
186 speq = zalloc(sizeof(*speq));
187 if (!speq)
190 speq->event_buf = malloc(PERF_SAMPLE_MAX_SIZE);
191 if (!speq->event_buf)
194 speq->spe = spe;
195 speq->queue_nr = queue_nr;
196 speq->pid = -1;
197 speq->tid = -1;
198 speq->cpu = -1;
202 params.data = speq;
205 speq->decoder = arm_spe_decoder_new(¶ms);
206 if (!speq->decoder)
209 return speq;
212 zfree(&speq->event_buf);
213 free(speq);
226 struct arm_spe_queue *speq,
230 struct arm_spe_record *record = &speq->decoder->record;
233 sample->time = speq->timestamp;
237 sample->pid = speq->pid;
238 sample->tid = speq->tid;
241 sample->cpu = speq->cpu;
256 struct arm_spe_queue *speq __maybe_unused,
276 arm_spe_synth_spe_events_sample(struct arm_spe_queue *speq,
279 struct arm_spe *spe = speq->spe;
280 union perf_event *event = speq->event_buf;
283 arm_spe_prep_sample(spe, speq, event, &sample);
288 return arm_spe_deliver_synth_event(spe, speq, event, &sample);
291 static int arm_spe_sample(struct arm_spe_queue *speq)
293 const struct arm_spe_record *record = &speq->decoder->record;
294 struct arm_spe *spe = speq->spe;
300 speq, spe->l1d_miss_id);
307 speq, spe->l1d_access_id);
316 speq, spe->llc_miss_id);
323 speq, spe->llc_access_id);
332 speq, spe->tlb_miss_id);
339 speq, spe->tlb_access_id);
346 err = arm_spe_synth_spe_events_sample(speq,
354 err = arm_spe_synth_spe_events_sample(speq,
363 static int arm_spe_run_decoder(struct arm_spe_queue *speq, u64 *timestamp)
365 struct arm_spe *spe = speq->spe;
372 ret = arm_spe_decode(speq->decoder);
385 ret = arm_spe_sample(speq);
389 if (!spe->timeless_decoding && speq->timestamp >= *timestamp) {
390 *timestamp = speq->timestamp;
402 struct arm_spe_queue *speq = queue->priv;
405 if (list_empty(&queue->head) || speq)
408 speq = arm_spe__alloc_queue(spe, queue_nr);
410 if (!speq)
413 queue->priv = speq;
416 speq->cpu = queue->cpu;
418 if (!speq->on_heap) {
425 ret = arm_spe_decode(speq->decoder);
433 record = &speq->decoder->record;
435 speq->timestamp = record->timestamp;
436 ret = auxtrace_heap__add(&spe->heap, queue_nr, speq->timestamp);
439 speq->on_heap = true;
490 struct arm_spe_queue *speq = queue->priv;
493 tid = machine__get_current_tid(spe->machine, speq->cpu);
495 speq->tid = tid;
496 thread__zput(speq->thread);
498 speq->tid = queue->tid;
500 if ((!speq->thread) && (speq->tid != -1)) {
501 speq->thread = machine__find_thread(spe->machine, -1,
502 speq->tid);
505 if (speq->thread) {
506 speq->pid = speq->thread->pid_;
508 speq->cpu = speq->thread->cpu;
520 struct arm_spe_queue *speq;
530 speq = queue->priv;
544 ret = arm_spe_run_decoder(speq, &ts);
555 speq->on_heap = false;
571 struct arm_spe_queue *speq = queue->priv;
573 if (speq && (tid == -1 || speq->tid == tid)) {
574 speq->time = time_;
576 arm_spe_run_decoder(speq, &ts);
693 struct arm_spe_queue *speq = priv;
695 if (!speq)
697 thread__zput(speq->thread);
698 arm_spe_decoder_free(speq->decoder);
699 zfree(&speq->event_buf);
700 free(speq);