Profile Build - Page 2

Profile Build

Various things about Spring that do not fit in any of the other forums listed below, including forum rules.

Moderator: Moderators

User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Profile Build

Post by Beherith »

Youll have much better results in people looking at that profile by taking a screenshot of the top inclusive and exclusive samples.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Profile Build

Post by Argh »

Sorry, I thought anybody with Very Sleepy could read it.

Here you go. Click to enlarge. I'm still looking at stuff, but it's pretty striking how different these results are from what I expected.

Inclusive:

Image

Exclusive:

Image

My favorite is 6% for a joystick that isn't being used and doesn't exist, to support a feature that is probably used by < 0.01% of Spring's audience, and probably only once to see if it works.

Sorry if that sounds sarcastic or whatever, I just thought it was funny.

As for the getBadTargetCategory issue, I've thought about it a bit, and this is what I can tell you guys:

1. Practically everything on the map is Gaia.
2. Everything on the map should have been defined as unarmed (i.e., no weapon1 period). I've double-checked that to verify, and it should be true.

So it's (hopefully) something very simple.

Anyhow, that's it for now, I need to get a bit of sleep, and I can't even speculate on the other major offenders until I know what they are and what they're for and then maybe help read through the source a bit.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Profile Build

Post by hoijui »

i would not know how to get anything useful out of these screen-shots :/

As i got it, you did not use native (= non-Lua AIs), and thus it is not possible that skirmishAiCallback_UnitDef_WeaponMount_getBadTargetCategory() got called even once. we have a similar effect in infologs, where it often mentions one of the AI callback functions, falsely. the reason might be, that it is the last exported symbol. my guess is, that practically all function calls inside spring are thus accounted to this symbol. so.. maybe you have to export all symbols by default (when compiling) or... is this already a special profiling build?
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Profile Build

Post by Beherith »

This is basically a normal build, with a PDB file next to it, which has all the symbol translations, and it can show the profiling side-by-side with the code itself.


But it does seem to be screwed up on your end, Argh, because it doesnt even list the main cpu hogs in exclusive. Youll have to download the source of the engine from git, and build it yourself. Which is quite painless in VS2005.

Hoijui:
Exclusive means the time spent in that function only, excluding the time spent in its child calls.

Inclusive means the time spent in that function and all the time spent in all its child calls.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Profile Build

Post by Argh »

If I build it myself, and the numbers "don't make sense", then people will just shrug and say that something must be wrong with the way I'm building it. I'm really not sure that's an efficient use of time here.

The best solution is for me to pack up the demo scenario, and then for multiple developers to profile it and show us the results.

If we see clear differences between Windows and Linux, for example, that tells us something pretty important. If we things that "don't make sense" across multiple testers, then we probably are seeing real things that have issues, and that gives us a starting-place.

I'll get the current build cleaned up a bit and make it available in a few hours.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Profile Build

Post by Beherith »

Numbers not making sense is very clear here. There must have been some kind of offset error, resulting in all the symbols being shifted.

Why do you fight tooth and nail against having to compile spring? With vs2005 its easy breezy. Takes like 3 minutes to build from scratch on my cpu.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Profile Build

Post by Argh »

I presume nothing atm, myself :-)

OK, I've uploaded the cleaned-up World Builder and test map that I've been using.

You can see it here.

It's drag-and-drop. And yes, you want the base stuff, since I can't replace the SSMF shader with my current version any other way, and it's not compatible with stock SSMF. Includes the early WIP of Pallette and POPS- one thing to note is that other than (some) Unit death explosions if you decide to blow things up, you won't see any CEGs at all.

There are 571 Units on this map. I was dubious about that number, as it's such a small map, so I checked it out, and it's right.

Oh, and I've got a mystery issue; BubbleBuilding (accessible via the Editor Daemon's menu on the first page) causes an engine crash when built. Haven't the foggiest why yet; I've tried disabling most of the script, I've checked the CEGs, checked out the lighting shader (it uses a strobe effect) etc., etc. to no avail. Weird issue, I would like to know if anybody can reproduce. I'm sure there are various other minor things borked atm, but that's really weird, as it hasn't changed in almost two years.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Profile Build

Post by Argh »

Anybody had a chance to take a look yet?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Profile Build

Post by Argh »

Hello?

Look, guys. It's just 5 minutes of your time. Please test this, it took 8 hours to put together, and this is important.
User avatar
oksnoop2
Posts: 1207
Joined: 29 Aug 2009, 20:12

