Lines Matching refs:sfq

199 	struct s390_cpumsf_queue *sfq;  in s390_cpumcf_dumpctr()  local
207 sfq = q->priv; in s390_cpumcf_dumpctr()
208 if (!sfq) /* Queue not yet allocated */ in s390_cpumcf_dumpctr()
211 if (!sfq->logfile_ctr) { in s390_cpumcf_dumpctr()
219 sfq->logfile_ctr = fopen(name, "w"); in s390_cpumcf_dumpctr()
220 if (sfq->logfile_ctr == NULL) { in s390_cpumcf_dumpctr()
228 if (sfq->logfile_ctr) { in s390_cpumcf_dumpctr()
231 sfq->logfile_ctr); in s390_cpumcf_dumpctr()
505 struct s390_cpumsf_queue *sfq) in s390_cpumsf_make_event() argument
512 .cpu = sfq->cpu, in s390_cpumsf_make_event()
539 if (perf_session__deliver_synth_event(sfq->sf->session, &event, in s390_cpumsf_make_event()
600 static int s390_cpumsf_samples(struct s390_cpumsf_queue *sfq, u64 *ts) in s390_cpumsf_samples() argument
602 struct s390_cpumsf *sf = sfq->sf; in s390_cpumsf_samples()
603 unsigned char *buf = sfq->buffer->use_data; in s390_cpumsf_samples()
604 size_t len = sfq->buffer->use_size; in s390_cpumsf_samples()
625 (s64)sfq->buffer->data_offset); in s390_cpumsf_samples()
637 if (s390_cpumsf_make_event(pos, basic, sfq)) in s390_cpumsf_samples()
660 sfq->buffer->use_data += pos; in s390_cpumsf_samples()
661 sfq->buffer->use_size -= pos; in s390_cpumsf_samples()
668 sfq->buffer->use_size = 0; in s390_cpumsf_samples()
669 sfq->buffer->use_data = NULL; in s390_cpumsf_samples()
693 static int s390_cpumsf_run_decoder(struct s390_cpumsf_queue *sfq, in s390_cpumsf_run_decoder() argument
701 queue = &sfq->sf->queues.queue_array[sfq->queue_nr]; in s390_cpumsf_run_decoder()
709 if (sfq->buffer == NULL) { in s390_cpumsf_run_decoder()
710 sfq->buffer = buffer = auxtrace_buffer__next(queue, in s390_cpumsf_run_decoder()
711 sfq->buffer); in s390_cpumsf_run_decoder()
721 if (sfq->logfile) { /* Write into log file */ in s390_cpumsf_run_decoder()
723 sfq->logfile); in s390_cpumsf_run_decoder()
728 buffer = sfq->buffer; in s390_cpumsf_run_decoder()
731 int fd = perf_data__fd(sfq->sf->session->data); in s390_cpumsf_run_decoder()
739 if (sfq->logfile) { /* Write into log file */ in s390_cpumsf_run_decoder()
741 sfq->logfile); in s390_cpumsf_run_decoder()
747 __func__, sfq->queue_nr, buffer->buffer_nr, buffer->offset, in s390_cpumsf_run_decoder()
749 err = s390_cpumsf_samples(sfq, ts); in s390_cpumsf_run_decoder()
758 sfq->buffer = NULL; in s390_cpumsf_run_decoder()
770 struct s390_cpumsf_queue *sfq; in s390_cpumsf_alloc_queue() local
772 sfq = zalloc(sizeof(struct s390_cpumsf_queue)); in s390_cpumsf_alloc_queue()
773 if (sfq == NULL) in s390_cpumsf_alloc_queue()
776 sfq->sf = sf; in s390_cpumsf_alloc_queue()
777 sfq->queue_nr = queue_nr; in s390_cpumsf_alloc_queue()
778 sfq->cpu = -1; in s390_cpumsf_alloc_queue()
788 sfq->logfile = fopen(name, "w"); in s390_cpumsf_alloc_queue()
789 if (sfq->logfile == NULL) { in s390_cpumsf_alloc_queue()
796 return sfq; in s390_cpumsf_alloc_queue()
803 struct s390_cpumsf_queue *sfq = queue->priv; in s390_cpumsf_setup_queue() local
808 if (sfq == NULL) { in s390_cpumsf_setup_queue()
809 sfq = s390_cpumsf_alloc_queue(sf, queue_nr); in s390_cpumsf_setup_queue()
810 if (!sfq) in s390_cpumsf_setup_queue()
812 queue->priv = sfq; in s390_cpumsf_setup_queue()
815 sfq->cpu = queue->cpu; in s390_cpumsf_setup_queue()
851 struct s390_cpumsf_queue *sfq; in s390_cpumsf_process_queues() local
861 sfq = queue->priv; in s390_cpumsf_process_queues()
872 ret = s390_cpumsf_run_decoder(sfq, &ts); in s390_cpumsf_process_queues()
1020 struct s390_cpumsf_queue *sfq = (struct s390_cpumsf_queue *) in s390_cpumsf_free_queues() local
1023 if (sfq != NULL) { in s390_cpumsf_free_queues()
1024 if (sfq->logfile) { in s390_cpumsf_free_queues()
1025 fclose(sfq->logfile); in s390_cpumsf_free_queues()
1026 sfq->logfile = NULL; in s390_cpumsf_free_queues()
1028 if (sfq->logfile_ctr) { in s390_cpumsf_free_queues()
1029 fclose(sfq->logfile_ctr); in s390_cpumsf_free_queues()
1030 sfq->logfile_ctr = NULL; in s390_cpumsf_free_queues()