Profiling with ICC

Discuss topics related to development here.
Post Reply
User avatar
MarathonMan
Site Admin
Posts: 692
Joined: Fri Oct 04, 2013 4:49 pm

Profiling with ICC

Post by MarathonMan » Thu Jan 22, 2015 10:48 am

I don't think these are too accurate; gcc+perf seem to give different results. There's really no reason why vi_cycle would take up that much runtime -- it's a simple if statement...
Attachments
zeldaoot.png
Zelda: OoT
zeldaoot.png (123.61 KiB) Viewed 15322 times
SM64-icc.png
Super Mario 64
SM64-icc.png (124.74 KiB) Viewed 15322 times

User avatar
MarathonMan
Site Admin
Posts: 692
Joined: Fri Oct 04, 2013 4:49 pm

Re: Profiling with ICC

Post by MarathonMan » Thu Jan 22, 2015 10:52 am

ICC's IPO analysis is quite bad it seems.

beannaich
Posts: 149
Joined: Mon Oct 21, 2013 2:43 pm

Re: Profiling with ICC

Post by beannaich » Fri Jan 23, 2015 12:53 am

MarathonMan wrote:ICC's IPO analysis is quite bad it seems.
If you'd like I can try running it through the visual studio profiling tools and post the results for my system.

User avatar
Breadwinka
Posts: 54
Joined: Fri Oct 04, 2013 11:35 pm

Re: Profiling with ICC

Post by Breadwinka » Fri Jan 23, 2015 8:28 pm

beannaich wrote:
MarathonMan wrote:ICC's IPO analysis is quite bad it seems.
If you'd like I can try running it through the visual studio profiling tools and post the results for my system.
I would be intrested in seeing this. I would try it but i recently reformatted and don't have VS installed atm.

User avatar
Narann
Posts: 154
Joined: Mon Jun 16, 2014 4:25 pm
Contact:

Re: Profiling with ICC

Post by Narann » Fri Jan 23, 2015 10:59 pm

