|
|
Define a trace buffer to use with the Pin trace buffer API. This function defines the shape of the buffer, but doesn't allocate the buffer itself. Each thread implicitly creates its first buffer on start-up. Additional buffers may then be created using PIN_AllocateBuffer, but this is only needed by tools using "double buffering".
- Parameters:
-
| [in] | recordSize | Size (bytes) of each record in the buffer. This size must be less than the size of an OS page. |
| [in] | numPages | The number of OS pages to allocate for each buffer. This size does not have to be an even multiple of recordSize. |
| [in] | fun | A call-back function that is called whenever the buffer is full, or when the thread exits with a partially-full buffer. |
| [in] | val | Passed as the last argument to fun. |
- Returns:
- On success, a BUFFER_ID. On error (e.g., maximum number of trace buffers exceeded,) returns BUFFER_ID_INVALID.
- Availability:
- Mode: JIT
O/S: Linux & Windows
CPU: IA-32 and Intel(R) 64 architectures
|