Class Overview
Writes trace events to the system trace buffer. These trace events can be
collected and visualized using the Systrace tool.
This tracing mechanism is independent of the method tracing mechanism
offered by startMethodTracing()
. In particular, it enables
tracing of events that occur across multiple processes.
Summary
Public Methods |
static
void
|
beginSection(String sectionName)
Writes a trace message to indicate that a given section of code has begun.
|
static
void
|
endSection()
Writes a trace message to indicate that a given section of code has ended.
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this Object .
|
boolean
|
equals(Object o)
Compares this instance with the specified object and indicates if they
are equal.
|
void
|
finalize()
Invoked when the garbage collector has detected that this instance is no longer reachable.
|
final
Class<?>
|
getClass()
Returns the unique instance of Class that represents this
object's class.
|
int
|
hashCode()
Returns an integer hash code for this object.
|
final
void
|
notify()
Causes a thread which is waiting on this object's monitor (by means of
calling one of the wait() methods) to be woken up.
|
final
void
|
notifyAll()
Causes all threads which are waiting on this object's monitor (by means
of calling one of the wait() methods) to be woken up.
|
String
|
toString()
Returns a string containing a concise, human-readable description of this
object.
|
final
void
|
wait()
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
|
final
void
|
wait(long millis, int nanos)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait(long millis)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
|
Public Methods
public
static
void
beginSection
(String sectionName)
Writes a trace message to indicate that a given section of code has begun. This call must
be followed by a corresponding call to endSection()
on the same thread.
At this time the vertical bar character '|', newline character '\n', and
null character '\0' are used internally by the tracing mechanism. If sectionName contains
these characters they will be replaced with a space character in the trace.
Parameters
sectionName
| The name of the code section to appear in the trace. This may be at
most 127 Unicode code units long.
|
public
static
void
endSection
()
Writes a trace message to indicate that a given section of code has ended. This call must
be preceeded by a corresponding call to beginSection(String)
. Calling this method
will mark the end of the most recently begun section of code, so care must be taken to
ensure that beginSection / endSection pairs are properly nested and called from the same
thread.