Re: Profile Build

Post by oksnoop2 »

Argh wrote:I presume nothing atm, myself :-)

OK, I've uploaded the cleaned-up World Builder and test map that I've been using.

You can see it here.

It's drag-and-drop. And yes, you want the base stuff, since I can't replace the SSMF shader with my current version any other way, and it's not compatible with stock SSMF. Includes the early WIP of Pallette and POPS- one thing to note is that other than (some) Unit death explosions if you decide to blow things up, you won't see any CEGs at all.

There are 571 Units on this map. I was dubious about that number, as it's such a small map, so I checked it out, and it's right.

Oh, and I've got a mystery issue; BubbleBuilding (accessible via the Editor Daemon's menu on the first page) causes an engine crash when built. Haven't the foggiest why yet; I've tried disabling most of the script, I've checked the CEGs, checked out the lighting shader (it uses a strobe effect) etc., etc. to no avail. Weird issue, I would like to know if anybody can reproduce. I'm sure there are various other minor things borked atm, but that's really weird, as it hasn't changed in almost two years.

I followed your link and got:
"Error 404 - Not Found"
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Profile Build

Post by Argh »

Doh!

Hold on, I'll get that fixed.

Done.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Profile Build

Post by Beherith »

What part of this would you like profiled? A general whole map view, or a more sensible slice?
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Profile Build

Post by Beherith »

A more or less complete map view profile: (55 fps)
http://beherith.eat-peet.net/stuff/capture.sleepy
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Profile Build

Post by Argh »

Sleepy's doing something odd- it starts opening that, then it minimizes and I can't get it to show me anything.

Any idea what's up? We may have to resort to screens.


Nevermind, I got it- needed to force maximize. Weird.

Reading.

[EDIT]OK, call me an idiot if you want (it'll be, what, fourth time today?), but if I'm reading Inclusive right, CPU was totally choked. Yes?[/EDIT]

So, what percentage of the map was visible, guesstimate? Trying to get a feel- 570 Units, average tricount somewhere around 125, so if we're talking 300, 37500 triangles- not a big deal, but fillrate is a problem.

Just trying to get a feel for what we're seeing here- looks to me that you're seeing a hell of a lot of time eaten on the unitRendering stuff. That's understandable, but whee, it really looks like it ate the whole CPU, which seems a bit funky for stuff that isn't moving and therefore shouldn't have to do rotation / translation- oh, I forgot, we don't use VBO :P

I had shadows off, should note.

Tempted to repeat the nodraw thing I screenshotted, just to see the change- on this hardware, framerate remained almost the same. Looks like, on your hardware, that there would be a pretty significant change. Which ofc may mean that what is going on is a dreaded OpenGL emulation mess.

What's your CPU/GPU?

And wow, local model piece. Christ.

Man, I hope there's fat here, short of VBO or hoping MT is done before Christmas. Pretty pessimistic.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Profile Build

Post by Beherith »

8800gt with i5 750 at 3.5ghz atm.
Im usually GPU limited by this, havent seen cpu hit its limits.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Profile Build

Post by Argh »

On an 8800, yeah, I'd think GPU would be the bottleneck. That shader is still a nasty little thing, despite trying to gut it as much as I can, and POPS isn't free, either.

OK, that makes so much more sense now.

Exclusive shows CPU at about 16%. 3.5Ghz (single core?), vs. one core of this box... hmm... still not working out there, but it's a lot closer to making sense.

Sounds like MT would solve the issue, then. I guess that means that zerver is my new best friend, lol.
Last edited by Argh on 08 Oct 2010, 00:03, edited 1 time in total.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Profile Build

Post by Beherith »

Why would MT solve the issue? Its clearly gpu limited on my end. 1500 fighters barely make a dent on cpu (18% load as reported by spring)
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Profile Build

Post by Argh »

On this quad-core, MT would mean that there's more than enough CPU that GPU would be the chokepoint, like it should be. That would be OK, the 4750's stronger (well, depending on OC, etc.).

Right now, everything I'm seeing here indicates it's not. I get maybe 30-40 FPS when we're talking 300 Units on the screen, tops.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Profile Build

Post by Beherith »

Toms hardware says 8800gt is on par with 4750.
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: Profile Build

Post by aegis »

the 4750 looks to be fairly similar to the 8800 gt
Post Reply

Return to “General Discussion”