Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user maak ! (Registered 2024-04-18) You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Profiling tool?
2019-02-20 08:44
ChristopherJam

Registered: Aug 2004
Posts: 1370
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..
2019-02-20 09:02
soci

Registered: Sep 2003
Posts: 473
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.
2019-02-20 09:33
JackAsser

Registered: Jun 2002
Posts: 1987
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)
2019-02-20 10:09
ChristopherJam

Registered: Aug 2004
Posts: 1370
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 :(
2019-02-20 13:55
Krill

Registered: Apr 2002
Posts: 2825
Quoting JackAsser
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)
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.
2019-02-20 19:09
Digger

Registered: Mar 2005
Posts: 421
@Krill: genius!
2019-02-20 21:06
chatGPZ

Registered: Dec 2001
Posts: 11100
i used that in some part (with an existing player of course) to get rid of spikes.... forgot where though :)
2019-02-20 21:47
Frantic

Registered: Mar 2003
Posts: 1627
Ergo; Groepaz is a genius
2019-02-21 12:15
Perplex

Registered: Feb 2009
Posts: 254
I know Bjørn Røstøen has done this, as well as the guys in Booze Design. There are many geniuses out there.
2019-02-21 12:42
chatGPZ

Registered: Dec 2001
Posts: 11100
Ah yes, i think i stole the idea from HCL. There might be a thread about this here (from about a decade ago) :)
2019-02-21 15:48
ChristopherJam

Registered: Aug 2004
Posts: 1370
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
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Matt
Acidchild/Padua
csabanw
Didi/Laxity
buzz_clik
LDX#40
Guests online: 98
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 The Ghost  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.9)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 Wafer Demo  (9.5)
7 TRSAC, Gabber & Pebe..  (9.5)
8 Onscreen 5k  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Graphicians
1 Sulevi  (10)
2 Mirage  (9.8)
3 Lobo  (9.7)
4 Mikael  (9.7)
5 Archmage  (9.7)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.059 sec.