English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

 
 
Thread Tools
Old 17 November 2020, 13:30   #1
Ernst Blofeld
<optimized out>
 
Ernst Blofeld's Avatar
 
Join Date: Sep 2020
Location: <optimized out>
Posts: 321
Profiling C code, interpreting results

I'e just run my lockdown project through the profiler and it's making me feel a bit thick. Does anyone know how to interpret results like these? I was expecting something like a drill down that would let me pick out the hot spots, but this is more like a wall of pink and orange rectangles.

Edit: I've played around a bit more and found that the mouse wheel scrolls in and clicking on an empty spot resets the zoom out to max, but I still don't get what I'm seeing, in particular, in my last few runs, _start and main appear several times, which surely can't be right.

Edit 2:

I now see, it's not what I thought it was, it profiles a single frame, i.e, 1/50th of a second.

Quote:
Frame Profiler: function-level + DMA profiling: during a debugging session, press the Profile button on the right of the debug toolbar, and 1 frame will be profiled. Press the rightmost button to profile 50 frames. Mark your WaitVBLs etc with calls to debug_start_idle() and debug_stop_idle() to show correct CPU usage under thumbnails.
I can't find this button to profile 50 frames though. If I could I could probably get what I need.

Is there a more traditional profiler available anywhere?
Attached Thumbnails
Click image for larger version

Name:	profiler.png
Views:	181
Size:	122.4 KB
ID:	69733  

Last edited by Ernst Blofeld; 17 November 2020 at 20:37.
Ernst Blofeld is offline  
Old 18 November 2020, 13:36   #2
pink^abyss
Registered User
 
Join Date: Aug 2018
Location: Untergrund/Germany
Posts: 410
The profile "50 frames" button is right to the STOP button. It looks like a chart with 3 bars.

Here some help for the profiler:
The profiler measures the time your functions needed.
Left is start of profile time, right is end of profile time(usually start and and end of frame).
Top -> down shows the callstack of the functions. So function "_start" calls "main" which calls "game" which calls "Draw" etc.
I'm not sure why "DrawSection" is outside the callgraph. Maybe a bug.

You can press left mouse on "> CPU" to unfold a text callgraph.
Perhaps this is what you are looking for.

I hope this helps.
pink^abyss is offline  
Old 18 November 2020, 13:39   #3
Ernst Blofeld
<optimized out>
 
Ernst Blofeld's Avatar
 
Join Date: Sep 2020
Location: <optimized out>
Posts: 321
Quote:
Originally Posted by pink^abyss View Post
The profile "50 frames" button is right to the STOP button. It looks like a chart with 3 bars.
I don't have that, I have just the STOP button, then the text "Profile", nothing else.
Attached Thumbnails
Click image for larger version

Name:	profile.png
Views:	112
Size:	5.5 KB
ID:	69749  
Ernst Blofeld is offline  
Old 18 November 2020, 23:18   #4
Bartman
Registered User
 
Join Date: Feb 2019
Location: Munich, Germany
Posts: 63
You still have the old version from the marketplace, I recommend you get the latest preview version from GitHub
Bartman is offline  
Old 19 November 2020, 09:46   #5
Ernst Blofeld
<optimized out>
 
Ernst Blofeld's Avatar
 
Join Date: Sep 2020
Location: <optimized out>
Posts: 321
Quote:
Originally Posted by Bartman View Post
the latest preview33 version from GitHub
Thanks, I've installed that now, and it's pretty awesome.

For it to be even more awesome I need to be able to select some or all of the frames to get aggregate results, even if they're limited to just the main function timings.

But even without that it's giving me very useful information.
Attached Thumbnails
Click image for larger version

Name:	preview.png
Views:	112
Size:	269.7 KB
ID:	69763  
Ernst Blofeld is offline  
Old 19 November 2020, 18:45   #6
tolkien
AmigaMan
 
tolkien's Avatar
 
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 763
Hiz! Looking at the profile section I see it is colourful with all that information but I cant get that in my vscode. All I see is a black screen.
Perhaps is a theme problem?
tolkien is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
VBCC Profiling options ? ReadOnlyCat Coders. C/C++ 9 28 October 2020 14:22
Interpreting DMA-Debugger output selco support.WinUAE 10 27 November 2019 20:48
Profiling code under WinUAE? deimos Coders. General 8 08 October 2018 17:55
Profiling WinUAE with Visual Studio 2013 mark_k support.WinUAE 3 14 January 2014 20:26
Error while interpreting script Makkinen support.Apps 1 15 October 2004 15:58

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:09.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.07452 seconds with 14 queries