Performance Profiler - A first attempt

Page 4/9
1 | 2 | 3 | | 5 | 6 | 7 | 8 | 9

By salutte

Master (165)

salutte's picture

27-02-2020, 05:42

Ah! That's the problem. I'm using the default openmsx from ubuntu. It did everything I needed so far Smile.
Thanks!

Btw, I am modifying the script to show mean average time used per frame + standard deviation, if anyone is interested.

By salutte

Master (165)

salutte's picture

27-02-2020, 21:10

Confirmed, the missing support for "-once" was the problem, however, I needed a build more recent than 15.0, as 15.0 is from december 2018, and -once was added six months later. I got the most recent snapshot from github, compiled like a charm, and I'm rolling out with it. Smile

By Bengalack

Paladin (802)

Bengalack's picture

28-02-2020, 15:24

Just wanting show some appreciation! This is so awesome! As I finally have an ok dev-setup I will look into this ASAP, and can’t wait to see the availability of the timeline-view. Insanely impressive. And pretty nice show of of the vdp/cpu-concurrency we have (and can utilize) on the good ‘ol msx Smile

By salutte

Master (165)

salutte's picture

02-03-2020, 13:28

Hi all,

I updated Grauw's profile to make it easier (for me) to profile my megarom C programs. I made a public repository for the profiler on:
https://github.com/MartinezTorres/OpenMSX_profiler

And enables this:

I'm pretty new to TCL, so if anyone wants to improve my code I'd appreciate it. Also, if we plan to add functionality, maybe this is a good place to centralize development.

By Manuel

Ascended (19678)

Manuel's picture

02-03-2020, 23:31

Wow, so cool.

If you guys think you're done with it, why not make a pull request so we can include it and further develop it in the main openMSX repo?

By salutte

Master (165)

salutte's picture

03-03-2020, 10:17

Thanks Manuel!

Let's aim for this goal, but I think it's still a little bit green for integration. I learnt TCL last Sunday Smile

Also, the capabilities can still change quite dramatically, as everyone has different profiling needs (I basically took Grauw's and adapted to my own needs). I'd suggest to have it in a separate repo for the moment, and once it gets stable, let's do the pull request (If it's fine for Grauw).

BTW, I'm doing a quite ugly hack to find the current refresh rate, is there an easy way to retrieve it?

By Manuel

Ascended (19678)

Manuel's picture

03-03-2020, 22:06

salutte: ah, but there are many examples in the scripts folder, as you have seen Smile

What kind of features did you change/add?

Check proc get_frame_duration in _tas_tools.tcl... or do you mean something completely different?

By Bengalack

Paladin (802)

Bengalack's picture

08-03-2020, 19:31

This stuff is really good. I'm somewhat up and running with this now.

If I'd like to avoid restarting the emulator all the time, but just keep on building the .com-file and run it. Is there a way to reset the profiler-settings? Like profile::reset of clear (as exists in symbols::clear)? I'm using the symbol scope mapping mechanism now, and every build will change many of the addresses, so things need to be reset before next run.

By salutte

Master (165)

salutte's picture

10-03-2020, 23:00

Thanks for the comments!!
@Manuel, _tas_tools.tcl was the right place! I'm learning a lot.

More questions:
- is there a simple examples for contextual menus?
- how can I create a widget that is aligned to the right side of the screen?

I'm working on a significant rewrite, currently pushed in the dev branch. Some of the planned features
- Execute TCL from z80: done (I use it to activate and deactivate the profiler within a ROM).
- Automatic differentiation of IRQ, non-IRQ, and VDP sections.
- Provide additional information per section: average execution time per instance, and average CPU usage.
- New UI: Enabling and disabling sections, reset MAX markers, change units, change order.
- Export raw measurements to a file.
- I'll try to add the profile::clear function.

Currently its pretty buggy, and looks like:

By ToriHino

Paladin (925)

ToriHino's picture

10-03-2020, 23:49

Very good work salutte (and Grauw Smile ). This is really a helpful extension to this development environment.

Page 4/9
1 | 2 | 3 | | 5 | 6 | 7 | 8 | 9