measuring execution time of assembler routines

Página 1/2
| 2

Por santiontanon

Paragon (1636)

Imagen del santiontanon

22-05-2016, 00:44

Hi all, quick question, is there a good way to measure the number of CPU ticks (M cycles or T cycles) that a given assembler routine takes to execute? (other than doing it manually Smile)

I'm playing around with some little project, and very quickly my code grew into something that cannot be run at 50 frames per second (and most likely because it's grossly inefficient, since I'm still learning Smile)

Thanks in advance!

Login sesión o register para postear comentarios

Por ricbit

Champion (438)

Imagen del ricbit

22-05-2016, 01:30

The best way by far is to use TCL scripts in openmsx, this way you can have cycle-accurate measures for Z80 code.

Por santiontanon

Paragon (1636)

Imagen del santiontanon

22-05-2016, 07:56

Thanks to both!

@ricbit: I'm new to all of this MSX assembler world, so, I'm not familiar with the tools, etc. Do you have any example of TCL script for openmsx to do something similar, so I could adapt?

@Bit Addict: thanks for the link! I might try Grauw's script (Sandy's profiler is for Windows, and thus I can't use...)

Por ARTRAG

Enlighted (6844)

Imagen del ARTRAG

22-05-2016, 08:30

This is for small routines

http://msx.jannone.org/bit/

Por ricbit

Champion (438)

Imagen del ricbit

22-05-2016, 13:55

@santiontanon Grauw's script is a great example of tcl script profiling

Por santiontanon

Paragon (1636)

Imagen del santiontanon

22-05-2016, 16:29

Oh wow! that link is great ARTRAG, thanks! I'll play around with that and if I need something more powerful, then I'll go with the TCL script. Thanks a lot guys, this really helped Smile

Por hit9918

Prophet (2923)

Imagen del hit9918

22-05-2016, 20:21

just change the color register at start and end of the code in question.
you get a real life dynamic cpu usage equalizer display.

Por Metalion

Paragon (1509)

Imagen del Metalion

23-05-2016, 10:29

ARTRAG wrote:

This is for small routines
http://msx.jannone.org/bit/

I get an "Account Suspended" page ... :(

Por ARTRAG

Enlighted (6844)

Imagen del ARTRAG

23-05-2016, 10:49

Strange, it was active till Friday

Por Grauw

Ascended (10581)

Imagen del Grauw

23-05-2016, 15:30

It works for me now.

Página 1/2
| 2