SYNTAX

    btrace [options] [<file_name>]


OPTIONS

-h (--help) bool

Display help.

-f (--filter) uint

Set a primary filter (for suitable values see BTrace::TCategory, defined in \epoc32\include\e32btrace.h). Can be specified more than once.

-s (--secondary) uint

Set a secondary filter. Can be specified more than once.

-m (--mode) uint

Set capture mode (for suitable values see RBTrace::TMode, defined in \epoc32\include\d32btrace.h).

-b (--buffer) uint

Set the buffer size (in KB).

-d (--dump) bool

Dump contents of trace buffer to debug port. The data is printed in hexdump format.

-F (--follow) bool

Monitor the trace buffer and automatically write its contents when it gets to (by default) 50% full.

-t (--threshold) uint

Set the percentage of data present in the trace buffer that triggers a write. Defaults to 50%. If set to zero, the trace buffer will be flushed every time data is written to it. Intended to be used in conjunction with --follow.

-T (--timestamp2) bool

Enable the btrace timestamp2 field. This causes each btrace frame to store both the fast counter value and the nano-kernel tick count value (ordinarily only the fast counter value is stored).

-v (--verbose) bool

Print verbose output.

-e (--test) bool

Tests that data can be written to and read from btrace successfully.

-r (--reset) bool

Sets the trace buffer's mode to disabled, discards its current contents and removes all filters.

-c (--text-trace-mode) uint

Set the kernel text trace mode (Kern::SetTextTraceMode). This is included as a btrace option because the default setting ESerialOutDefault will prevent RDebug::Prints from going to the debugport when btrace is configured to capture rdebug.


ARGUMENTS

[<file_name>]

The name of the file to write the current trace buffer contents to. [filename]


DESCRIPTION

Configures and fetches data from the btrace buffer.

The Symbian OS kernel provides an efficient binary logging mechanism called btrace. This command can be used to configure what data are written to this buffer, and also allows the data to be retrieved. It is functionally similar to the btrace.exe that is released as part of Symbian OS. The main differences are:

a)

It can repeatedly dump the contents of the buffer each time it gets to a particular percentage full (via the -F and -t options).

b)

If run without any arguments or in verbose mode (-v), the current btrace configuration is displayed

When using atrace to configure what is written to the buffer, if any primary filters are specified using the -f option, all filters are disabled, then the buffer is emptied, then the specified filters are switched on (and thus primed). If a mode is specified, it is set before considering filters or filename arguments. Therefore it is a good idea when retrieving data from the buffer (by specifying a filename) to also specify -m0 to switch off output, otherwise the writing to file may never complete if atrace data is constantly being written.

The arguments needed to begin profiling are -m1 -f3,9,15,18. Then run uprofiler start as normal. To stop run uprofiler stop (optional), then invoke this command with arguments -m0 filename.utf.


SEE ALSO

atrace


COPYRIGHT

Copyright (c) 2007-2010 Accenture. All rights reserved.