Module utrace-trace-rpc
Lua API for a utrace-trace-rpc
Control recordings when utrace is used for event-recorder based tracing.
See also:
Info:
- Copyright: © Michael Ambrus 2018-
- License: MIT
- Author: Michael Ambrus michael@ambrus.se
Functions
| create (size) | Create or re-create a trace-buffer |
| init () | Initializes tracing and clears current buffer
Tracing will be ready, but not started. |
| start () | Starts tracing |
| stop () | Stops tracing |
| save (file) | Stops tracing and saves trace-buffer to file |
| dump (file) | dumps existng exents allready in file it to stdout
This function is not RPC as file content is the IPC. |
Functions
- create (size)
-
Create or re-create a trace-buffer If previous trace-buffer exists, it will be removed
If tracing is pending, it will first be stopped
Parameters:
- size int in elements
Returns:
-
int
elements in buffer or 0 if fail
- init ()
-
Initializes tracing and clears current buffer
Tracing will be ready, but not started. Return value is success or failure, the reason thereof is in logs.
Returns:
-
boolean
success/fail
- start ()
-
Starts tracing
Returns:
-
boolean
success/fail
- stop ()
-
Stops tracing
Returns:
-
boolean
success/fail
- save (file)
-
Stops tracing and saves trace-buffer to file
Parameters:
- file string -name
Returns:
-
int
number of recorded events
- dump (file)
-
dumps existng exents allready in file it to stdout
This function is not RPC as file content is the IPC.
NOTE: state of tracing is not affcted. I.e. any ongoing will continue in parallell. If so, note that dumping will affect the tracing.
Parameters:
- file string -name
Returns:
-
int
number of recorded events