OH(1)OH(1)NAME
oh - print object history
SYNOPSIS
oh pid mode [-subst old new]
DESCRIPTION
oh records all of the retain and release activity for a given process
and can list all of the stacks that involve a given object.
Additionally, oh can pinpoint the biggest generators of autorelease.
Using oh on a process makes it run much more slowly, so you should use
it sparingly.
oh takes two arguments: a process ID and a mode. The process ID is the
ID of the process that you want to record activity about. The mode is
any one of the following:
start Start recording information about the process.
stop Stop recording information about the process.
autorelease
List all of the stacks that contain an autorelease message.
address
List all of the stacks that include a message allocating or
deallocating the object at adddress.
OPTIONS
pid The ID (obtained using pid(1)) of the process you want to gather
information about.
mode Is the action oh should take (see above).
-subst old new
Replaces the executable in path old with the executable in path
new. This option is often used to replace a stripped version of
the executable with a version that contains debugging symbols.
EXAMPLES
To use oh, start up the program that you want to analyze, obtain its
process id, then execute:
oh pid start
oh starts recording information about object allocation and
deallocation. After oh has started recording, you can enter the address
of an object like this:
oh pid address
and oh displays the stacks, from oldest to newest, involving that
object.
To stop recording with oh, enter:
oh pid stop
You might find it useful to set the NSZombieEnabled environment
variable to YES before starting up your program. This environment
variable ensures that memory does not get reused, thus ensuring that
any address you give to oh will be unique.
You can run oh in conjunction with gdb so that you can use gdb to
easily obtain the address of an object. It's also useful to run oh in
conjunction with leaks to help find a cause of a memory leak.
BUGS
oh ignores objects that have overridden retain and release.
NeXT Software, Inc. March 28, 1996 OH(1)