Changeset 5865c72 for tools/tracetop

03/25/09 17:02:51 (13 years ago)
Daniel Lawson <dlawson@…>
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes

Added dag_dump_packet(), to abstract the mechanics of actually writing to the dag card. This function wraps up a performance optimisation - when we request tx space, we request a large amount and memcpy into this, then once this reaches a threshold, we commit the entire thing. This could do with some tweaking, and perhaps a freshness check. Also fixed a size/alignment issue which was causing tx problems.

dag_write_packet() now attempts to convert from other packet types into ERF format, as per erf_write_packet() in format_erf.c, however THIS HAS NOT BEEN TESTED. Use at your own risk, and fix it yourself when it breaks :)

dag_fin_output() now includes a call to dag_tx_stream_commit_bytes() to flush the txbuffer on program close, and then a call to dag_tx_get_stream_space() for nearly the size of the stream buffer. Note that we don't request the exact size (we request a 64bit word less than the exact size), as this doesn't work. The call to dag_tx_get_stream_space() allows the tx stream buffer on the card to drain before we detach - otherwise we'd lose anything still in the tx buffer.

This means that trace_destroy_output() MUST be called if you want to be sure that you actually finish transmitting!

(No files)

Note: See TracChangeset for help on using the changeset viewer.