Writes made to an STX image will be saved to a file whose extension is .wd1772
instead of .stx ; when a .stx file is loaded later, we look for a matching .wd1772
file to restore the changes made to the .stx file
For now, only 'write sector' commands are saved, not 'write track'
The ctype functions need an unsigned char, or the behaviour is
"undefined" with certain compilers and C-libraries.
Thanks to Vincent Rivière for the hint.
It seems that whether offsets are from section start
or from TEXT section start is not just VBCC vlink
issue, so try TEXT offset if section offset fails
regarless of compiler identification.
- hconsole.Main() constructor takes Hatari command line options as
argument, and another (optional) option for whether Hatari
disappearing will terminate the process
- run() method returns False if Hatari disappears
(or given command was missing/unrecogized)
it seems that VBCC may be an exception in giving
offsets for all symbol types relative to TEXT
section, so code now checks for VBCC compiled
binary identification and special-cases them
The first column is really about how many times given
symbol is visited (e.g. by loop that starts from first
instruction in a routine), it's not about subroutine calls,
which can be confusing.
Hopefully renaming it to "Visits/calls" reminds about this.
- if inclusive cost is < in-between-symbols cost, there
may be symbols missing
- don't give so much space for symbol names. DRI/GST
limits name len to 22, use something similar
- owncounts can be zero although totalcounts aren't
- it's easy to get error if symbols don't from some
reason match (e.g. because you re-compiled binary
without re-generating symbols), error message now
comments about this.
-i: show also total time for cycles and per call instructions & time
-p: show both inclusive & exclusive costs, and both percentage & counts
for them (only inclusive for calls, as for those exclusive values
are always same as default counts)
This can output DRI/GST format symbol table from
Atari program in ASCII format which is understood
by the profile data post-processor (and Hatari
debugger 'symbols' command in case you want to
modify the symbol information before giving it
to the debugger).
These make the graph options behave in more expected way:
* nodes connected to ones specified for --ignore option
are relinked
* emphasis limit isn't affected by count option
* --only-subroutines option removes all nodes that aren't
called as subroutines, regardless of their cost
* improve --compact option documentation
* Use caller->callee call type to add some type identification
for the called symbol/function. Use that info to:
- Handle PC_UNDEFINED introduced by previous patch, and mark such
node(s) in callgraphs separately, as it implies it being the first
symbol called during profiling.
- Add preliminary --only-subroutines option that leaves to callgraph
only symbols that either are called as subroutines, or which
costs exceed the given limit.
Unlike the new Hatari provided subroutine call costs, the estimated
costs were just estimates, and could be completely wrong, that's
why this is changed.
The patch is messier than I would like, besause besides:
- adding support for actually using the new Hatari information
(that was parsed already by previous commit(s))
- removing code for estimated cost propagation
- removing kcachegrind call info for nodes that
don't have (anymore) total costs
- documenting the new -p option
- updating comments
it also does some other changes:
- class method and member name changes:
- propagate -> subcost
- total -> subtotal
- data/value -> cost
- add "str" postfix to local variable names that are in
other methods used for integers/tuples instead of strings
- add "bold" attribute to callgraph nodes & arrows
for things that are over the given limit
- couple of minor, unrelated doc updates
(they were too intermixed with the other changes.)
includes:
- common code for collecting, processing and outputting
the data about the full costs
- full CPU side support
- related structure changes in DSP code
- some extra refactoring to improve code CPU/DSP profiling code
- post-processor support for parsing the new data
and storing it internally
missing:
- DSP side code (opcode classification) needed for
getting the full costs
- post-processor actually using the new data
- testing the new data correctness
These are helpers for really large graphs
* With --mark one can specify substrings for node names
which should be separately highhlighted in graph.
This is useful when you're interested in something
that's below normal highlight limit
* With --no-limited, all nodes below limit are removed
from graph. This is something one could try if using
"--compact --no-leafs --no-intermediate" still leaves
too many nodes to the graph for it to be readable