Lines Matching refs:tbuf

312 } tbuf;  variable
501 (knp++)->value.ui64 = tbuf.stat_dropped_recs; in xdt_kstat_update()
622 tbuf.size = tbuf_op.size; in xdt_attach_trace_buffers()
623 tbuf.start_mfn = (mfn_t)tbuf_op.buffer_mfn; in xdt_attach_trace_buffers()
624 tbuf.cnt = xdt_ncpus; in xdt_attach_trace_buffers()
626 ASSERT(tbuf.start_mfn != MFN_INVALID); in xdt_attach_trace_buffers()
627 ASSERT(tbuf.cnt > 0); in xdt_attach_trace_buffers()
629 len = tbuf.size * tbuf.cnt; in xdt_attach_trace_buffers()
630 tbuf.va = vmem_alloc(heap_arena, len, VM_SLEEP); in xdt_attach_trace_buffers()
632 if ((err = xdt_map_trace_buffers(tbuf.start_mfn, tbuf.va, len)) != 0) { in xdt_attach_trace_buffers()
633 vmem_free(heap_arena, tbuf.va, len); in xdt_attach_trace_buffers()
634 tbuf.va = NULL; in xdt_attach_trace_buffers()
638 tbuf.meta = (struct t_buf **)kmem_alloc(tbuf.cnt * sizeof (*tbuf.meta), in xdt_attach_trace_buffers()
640 tbuf.data = (struct t_rec **)kmem_alloc(tbuf.cnt * sizeof (*tbuf.data), in xdt_attach_trace_buffers()
643 for (i = 0; i < tbuf.cnt; i++) { in xdt_attach_trace_buffers()
644 void *cpu_buf = (void *)(tbuf.va + (tbuf.size * i)); in xdt_attach_trace_buffers()
645 tbuf.meta[i] = cpu_buf; in xdt_attach_trace_buffers()
646 tbuf.data[i] = (struct t_rec *)((uintptr_t)cpu_buf + in xdt_attach_trace_buffers()
650 tbuf.meta[i]->cons = tbuf.meta[i]->prod; in xdt_attach_trace_buffers()
653 tbuf_data_size = tbuf.size - sizeof (struct t_buf); in xdt_attach_trace_buffers()
664 size_t len = tbuf.size * tbuf.cnt; in xdt_detach_trace_buffers()
666 ASSERT(tbuf.va != NULL); in xdt_detach_trace_buffers()
668 hat_unload(kas.a_hat, tbuf.va, len, in xdt_detach_trace_buffers()
670 vmem_free(heap_arena, tbuf.va, len); in xdt_detach_trace_buffers()
671 kmem_free(tbuf.meta, tbuf.cnt * sizeof (*tbuf.meta)); in xdt_detach_trace_buffers()
672 kmem_free(tbuf.data, tbuf.cnt * sizeof (*tbuf.data)); in xdt_detach_trace_buffers()
707 tbuf.stat_spurious_cpu++; in xdt_process_rec()
782 tbuf.stat_spurious_switch++; in xdt_process_rec()
865 tbuf.stat_unknown_shutdown++; in xdt_process_rec()
1726 tbuf.stat_dropped_recs++; in xdt_process_rec()
1730 tbuf.stat_unknown_recs++; in xdt_process_rec()
1752 for (cpuid = 0; cpuid < tbuf.cnt; cpuid++) { in xdt_get_first_rec()
1753 cons = tbuf.meta[cpuid]->cons; in xdt_get_first_rec()
1754 prod = tbuf.meta[cpuid]->prod; in xdt_get_first_rec()
1760 data = (uintptr_t)tbuf.data[cpuid] + offset; in xdt_get_first_rec()
1762 ASSERT((caddr_t)rec < tbuf.va + (tbuf.size * (cpuid + 1))); in xdt_get_first_rec()
1817 tbuf.meta[cpuid]->cons = cons; in xdt_tbuf_scan()
2047 if (tbuf.va != NULL) in xdt_attach()