To view or modify your I/O Trace capture options, select Tools»Options. By default, I/O Trace displays 1000 calls in the capture window, displays buffers in Small buffer mode, and does not enable file logging.

Note You can modify I/O Trace options only when capture is stopped.

Call History Depth

The Call history depth reflects the maximum number of API calls that I/O Trace can display. When the number of captured API calls exceeds the Call history depth, only the most recent calls are kept. If your computer runs out of memory, I/O Trace stops capture and displays a message box saying it is out of memory.

Start I/O Trace with Capture On

Select the Start I/O Trace with capture on checkbox to start I/O Trace capture automatically. By default, this option is not selected, and I/O Trace starts with capture off.

Buffer Limit Per Parameter

When I/O Trace records an API call that includes a buffer, the buffer contents are displayed in I/O Trace. You can specify how much of the buffer to record and save by choosing Small buffer or Large buffer mode. Small buffer mode displays up to 64 bytes of data. If there are more than 64 bytes of data, I/O Trace displays only the first and last 32 bytes of data. Large buffer mode displays up to 64 KB of data, but may significantly slow down your application. If there are more than 64 KB of data, I/O Trace displays only the first and last 32 KB of data. Both buffer modes use an entire row of dashes to signify omitted data.

File Logging

If file logging is enabled, I/O Trace writes all recorded calls to the specified log file. I/O Trace can save calls in three formats: a binary trace format, a plain text file, and a comma-separated variable (CSV) file. Only I/O Trace can open a trace file, which is much more efficient to create. Using the plain text file and CSV formats creates logs that a wide variety of editors can read, but the logs contain less information and are much slower to create while logging.

To log calls, you must specify the name of a file to store the logged calls. Calls can either allow I/O Trace to schedule writing or write to file as soon as possible.

By default, Allow I/O Trace to schedule writing is selected. Selecting Allow I/O Trace to schedule writing writes to the log file for each captured call, but does not flush the log file until capture is halted. This mode of file logging is much faster than specifying Write to file as soon as possible, but if your system crashes, at least some of the log file likely will be lost.

Note The use of file logging slows down the performance of all running applications, and if you are low on disk space, you are likely to run out of disk space.

Selecting Write to file as soon as possible ensures that the call is logged quickly. In an I/O Trace Capture file, the call is written to file before returning control to the calling application, ensuring that the log file is complete even if the system crashes. When writing to a plain text file or CSV file, the file is written when I/O Trace displays it, and the call may not be logged if there is a crash.

File logging is useful in debugging an application that causes the system to crash. If you use file logging to log an I/O Trace Capture file with Write to file as soon as possible selected, you can open the saved .nitrace file after your system has restarted to examine the API calls captured up to the point where the system crashed. If file logging is used in tandem with a plain text file or CSV file and Write to file as soon as possible is selected, other applications can use the output without having to stop logging.

Limiting File Size

To avoid running out of disk space when logging to a file, I/O Trace includes the following options for limiting file size. To access these options, select Tools»Options and select the Logging tab.

Split Contents Across Multiple Files

This option limits the maximum file size by having I/O Trace write to multiple files. For example, if you specified logging to test.nitrace in the Log to File section, I/O Trace begins logging to test.000001.nitrace after reaching the specified limit size, then test.000002.nitrace, and so on.

By default, I/O Trace logs only to the file you specified; therefore, the file size is limited only by the size of your storage medium.

Delete Files Older Than the Most Recent

This option tells I/O Trace to delete interim log files. Keep this option enabled, because the main reason for splitting captures into multiple files is to avoid running out of disk space.

Preserve Initial File

This option prevents deleting the first in the series of log files. This is important, because an application often performs its initialization at the beginning; keeping the first file allows viewing those initial calls as well as the last ones.