| |
ChristopherJam
Registered: Aug 2004 Posts: 1409 |
Profiling tool?
Has anyone come across or written a tool that lets you execute a chunk of 6502 that then reports back a disassembly where each instruction is annotated with the total number of cycles it consumed?
Something like unp64 but with added instrumentation, basically.
Closest a quick google found for me was a tool for generating such reports from logs produced by a hardware bus monitor.. |
|
| |
soci
Registered: Sep 2003 Posts: 480 |
This was discussed already:
https://csdb.dk/forums/?roomid=11&topicid=68967&firstpost=36
And mentioned later here:
https://csdb.dk/forums/?roomid=11&topicid=125026&firstpost=12
Otherwise who would want to do that for demo coding. |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
I did to check min/max/avg raster time for sid tunes. Output is time spent on each instruction and a disassembly, to find hot spots (typically vibrato or pulse sweeps) |
| |
ChristopherJam
Registered: Aug 2004 Posts: 1409 |
Ah excellent, thanks soci.
I somehow missed the trace command in the VICE monitor. I assume that's what you used for "Then I run the binary in VICE and start a trace at the place of interest for as long as necessary"?
seems to be hella slow for 700,000 cycles worth of execution, mind :( |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Quoting JackAsserI did to check min/max/avg raster time for sid tunes. Output is time spent on each instruction and a disassembly, to find hot spots (typically vibrato or pulse sweeps) Off topic, but that reminds me of an old idea of mine:
At the beginning of the player routine called each frame, read this frame's SID register values from a ring buffer and write them to the actual SID registers. Then switch to a thread that would fill the ring buffer with new data until switching back to the calling thread is done with a timer or raster interrupt.
Result: player CPU load spikes are evened out, player code and structure is greatly simplified as no manual load balancing is required. Maximum player CPU time for every video frame can be minimised. |
| |
Digger
Registered: Mar 2005 Posts: 437 |
@Krill: genius! |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
i used that in some part (with an existing player of course) to get rid of spikes.... forgot where though :) |
| |
Frantic
Registered: Mar 2003 Posts: 1648 |
Ergo; Groepaz is a genius |
| |
Perplex
Registered: Feb 2009 Posts: 255 |
I know Bjørn Røstøen has done this, as well as the guys in Booze Design. There are many geniuses out there. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
Ah yes, i think i stole the idea from HCL. There might be a thread about this here (from about a decade ago) :) |
| |
ChristopherJam
Registered: Aug 2004 Posts: 1409 |
The scene is full of the greatest minds in the galaxy :D
Now, where's my profiling tool? :P |
... 23 posts hidden. Click here to view all posts.... |
Previous - 1 | 2 | 3 | 4 - Next |