|
GEOS SDK TechDocs
|
|
getenv ...
|
help ...
handsum
handsum
Examples:
-
"handsum"
- Summarize the use to which the handle table is being put.
This command analyzes the handle table and prints out a list of the number of handles being used by each geode, and for what purpose.
-
The columns of the output are labeled somewhat obscurely, owing to horizontal-space constraints. The headings, and their meanings are:
-
Res
- Resource handles (i.e. handles for data stored in the geode's executable)
-
Mem
- Non-resource memory handles
-
File
- Open files
-
Thds
- Threads
-
Evs
- Recorded events
-
Qs
- Event queues
-
Sems
- Semaphores
-
EDat
- Data for recorded events
-
Tim
- Timers
-
SB
- Saved blocks (handles tracking memory/resource handles whose contents will go to an application's state file)
-
VMF
- VM files
-
The "handles" command is good at printing out all the handles for a particular geode, but it's generally too verbose to use for the entire handle table. That's why this command exists.
-
It's a good idea to issue the command "dcache length 4096" before executing this command, as it ensures the entire handle table will end up in Swat's data cache, for quick access if you want to use the "handles" command immediately afterward.
hbrk
hbrk <address> (byte|word) (match|mismatch) <value>
Examples:
-
"hbrk scrollTab+10 byte match 0"
-
print message handlers until a zero is written at scrollTab+10.
-
"hbrk OLScrollButton+3 word mismatch 0x654f"
-
Break when the word at OLScrollButton+3 is destroyed.
Break when a memory location changes.
-
The <address> argument is the address to watch for a change.
-
The (byte|word) argument indicates whether to watch a byte or a word for a change.
-
The (match|mismatch) argument indicates whether to break if the value at the address matches or mismatches the value hbrk is called with.
-
hbrk emulates a hardware breakpoint by checking at every message call to see if a location in memory has been written to. If so, swat breaks and tells between which two messages the write occurred. The information and the return stack will hopefully guide you to the offending line of code.
-
The command creates two breakpoints. Remove these to get rid of the hardware breakpoint.
See Also: brk,
mwatch,
showcalls.
heapspace
heapspace <geode>
heapspace total
heapspace syslib
Examples:
-
"heapspace geomanager"
-
print out "heapspace" value for geomanager
-
"heapspace total"
-
print out maxTotalHeapSpace
-
"heapspace syslib"
-
print out space being used by system libraries.
Prints out how much space the program requires on the heap. This value may then be used in a "heapspace" line of the program's .gp field. This command only determines present usage--to determine the most heapspace your geode will ever use requires that you make it allocate as much space as it ever will. This means pulling down all menus, opening all dialog boxes, and generally building out all UI gadgetry. The value this command prints is roughly the non-discardable heap usage by the app and any transient libraries that it depends on, plus an additional amount for thread activity.
When using this command, you should run your application on the device it is to run on. One or more system libraries may be XIP (running from ROM) on the device, but run from RAM on your target PC's emulator. Thus, to get a more accurate picture of memory usage, run the application on the planned device.
|
GEOS SDK TechDocs
|
|
getenv ...
|
help ...