2 * Copyright(c) 2015 - 2017 Intel Corporation.
4 * This file is provided under a dual BSD/GPLv2 license. When using or
5 * redistributing this file, you may do so under either license.
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of version 2 of the GNU General Public License as
11 * published by the Free Software Foundation.
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
20 * Redistribution and use in source and binary forms, with or without
21 * modification, are permitted provided that the following conditions
24 * - Redistributions of source code must retain the above copyright
25 * notice, this list of conditions and the following disclaimer.
26 * - Redistributions in binary form must reproduce the above copyright
27 * notice, this list of conditions and the following disclaimer in
28 * the documentation and/or other materials provided with the
30 * - Neither the name of Intel Corporation nor the names of its
31 * contributors may be used to endorse or promote products derived
32 * from this software without specific prior written permission.
34 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
35 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
36 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
37 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
38 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
39 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
40 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
41 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
42 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
43 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
44 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
47 #if !defined(__HFI1_TRACE_TX_H) || defined(TRACE_HEADER_MULTI_READ)
48 #define __HFI1_TRACE_TX_H
50 #include <linux/tracepoint.h>
51 #include <linux/trace_seq.h>
57 const char *parse_sdma_flags(struct trace_seq *p, u64 desc0, u64 desc1);
59 #define __parse_sdma_flags(desc0, desc1) parse_sdma_flags(p, desc0, desc1)
62 #define TRACE_SYSTEM hfi1_tx
64 TRACE_EVENT(hfi1_piofree,
65 TP_PROTO(struct send_context *sc, int extra),
67 TP_STRUCT__entry(DD_DEV_ENTRY(sc->dd)
68 __field(u32, sw_index)
69 __field(u32, hw_context)
72 TP_fast_assign(DD_DEV_ASSIGN(sc->dd);
73 __entry->sw_index = sc->sw_index;
74 __entry->hw_context = sc->hw_context;
75 __entry->extra = extra;
77 TP_printk("[%s] ctxt %u(%u) extra %d",
85 TRACE_EVENT(hfi1_wantpiointr,
86 TP_PROTO(struct send_context *sc, u32 needint, u64 credit_ctrl),
87 TP_ARGS(sc, needint, credit_ctrl),
88 TP_STRUCT__entry(DD_DEV_ENTRY(sc->dd)
89 __field(u32, sw_index)
90 __field(u32, hw_context)
92 __field(u64, credit_ctrl)
94 TP_fast_assign(DD_DEV_ASSIGN(sc->dd);
95 __entry->sw_index = sc->sw_index;
96 __entry->hw_context = sc->hw_context;
97 __entry->needint = needint;
98 __entry->credit_ctrl = credit_ctrl;
100 TP_printk("[%s] ctxt %u(%u) on %d credit_ctrl 0x%llx",
105 (unsigned long long)__entry->credit_ctrl
109 DECLARE_EVENT_CLASS(hfi1_qpsleepwakeup_template,
110 TP_PROTO(struct rvt_qp *qp, u32 flags),
113 DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device))
116 __field(u32, s_flags)
119 DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device))
120 __entry->flags = flags;
121 __entry->qpn = qp->ibqp.qp_num;
122 __entry->s_flags = qp->s_flags;
125 "[%s] qpn 0x%x flags 0x%x s_flags 0x%x",
133 DEFINE_EVENT(hfi1_qpsleepwakeup_template, hfi1_qpwakeup,
134 TP_PROTO(struct rvt_qp *qp, u32 flags),
137 DEFINE_EVENT(hfi1_qpsleepwakeup_template, hfi1_qpsleep,
138 TP_PROTO(struct rvt_qp *qp, u32 flags),
141 TRACE_EVENT(hfi1_sdma_descriptor,
142 TP_PROTO(struct sdma_engine *sde,
147 TP_ARGS(sde, desc0, desc1, e, descp),
148 TP_STRUCT__entry(DD_DEV_ENTRY(sde->dd)
149 __field(void *, descp)
155 TP_fast_assign(DD_DEV_ASSIGN(sde->dd);
156 __entry->desc0 = desc0;
157 __entry->desc1 = desc1;
158 __entry->idx = sde->this_idx;
159 __entry->descp = descp;
163 "[%s] SDE(%u) flags:%s addr:0x%016llx gen:%u len:%u d0:%016llx d1:%016llx to %p,%u",
166 __parse_sdma_flags(__entry->desc0, __entry->desc1),
167 (__entry->desc0 >> SDMA_DESC0_PHY_ADDR_SHIFT) &
168 SDMA_DESC0_PHY_ADDR_MASK,
169 (u8)((__entry->desc1 >> SDMA_DESC1_GENERATION_SHIFT) &
170 SDMA_DESC1_GENERATION_MASK),
171 (u16)((__entry->desc0 >> SDMA_DESC0_BYTE_COUNT_SHIFT) &
172 SDMA_DESC0_BYTE_COUNT_MASK),
180 TRACE_EVENT(hfi1_sdma_engine_select,
181 TP_PROTO(struct hfi1_devdata *dd, u32 sel, u8 vl, u8 idx),
182 TP_ARGS(dd, sel, vl, idx),
183 TP_STRUCT__entry(DD_DEV_ENTRY(dd)
188 TP_fast_assign(DD_DEV_ASSIGN(dd);
193 TP_printk("[%s] selecting SDE %u sel 0x%x vl %u",
201 TRACE_EVENT(hfi1_sdma_user_free_queues,
202 TP_PROTO(struct hfi1_devdata *dd, u16 ctxt, u16 subctxt),
203 TP_ARGS(dd, ctxt, subctxt),
204 TP_STRUCT__entry(DD_DEV_ENTRY(dd)
206 __field(u16, subctxt)
208 TP_fast_assign(DD_DEV_ASSIGN(dd);
209 __entry->ctxt = ctxt;
210 __entry->subctxt = subctxt;
212 TP_printk("[%s] SDMA [%u:%u] Freeing user SDMA queues",
219 TRACE_EVENT(hfi1_sdma_user_process_request,
220 TP_PROTO(struct hfi1_devdata *dd, u16 ctxt, u16 subctxt,
222 TP_ARGS(dd, ctxt, subctxt, comp_idx),
223 TP_STRUCT__entry(DD_DEV_ENTRY(dd)
225 __field(u16, subctxt)
226 __field(u16, comp_idx)
228 TP_fast_assign(DD_DEV_ASSIGN(dd);
229 __entry->ctxt = ctxt;
230 __entry->subctxt = subctxt;
231 __entry->comp_idx = comp_idx;
233 TP_printk("[%s] SDMA [%u:%u] Using req/comp entry: %u",
242 hfi1_sdma_value_template,
243 TP_PROTO(struct hfi1_devdata *dd, u16 ctxt, u16 subctxt, u16 comp_idx,
245 TP_ARGS(dd, ctxt, subctxt, comp_idx, value),
246 TP_STRUCT__entry(DD_DEV_ENTRY(dd)
248 __field(u16, subctxt)
249 __field(u16, comp_idx)
252 TP_fast_assign(DD_DEV_ASSIGN(dd);
253 __entry->ctxt = ctxt;
254 __entry->subctxt = subctxt;
255 __entry->comp_idx = comp_idx;
256 __entry->value = value;
258 TP_printk("[%s] SDMA [%u:%u:%u] value: %u",
267 DEFINE_EVENT(hfi1_sdma_value_template, hfi1_sdma_user_initial_tidoffset,
268 TP_PROTO(struct hfi1_devdata *dd, u16 ctxt, u16 subctxt,
269 u16 comp_idx, u32 tidoffset),
270 TP_ARGS(dd, ctxt, subctxt, comp_idx, tidoffset));
272 DEFINE_EVENT(hfi1_sdma_value_template, hfi1_sdma_user_data_length,
273 TP_PROTO(struct hfi1_devdata *dd, u16 ctxt, u16 subctxt,
274 u16 comp_idx, u32 data_len),
275 TP_ARGS(dd, ctxt, subctxt, comp_idx, data_len));
277 DEFINE_EVENT(hfi1_sdma_value_template, hfi1_sdma_user_compute_length,
278 TP_PROTO(struct hfi1_devdata *dd, u16 ctxt, u16 subctxt,
279 u16 comp_idx, u32 data_len),
280 TP_ARGS(dd, ctxt, subctxt, comp_idx, data_len));
282 TRACE_EVENT(hfi1_sdma_user_tid_info,
283 TP_PROTO(struct hfi1_devdata *dd, u16 ctxt, u16 subctxt,
284 u16 comp_idx, u32 tidoffset, u32 units, u8 shift),
285 TP_ARGS(dd, ctxt, subctxt, comp_idx, tidoffset, units, shift),
286 TP_STRUCT__entry(DD_DEV_ENTRY(dd)
288 __field(u16, subctxt)
289 __field(u16, comp_idx)
290 __field(u32, tidoffset)
294 TP_fast_assign(DD_DEV_ASSIGN(dd);
295 __entry->ctxt = ctxt;
296 __entry->subctxt = subctxt;
297 __entry->comp_idx = comp_idx;
298 __entry->tidoffset = tidoffset;
299 __entry->units = units;
300 __entry->shift = shift;
302 TP_printk("[%s] SDMA [%u:%u:%u] TID offset %ubytes %uunits om %u",
313 TRACE_EVENT(hfi1_sdma_request,
314 TP_PROTO(struct hfi1_devdata *dd, u16 ctxt, u16 subctxt,
316 TP_ARGS(dd, ctxt, subctxt, dim),
317 TP_STRUCT__entry(DD_DEV_ENTRY(dd)
319 __field(u16, subctxt)
320 __field(unsigned long, dim)
322 TP_fast_assign(DD_DEV_ASSIGN(dd);
323 __entry->ctxt = ctxt;
324 __entry->subctxt = subctxt;
327 TP_printk("[%s] SDMA from %u:%u (%lu)",
335 DECLARE_EVENT_CLASS(hfi1_sdma_engine_class,
336 TP_PROTO(struct sdma_engine *sde, u64 status),
337 TP_ARGS(sde, status),
338 TP_STRUCT__entry(DD_DEV_ENTRY(sde->dd)
342 TP_fast_assign(DD_DEV_ASSIGN(sde->dd);
343 __entry->status = status;
344 __entry->idx = sde->this_idx;
346 TP_printk("[%s] SDE(%u) status %llx",
349 (unsigned long long)__entry->status
353 DEFINE_EVENT(hfi1_sdma_engine_class, hfi1_sdma_engine_interrupt,
354 TP_PROTO(struct sdma_engine *sde, u64 status),
358 DEFINE_EVENT(hfi1_sdma_engine_class, hfi1_sdma_engine_progress,
359 TP_PROTO(struct sdma_engine *sde, u64 status),
363 DECLARE_EVENT_CLASS(hfi1_sdma_ahg_ad,
364 TP_PROTO(struct sdma_engine *sde, int aidx),
366 TP_STRUCT__entry(DD_DEV_ENTRY(sde->dd)
370 TP_fast_assign(DD_DEV_ASSIGN(sde->dd);
371 __entry->idx = sde->this_idx;
372 __entry->aidx = aidx;
374 TP_printk("[%s] SDE(%u) aidx %d",
381 DEFINE_EVENT(hfi1_sdma_ahg_ad, hfi1_ahg_allocate,
382 TP_PROTO(struct sdma_engine *sde, int aidx),
385 DEFINE_EVENT(hfi1_sdma_ahg_ad, hfi1_ahg_deallocate,
386 TP_PROTO(struct sdma_engine *sde, int aidx),
389 #ifdef CONFIG_HFI1_DEBUG_SDMA_ORDER
390 TRACE_EVENT(hfi1_sdma_progress,
391 TP_PROTO(struct sdma_engine *sde,
394 struct sdma_txreq *txp
396 TP_ARGS(sde, hwhead, swhead, txp),
397 TP_STRUCT__entry(DD_DEV_ENTRY(sde->dd)
402 __field(u16, tx_tail)
403 __field(u16, tx_head)
406 TP_fast_assign(DD_DEV_ASSIGN(sde->dd);
407 __entry->hwhead = hwhead;
408 __entry->swhead = swhead;
409 __entry->tx_tail = sde->tx_tail;
410 __entry->tx_head = sde->tx_head;
411 __entry->txnext = txp ? txp->next_descq_idx : ~0;
412 __entry->idx = sde->this_idx;
413 __entry->sn = txp ? txp->sn : ~0;
416 "[%s] SDE(%u) sn %llu hwhead %u swhead %u next_descq_idx %u tx_head %u tx_tail %u",
428 TRACE_EVENT(hfi1_sdma_progress,
429 TP_PROTO(struct sdma_engine *sde,
430 u16 hwhead, u16 swhead,
431 struct sdma_txreq *txp
433 TP_ARGS(sde, hwhead, swhead, txp),
434 TP_STRUCT__entry(DD_DEV_ENTRY(sde->dd)
438 __field(u16, tx_tail)
439 __field(u16, tx_head)
442 TP_fast_assign(DD_DEV_ASSIGN(sde->dd);
443 __entry->hwhead = hwhead;
444 __entry->swhead = swhead;
445 __entry->tx_tail = sde->tx_tail;
446 __entry->tx_head = sde->tx_head;
447 __entry->txnext = txp ? txp->next_descq_idx : ~0;
448 __entry->idx = sde->this_idx;
451 "[%s] SDE(%u) hwhead %u swhead %u next_descq_idx %u tx_head %u tx_tail %u",
463 DECLARE_EVENT_CLASS(hfi1_sdma_sn,
464 TP_PROTO(struct sdma_engine *sde, u64 sn),
466 TP_STRUCT__entry(DD_DEV_ENTRY(sde->dd)
470 TP_fast_assign(DD_DEV_ASSIGN(sde->dd);
472 __entry->idx = sde->this_idx;
474 TP_printk("[%s] SDE(%u) sn %llu",
481 DEFINE_EVENT(hfi1_sdma_sn, hfi1_sdma_out_sn,
483 struct sdma_engine *sde,
489 DEFINE_EVENT(hfi1_sdma_sn, hfi1_sdma_in_sn,
490 TP_PROTO(struct sdma_engine *sde, u64 sn),
494 #define USDMA_HDR_FORMAT \
495 "[%s:%u:%u:%u] PBC=(0x%x 0x%x) LRH=(0x%x 0x%x) BTH=(0x%x 0x%x 0x%x) KDETH=(0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x) TIDVal=0x%x"
497 TRACE_EVENT(hfi1_sdma_user_header,
498 TP_PROTO(struct hfi1_devdata *dd, u16 ctxt, u8 subctxt, u16 req,
499 struct hfi1_pkt_header *hdr, u32 tidval),
500 TP_ARGS(dd, ctxt, subctxt, req, hdr, tidval),
525 __le32 *pbc = (__le32 *)hdr->pbc;
526 __be32 *lrh = (__be32 *)hdr->lrh;
527 __be32 *bth = (__be32 *)hdr->bth;
528 __le32 *kdeth = (__le32 *)&hdr->kdeth;
531 __entry->ctxt = ctxt;
532 __entry->subctxt = subctxt;
534 __entry->pbc0 = le32_to_cpu(pbc[0]);
535 __entry->pbc1 = le32_to_cpu(pbc[1]);
536 __entry->lrh0 = be32_to_cpu(lrh[0]);
537 __entry->lrh1 = be32_to_cpu(lrh[1]);
538 __entry->bth0 = be32_to_cpu(bth[0]);
539 __entry->bth1 = be32_to_cpu(bth[1]);
540 __entry->bth2 = be32_to_cpu(bth[2]);
541 __entry->kdeth0 = le32_to_cpu(kdeth[0]);
542 __entry->kdeth1 = le32_to_cpu(kdeth[1]);
543 __entry->kdeth2 = le32_to_cpu(kdeth[2]);
544 __entry->kdeth3 = le32_to_cpu(kdeth[3]);
545 __entry->kdeth4 = le32_to_cpu(kdeth[4]);
546 __entry->kdeth5 = le32_to_cpu(kdeth[5]);
547 __entry->kdeth6 = le32_to_cpu(kdeth[6]);
548 __entry->kdeth7 = le32_to_cpu(kdeth[7]);
549 __entry->kdeth8 = le32_to_cpu(kdeth[8]);
550 __entry->tidval = tidval;
552 TP_printk(USDMA_HDR_FORMAT,
577 #define SDMA_UREQ_FMT \
578 "[%s:%u:%u] ver/op=0x%x, iovcnt=%u, npkts=%u, frag=%u, idx=%u"
579 TRACE_EVENT(hfi1_sdma_user_reqinfo,
580 TP_PROTO(struct hfi1_devdata *dd, u16 ctxt, u8 subctxt, u16 *i),
581 TP_ARGS(dd, ctxt, subctxt, i),
586 __field(u8, ver_opcode)
589 __field(u16, fragsize)
590 __field(u16, comp_idx)
594 __entry->ctxt = ctxt;
595 __entry->subctxt = subctxt;
596 __entry->ver_opcode = i[0] & 0xff;
597 __entry->iovcnt = (i[0] >> 8) & 0xff;
598 __entry->npkts = i[1];
599 __entry->fragsize = i[2];
600 __entry->comp_idx = i[3];
602 TP_printk(SDMA_UREQ_FMT,
614 #define usdma_complete_name(st) { st, #st }
615 #define show_usdma_complete_state(st) \
616 __print_symbolic(st, \
617 usdma_complete_name(FREE), \
618 usdma_complete_name(QUEUED), \
619 usdma_complete_name(COMPLETE), \
620 usdma_complete_name(ERROR))
622 TRACE_EVENT(hfi1_sdma_user_completion,
623 TP_PROTO(struct hfi1_devdata *dd, u16 ctxt, u8 subctxt, u16 idx,
625 TP_ARGS(dd, ctxt, subctxt, idx, state, code),
636 __entry->ctxt = ctxt;
637 __entry->subctxt = subctxt;
639 __entry->state = state;
640 __entry->code = code;
642 TP_printk("[%s:%u:%u:%u] SDMA completion state %s (%d)",
643 __get_str(dev), __entry->ctxt, __entry->subctxt,
644 __entry->idx, show_usdma_complete_state(__entry->state),
648 const char *print_u32_array(struct trace_seq *, u32 *, int);
649 #define __print_u32_hex(arr, len) print_u32_array(p, arr, len)
651 TRACE_EVENT(hfi1_sdma_user_header_ahg,
652 TP_PROTO(struct hfi1_devdata *dd, u16 ctxt, u8 subctxt, u16 req,
653 u8 sde, u8 ahgidx, u32 *ahg, int len, u32 tidval),
654 TP_ARGS(dd, ctxt, subctxt, req, sde, ahgidx, ahg, len, tidval),
664 __array(u32, ahg, 10)
668 __entry->ctxt = ctxt;
669 __entry->subctxt = subctxt;
672 __entry->idx = ahgidx;
674 __entry->tidval = tidval;
675 memcpy(__entry->ahg, ahg, len * sizeof(u32));
677 TP_printk("[%s:%u:%u:%u] (SDE%u/AHG%u) ahg[0-%d]=(%s) TIDVal=0x%x",
685 __print_u32_hex(__entry->ahg, __entry->len),
690 TRACE_EVENT(hfi1_sdma_state,
691 TP_PROTO(struct sdma_engine *sde,
695 TP_ARGS(sde, cstate, nstate),
696 TP_STRUCT__entry(DD_DEV_ENTRY(sde->dd)
697 __string(curstate, cstate)
698 __string(newstate, nstate)
700 TP_fast_assign(DD_DEV_ASSIGN(sde->dd);
701 __assign_str(curstate, cstate);
702 __assign_str(newstate, nstate);
704 TP_printk("[%s] current state %s new state %s",
712 "shared_limit %x vls 0-7 [%x,%x][%x,%x][%x,%x][%x,%x][%x,%x][%x,%x][%x,%x][%x,%x] 15 [%x,%x]"
716 ((struct buffer_control *)__get_dynamic_array(bct))->field \
719 DECLARE_EVENT_CLASS(hfi1_bct_template,
720 TP_PROTO(struct hfi1_devdata *dd,
721 struct buffer_control *bc),
723 TP_STRUCT__entry(DD_DEV_ENTRY(dd)
724 __dynamic_array(u8, bct, sizeof(*bc))
726 TP_fast_assign(DD_DEV_ASSIGN(dd);
727 memcpy(__get_dynamic_array(bct), bc,
730 TP_printk(BCT_FORMAT,
731 BCT(overall_shared_limit),
733 BCT(vl[0].dedicated),
736 BCT(vl[1].dedicated),
739 BCT(vl[2].dedicated),
742 BCT(vl[3].dedicated),
745 BCT(vl[4].dedicated),
748 BCT(vl[5].dedicated),
751 BCT(vl[6].dedicated),
754 BCT(vl[7].dedicated),
757 BCT(vl[15].dedicated),
762 DEFINE_EVENT(hfi1_bct_template, bct_set,
763 TP_PROTO(struct hfi1_devdata *dd, struct buffer_control *bc),
766 DEFINE_EVENT(hfi1_bct_template, bct_get,
767 TP_PROTO(struct hfi1_devdata *dd, struct buffer_control *bc),
771 hfi1_qp_send_completion,
772 TP_PROTO(struct rvt_qp *qp, struct rvt_swqe *wqe, u32 idx),
773 TP_ARGS(qp, wqe, idx),
775 DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device))
776 __field(struct rvt_swqe *, wqe)
783 __field(enum ib_wr_opcode, opcode)
784 __field(int, send_flags)
787 DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device))
789 __entry->wr_id = wqe->wr.wr_id;
790 __entry->qpn = qp->ibqp.qp_num;
791 __entry->qpt = qp->ibqp.qp_type;
792 __entry->length = wqe->length;
794 __entry->ssn = wqe->ssn;
795 __entry->opcode = wqe->wr.opcode;
796 __entry->send_flags = wqe->wr.send_flags;
799 "[%s] qpn 0x%x qpt %u wqe %p idx %u wr_id %llx length %u ssn %u opcode %x send_flags %x",
814 hfi1_do_send_template,
815 TP_PROTO(struct rvt_qp *qp, bool flag),
818 DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device))
823 DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device))
824 __entry->qpn = qp->ibqp.qp_num;
825 __entry->flag = flag;
828 "[%s] qpn %x flag %d",
836 hfi1_do_send_template, hfi1_rc_do_send,
837 TP_PROTO(struct rvt_qp *qp, bool flag),
842 hfi1_do_send_template, hfi1_rc_expired_time_slice,
843 TP_PROTO(struct rvt_qp *qp, bool flag),
847 #endif /* __HFI1_TRACE_TX_H */
849 #undef TRACE_INCLUDE_PATH
850 #undef TRACE_INCLUDE_FILE
851 #define TRACE_INCLUDE_PATH .
852 #define TRACE_INCLUDE_FILE trace_tx
853 #include <trace/define_trace.h>