MarathonMan wrote:There's really no reason why vi_cycle would take up that much runtime -- it's a simple if statement...
Yeah but how many times? :(

User avatar
MarathonMan
Site Admin
Posts: 692
Joined: Fri Oct 04, 2013 4:49 pm

Re: Profiling with ICC

Post by MarathonMan » Sat Jan 24, 2015 9:04 am

beannaich wrote:
MarathonMan wrote:ICC's IPO analysis is quite bad it seems.
If you'd like I can try running it through the visual studio profiling tools and post the results for my system.
That'd be very helpful. The performance on Windows always seems about 10%+ behind Linux and I haven't been able to track down what's causing it yet.''
Narann wrote:
MarathonMan wrote:There's really no reason why vi_cycle would take up that much runtime -- it's a simple if statement...
Yeah but how many times? :(
62.5 million/second. :D

But the VR4300 has multiple branches that execute 93.75 million/times second, so the numbers don't add up.

I'm fairly certain that ICC was generating a call for vi_cycle and profiling at the beginning of the call.

Either way, it led me to check whether GCC was inlining as aggressively as I wanted and it wasn't... so got a solid VI/s boost as a result.

User avatar
Narann
Posts: 154
Joined: Mon Jun 16, 2014 4:25 pm
Contact:

Re: Profiling with ICC

Post by Narann » Sun Jan 25, 2015 11:02 pm

MarathonMan wrote:it led me to check whether GCC was inlining as aggressively as I wanted and it wasn't... so got a solid VI/s boost as a result.
Did I told you about -Winline?
Using -Winline will warn when a function marked inline could not be substituted, and will give the reason for the failure.

AIO
Posts: 51
Joined: Wed Nov 05, 2014 4:56 pm

Re: Profiling with ICC

Post by AIO » Mon Jan 26, 2015 4:54 am

I've honestly had good experiences with using Intel's profiler. When I finally get around to compiling, I can try profiling as well. One thing I love about Intel's compiler is that it aggressively inlines :D .

Could the performance difference on windows be because of OpenGL? I know that my hardware is terrible with OpenGL ;/ .

User avatar
Narann
Posts: 154
Joined: Mon Jun 16, 2014 4:25 pm
Contact:

Re: Profiling with ICC

Post by Narann » Mon Jan 26, 2015 10:25 am

AIO wrote:Could the performance difference on windows be because of OpenGL? I know that my hardware is terrible with OpenGL ;/ .
IIRC, Cen64 only use OpenGL for buffer dispay right? If so, how OpenGL could be a bottleneck?

User avatar
MarathonMan
Site Admin
Posts: 692
Joined: Fri Oct 04, 2013 4:49 pm

Re: Profiling with ICC

Post by MarathonMan » Mon Jan 26, 2015 12:57 pm

AIO wrote:Could the performance difference on windows be because of OpenGL? I know that my hardware is terrible with OpenGL ;/ .
Narann wrote:
AIO wrote:Could the performance difference on windows be because of OpenGL? I know that my hardware is terrible with OpenGL ;/ .
IIRC, Cen64 only use OpenGL for buffer dispay right? If so, how OpenGL could be a bottleneck?
Right; there's like 2 or 3 OpenGL calls executed one per every frame. And, to add to that, all the calls are executed from the UI thread (aside from emulation)... so even a software renderer and a dual core CPU can handle it.

Furthermore, if you compile CEN64 for Windows on Windows (using the same compiler -- MinGW), the loss in performance goes away (supposedly)? :| It's only when a cross-compile the binaries on Linux...

AIO
Posts: 51
Joined: Wed Nov 05, 2014 4:56 pm

Re: Profiling with ICC

Post by AIO » Mon Jan 26, 2015 4:50 pm

I knew it was a stretch, but I thought maybe an unlikely scenario could actually be true.

I know that on zilmar spec emulators, with OpenGL plugins, I generally get less VI/s, but idk how threading works. I will have to learn about threading!
MarathonMan wrote: Furthermore, if you compile CEN64 for Windows on Windows (using the same compiler -- MinGW), the loss in performance goes away (supposedly)? :| It's only when a cross-compile the binaries on Linux...
I did not expect this to be the case either ;/ .

User avatar
Narann
Posts: 154
Joined: Mon Jun 16, 2014 4:25 pm
Contact:

Re: Profiling with ICC

Post by Narann » Mon Jan 26, 2015 5:45 pm

AIO wrote:I know that on zilmar spec emulators, with OpenGL plugins, I generally get less VI/s
Yeah, because those plugins where written at the same time zilmar spec appear, long time ago (2000's), when OpenGL (1.x) was shit and D3D was more versatile (but still shit). So you can have a massive hardware, if the plugin is still using OpenGL 1.x you will have bad performance because plugin authors have more work to do to simulate RDP using the crappy OpenGL fixed pipeline.

The way GPUs are used now (2015) has nothing similar and there has been a huge improvement starting with OpenGL 2.1 (Programmable pipeline) and since 4.0 there is no more D3D vs OpenGL. Both are the same (except D3D is limited to Microsoft OS).

User avatar
darkszero
Posts: 4
Joined: Fri Oct 25, 2013 12:52 pm

Re: Profiling with ICC

Post by darkszero » Wed Feb 04, 2015 11:56 pm

I built cen64 on visual studio 2013 x64 and ran profiler while running the mario 64 rom. Results are attached.

HOWEVER: even without the debugger attached, and trying ocarina of time, the game is a white screen 100% of the time.
Attachments
cen64_mario.zip
(15.63 KiB) Downloaded 309 times

AIO
Posts: 51
Joined: Wed Nov 05, 2014 4:56 pm

Re: Profiling with ICC

Post by AIO » Sun Mar 01, 2015 10:19 pm

MarathonMan, are you using Intel 2015? I just tried it on a friend's machine and I saw some really strange results. In some ways 2015 improved, compared to 2013, but there seems to be some downsides. On the upside, it identifies more stuff, like JIT code is no longer labeled as unknown. But it's telling me that some irrelevant functions are bottlenecks (like DisplayError) lol... Going to try figuring out why it's doing that. Glad I didn't upgrade yet.
Narann wrote:if the plugin is still using OpenGL 1.x you will have bad performance because plugin authors have more work to do to simulate RDP using the crappy OpenGL fixed pipeline.
Good point here. A lot of plugins were using 1.x.

User avatar
MarathonMan
Site Admin
Posts: 692
Joined: Fri Oct 04, 2013 4:49 pm

Re: Profiling with ICC

Post by MarathonMan » Tue Mar 03, 2015 12:06 pm

No; I was using an older version. I have a good feeling for where the bottlenecks are and have been thinking about how to proceed with the next wave of optimizations during my hiatus over the past few weeks... just need some time to get around to things. :D

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest