• Home
  • History
  • Annotate
  • Raw
  • Download

Lines Matching refs:tbp

1119 	struct trace_buf *tbp;  in alloc_trace_buf()  local
1121 tbp = malloc(sizeof(*tbp) + bufsize); in alloc_trace_buf()
1122 INIT_LIST_HEAD(&tbp->head); in alloc_trace_buf()
1123 tbp->len = 0; in alloc_trace_buf()
1124 tbp->buf = (void *)(tbp + 1); in alloc_trace_buf()
1125 tbp->cpu = cpu; in alloc_trace_buf()
1126 tbp->dpp = NULL; /* Will be set when tbp is added */ in alloc_trace_buf()
1128 return tbp; in alloc_trace_buf()
1172 struct trace_buf *tbp = *tbpp; in add_trace_buf() local
1175 tbp->dpp = dpp; in add_trace_buf()
1178 list_add_tail(&tbp->head, &hd->head); in add_trace_buf()
1254 static int flush_subbuf_net(struct trace_buf *tbp) in flush_subbuf_net() argument
1256 int fd = cl_fds[tbp->cpu]; in flush_subbuf_net()
1257 struct devpath *dpp = tbp->dpp; in flush_subbuf_net()
1259 if (net_send_header(fd, tbp->cpu, dpp->buts_name, tbp->len)) in flush_subbuf_net()
1261 else if (net_send_data(fd, tbp->buf, tbp->len) != tbp->len) in flush_subbuf_net()
1271 struct trace_buf *tbp; in handle_list_net() local
1276 tbp = list_entry(p, struct trace_buf, head); in handle_list_net()
1278 list_del(&tbp->head); in handle_list_net()
1281 if (cl_fds[tbp->cpu] >= 0) { in handle_list_net()
1282 if (flush_subbuf_net(tbp)) { in handle_list_net()
1283 close(cl_fds[tbp->cpu]); in handle_list_net()
1284 cl_fds[tbp->cpu] = -1; in handle_list_net()
1288 free(tbp); in handle_list_net()
1298 struct trace_buf *tbp) in tb_combine() argument
1302 tot_len = prev->len + tbp->len; in tb_combine()
1315 memcpy(prev->buf + prev->len, tbp->buf, tbp->len); in tb_combine()
1318 free(tbp); in tb_combine()
1329 struct trace_buf *tbp, *prev; in handle_list_file() local
1333 tbp = list_entry(p, struct trace_buf, head); in handle_list_file()
1334 list_del(&tbp->head); in handle_list_file()
1342 tbp = tb_combine(prev, tbp); in handle_list_file()
1350 while (off + (int)sizeof(*t) <= tbp->len) { in handle_list_file()
1351 t = (struct blk_io_trace *)(tbp->buf + off); in handle_list_file()
1353 if (off + t_len > tbp->len) in handle_list_file()
1360 pdc_nev_update(tbp->dpp, tbp->cpu, nevents); in handle_list_file()
1367 if (write_data(tbp->buf, off) || off == tbp->len) { in handle_list_file()
1368 free(tbp); in handle_list_file()
1375 tbp->len -= off; in handle_list_file()
1376 memmove(tbp->buf, tbp->buf + off, tbp->len); in handle_list_file()
1377 prev = tbp; in handle_list_file()
1380 prev = tbp; in handle_list_file()
1743 struct trace_buf *tbp; in handle_pfds_entries() local
1747 tbp = alloc_trace_buf(tp->cpu, buf_size); in handle_pfds_entries()
1750 tbp->len = read(iop->ifd, tbp->buf, buf_size); in handle_pfds_entries()
1751 if (tbp->len > 0) { in handle_pfds_entries()
1752 pdc_dr_update(iop->dpp, tp->cpu, tbp->len); in handle_pfds_entries()
1753 add_trace_buf(iop->dpp, tp->cpu, &tbp); in handle_pfds_entries()
1755 } else if (tbp->len == 0) { in handle_pfds_entries()
1771 free(tbp); in handle_pfds_entries()