op_trace_suspend()
摘要
暂停所有跟踪输出。
语法
op_trace_suspend ()
| 参数 | 类型 | 说明 |
|---|---|---|
| 无参数 |
返回类型
void
无返回值。
示例
/* allocate a list */
list_ptr = (List *) op_prg_mem_alloc (sizeof (List));
/* initialize a list */
op_prg_list_init (list_ptr);
/** move the contents of subqueue #0 into the list **/
/* determine the number of packets in the subqueue */
subq_size = op_subq_stat (0, OPC_QSTAT_PKSIZE);
/* don't bother tracing the inserts */
op_trace_suspend();
for (i = 0; i < subq_size; i++)
{
/* take a single packet from the subqueue head */
pkptr = op_subq_pk_remove (0, OPC_QPOS_HEAD);
/* insert the packet onto the list tail */
op_prg_list_insert (list_ptr, pkptr, OPC_LISTPOS_TAIL);
}
/* reactivate tracing */
op_trace_resume();
详情
当 ODB 未启用时,该内核过程不起任何作用。
用途
提供了一种临时暂停 ODB 中所有跟踪的方法。通过跳过大段相似的调用序列(例如遍历 Prg 链表时),可以帮助你聚焦于感兴趣的问题。
错误
- 无。
参考
- 使用 op_trace_resume() 重新激活跟踪。