gamedevlists-general Mailing List for gamedev (Page 9)
Brought to you by:
vexxed72
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
(28) |
Nov
(13) |
Dec
(168) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(51) |
Feb
(16) |
Mar
(29) |
Apr
(3) |
May
(24) |
Jun
(25) |
Jul
(43) |
Aug
(18) |
Sep
(41) |
Oct
(16) |
Nov
(37) |
Dec
(208) |
2003 |
Jan
(82) |
Feb
(89) |
Mar
(54) |
Apr
(75) |
May
(78) |
Jun
(141) |
Jul
(47) |
Aug
(7) |
Sep
(3) |
Oct
(16) |
Nov
(50) |
Dec
(213) |
2004 |
Jan
(76) |
Feb
(76) |
Mar
(23) |
Apr
(30) |
May
(14) |
Jun
(37) |
Jul
(64) |
Aug
(29) |
Sep
(25) |
Oct
(26) |
Nov
(1) |
Dec
(10) |
2005 |
Jan
(9) |
Feb
(3) |
Mar
|
Apr
|
May
(11) |
Jun
|
Jul
(39) |
Aug
(1) |
Sep
(1) |
Oct
(4) |
Nov
|
Dec
|
2006 |
Jan
(24) |
Feb
(18) |
Mar
(9) |
Apr
|
May
|
Jun
|
Jul
(14) |
Aug
(29) |
Sep
(2) |
Oct
(5) |
Nov
(4) |
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(11) |
Sep
(9) |
Oct
(5) |
Nov
(4) |
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(34) |
Jun
|
Jul
(9) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(4) |
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Andras B. <and...@gm...> - 2005-07-29 21:34:08
|
Even if this was the case, it would hurt overall performance, no? Overall performance is very good, I just don't like the occasional spikes... Mat Noguchi (BUNGIE) wrote: > If you are both reading and decompressing on the IO thread, you are > likely causing a lot of context switches if you have not modified the > priority on either thread. > > MSN |
From: Andras B. <and...@gm...> - 2005-07-29 21:22:43
|
I've tried setting the primary thread to time critical and the other thread to idle (and I also disabled it's priority boost), and it does help quite a bit, but I'm still seeing some small glitches. I'm not saying it's bad, it's pretty good actually, and people are so used to bad framerates nowadays that I'm sure they wouldn't complain a tiny bit. I do admit that I'm a bit on the perfectionist side on this one :) I have tried setting the process priority class to real-time too, but in that case my "idle" priority thread won't be really idle anymore, actually, the hiccups get much worse. I guess I could run in a separate process even, but that's really overkill. Andras Brian Hook wrote: > At the risk of asking the obvious, have you also set your primary > thread to run at the highest priority (REAL_TIME or whatever it's > called on Windows)? > > I run audio mixing in a separate thread and by setting things > appropriately (and sleeping when necessary) I never get hiccups. > > Brian > > On Fri, 29 Jul 2005 14:35:21 -0600, Andras Balogh wrote: > >>I'm loading lots of "small" (avg. 1k x 1k) regions from lots of >>huge (5GB+) wavelet compressed images. I'm using a 3rd party >>library to do this (ECW), so I don't know the implementation >>details, but I could look at the code, if I knew what to look for.. >> >> >>Andras >> >> >>Mat Noguchi (BUNGIE) wrote: >> >>>What else are you doing on the IO thread to make it eat up so >>>much CPU time? >>> >>>MSN >>>-----Original Message----- >>>From: gam...@li... >>>[mailto:gam...@li...] On >>>Behalf Of Andras Balogh Sent: Friday, July 29, 2005 10:44 AM To: >>>gam...@li... Subject: [GD-General] >>>responsive threading >>> >>>I'm developing a graphics application, that I want to be very >>>responsive, very smooth, all the time! The rendering is pretty >>>simple, the framerate is high and stable, so I just lock to >>>vsync, and everything moves beautifully smooth! The CPU usage for >>>this thread is always below 10%. >>> >>>However, I also have another thread, that has to do some heavy >>>work. This thread does tons of IO operations, and also makes the >>>CPU sweat! >>> >>>There is no synchronization between the two threads, so they >>>should be able to run independently. Still, I'm experienceing >>>sudden spikes in the >>> >>>framerate, when the second thread is really hammering. What could >>>be the >>> >>>reason for this? Is it possible to do something about it, to >>>regain the continuous framerate? I'm really not interested in the >>>performance of the second thread, I just want my first thread to >>>run as smooth as possible! I've tried lowering the priority for >>>the second thread, and it >>> >>>does help, but there are still some spikes. Is it possible that >>>it's Windows itself doing some operations at higher priority, >>>like memory management, IO stuff, and the likes? >>> >>>Thanks, >>> >>> >>>Andras |
From: Brian H. <ho...@bo...> - 2005-07-29 20:40:58
|
At the risk of asking the obvious, have you also set your primary thread to run at the highest priority (REAL_TIME or whatever it's called on Windows)? I run audio mixing in a separate thread and by setting things appropriately (and sleeping when necessary) I never get hiccups. Brian On Fri, 29 Jul 2005 14:35:21 -0600, Andras Balogh wrote: > I'm loading lots of "small" (avg. 1k x 1k) regions from lots of > huge (5GB+) wavelet compressed images. I'm using a 3rd party > library to do this (ECW), so I don't know the implementation > details, but I could look at the code, if I knew what to look for.. > > > Andras > > > Mat Noguchi (BUNGIE) wrote: >> What else are you doing on the IO thread to make it eat up so >> much CPU time? >> >> MSN >> -----Original Message----- >> From: gam...@li... >> [mailto:gam...@li...] On >> Behalf Of Andras Balogh Sent: Friday, July 29, 2005 10:44 AM To: >> gam...@li... Subject: [GD-General] >> responsive threading >> >> I'm developing a graphics application, that I want to be very >> responsive, very smooth, all the time! The rendering is pretty >> simple, the framerate is high and stable, so I just lock to >> vsync, and everything moves beautifully smooth! The CPU usage for >> this thread is always below 10%. >> >> However, I also have another thread, that has to do some heavy >> work. This thread does tons of IO operations, and also makes the >> CPU sweat! >> >> There is no synchronization between the two threads, so they >> should be able to run independently. Still, I'm experienceing >> sudden spikes in the >> >> framerate, when the second thread is really hammering. What could >> be the >> >> reason for this? Is it possible to do something about it, to >> regain the continuous framerate? I'm really not interested in the >> performance of the second thread, I just want my first thread to >> run as smooth as possible! I've tried lowering the priority for >> the second thread, and it >> >> does help, but there are still some spikes. Is it possible that >> it's Windows itself doing some operations at higher priority, >> like memory management, IO stuff, and the likes? >> >> Thanks, >> >> >> Andras >> >> >> ------------------------------------------------------- SF.Net >> email is sponsored by: Discover Easy Linux Migration Strategies >> from IBM. Find simple to follow Roadmaps, straightforward >> articles, informative Webcasts and more! Get everything you need >> to get up to speed, fast. >> http://ads.osdn.com/?ad_id=3D7477&alloc_id=3D16492&op=3Dclick >> _______________________________________________ Gamedevlists- >> general mailing list Gam...@li... >> https://lists.sourceforge.net/lists/listinfo/gamedevlists-general >> Archives: >> http://sourceforge.net/mailarchive/forum.php?forum_id=3D557 >> >> >> ------------------------------------------------------- SF.Net >> email is sponsored by: Discover Easy Linux Migration Strategies >> from IBM. Find simple to follow Roadmaps, straightforward >> articles, informative Webcasts and more! Get everything you need >> to get up to speed, fast. >> http://ads.osdn.com/?ad_idt77&alloc_id492&op=3Dclick >> _______________________________________________ Gamedevlists- >> general mailing list Gam...@li... >> https://lists.sourceforge.net/lists/listinfo/gamedevlists-general >> Archives: >> http://sourceforge.net/mailarchive/forum.php?forum_idU7 > > > ------------------------------------------------------- SF.Net > email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. > http://ads.osdn.com/?ad_id=3D7477&alloc_id=3D16492&op=3Dclick > _______________________________________________ Gamedevlists- > general mailing list Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-general > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=3D557 |
From: Mat N. \(BUNGIE\) <mat...@mi...> - 2005-07-29 20:39:31
|
If you are both reading and decompressing on the IO thread, you are likely causing a lot of context switches if you have not modified the priority on either thread. MSN -----Original Message----- From: gam...@li... [mailto:gam...@li...] On Behalf Of Andras Balogh Sent: Friday, July 29, 2005 1:35 PM To: gam...@li... Subject: Re: [GD-General] responsive threading I'm loading lots of "small" (avg. 1k x 1k) regions from lots of huge=20 (5GB+) wavelet compressed images. I'm using a 3rd party library to do=20 this (ECW), so I don't know the implementation details, but I could look at the code, if I knew what to look for.. Andras Mat Noguchi (BUNGIE) wrote: > What else are you doing on the IO thread to make it eat up so much CPU > time? >=20 > MSN > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...] On Behalf Of > Andras Balogh > Sent: Friday, July 29, 2005 10:44 AM > To: gam...@li... > Subject: [GD-General] responsive threading >=20 > I'm developing a graphics application, that I want to be very=20 > responsive, very smooth, all the time! The rendering is pretty simple, > the framerate is high and stable, so I just lock to vsync, and=20 > everything moves beautifully smooth! The CPU usage for this thread is=20 > always below 10%. >=20 > However, I also have another thread, that has to do some heavy work.=20 > This thread does tons of IO operations, and also makes the CPU sweat! >=20 > There is no synchronization between the two threads, so they should be > able to run independently. Still, I'm experienceing sudden spikes in the >=20 > framerate, when the second thread is really hammering. What could be the >=20 > reason for this? Is it possible to do something about it, to regain the=20 > continuous framerate? I'm really not interested in the performance of=20 > the second thread, I just want my first thread to run as smooth as=20 > possible! I've tried lowering the priority for the second thread, and it >=20 > does help, but there are still some spikes. Is it possible that it's=20 > Windows itself doing some operations at higher priority, like memory=20 > management, IO stuff, and the likes? >=20 > Thanks, >=20 >=20 > Andras >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. = http://ads.osdn.com/?ad_id=3D7477&alloc_id=3D16492&op=3Dclick > _______________________________________________ > Gamedevlists-general mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-general > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=3D557 >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&op=3Dclick > _______________________________________________ > Gamedevlists-general mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-general > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_idU7 >=20 >=20 ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. = http://ads.osdn.com/?ad_id=3D7477&alloc_id=3D16492&op=3Dclick _______________________________________________ Gamedevlists-general mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-general Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=3D557 |
From: Andras B. <and...@gm...> - 2005-07-29 20:35:36
|
I'm loading lots of "small" (avg. 1k x 1k) regions from lots of huge (5GB+) wavelet compressed images. I'm using a 3rd party library to do this (ECW), so I don't know the implementation details, but I could look at the code, if I knew what to look for.. Andras Mat Noguchi (BUNGIE) wrote: > What else are you doing on the IO thread to make it eat up so much CPU > time? > > MSN > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...] On Behalf Of > Andras Balogh > Sent: Friday, July 29, 2005 10:44 AM > To: gam...@li... > Subject: [GD-General] responsive threading > > I'm developing a graphics application, that I want to be very > responsive, very smooth, all the time! The rendering is pretty simple, > the framerate is high and stable, so I just lock to vsync, and > everything moves beautifully smooth! The CPU usage for this thread is > always below 10%. > > However, I also have another thread, that has to do some heavy work. > This thread does tons of IO operations, and also makes the CPU sweat! > > There is no synchronization between the two threads, so they should be > able to run independently. Still, I'm experienceing sudden spikes in the > > framerate, when the second thread is really hammering. What could be the > > reason for this? Is it possible to do something about it, to regain the > continuous framerate? I'm really not interested in the performance of > the second thread, I just want my first thread to run as smooth as > possible! I've tried lowering the priority for the second thread, and it > > does help, but there are still some spikes. Is it possible that it's > Windows itself doing some operations at higher priority, like memory > management, IO stuff, and the likes? > > Thanks, > > > Andras > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > _______________________________________________ > Gamedevlists-general mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-general > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=557 > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click > _______________________________________________ > Gamedevlists-general mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-general > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_idU7 > > |
From: Mat N. \(BUNGIE\) <mat...@mi...> - 2005-07-29 19:02:01
|
What else are you doing on the IO thread to make it eat up so much CPU time? MSN -----Original Message----- From: gam...@li... [mailto:gam...@li...] On Behalf Of Andras Balogh Sent: Friday, July 29, 2005 10:44 AM To: gam...@li... Subject: [GD-General] responsive threading I'm developing a graphics application, that I want to be very=20 responsive, very smooth, all the time! The rendering is pretty simple,=20 the framerate is high and stable, so I just lock to vsync, and=20 everything moves beautifully smooth! The CPU usage for this thread is=20 always below 10%. However, I also have another thread, that has to do some heavy work.=20 This thread does tons of IO operations, and also makes the CPU sweat! There is no synchronization between the two threads, so they should be=20 able to run independently. Still, I'm experienceing sudden spikes in the framerate, when the second thread is really hammering. What could be the reason for this? Is it possible to do something about it, to regain the=20 continuous framerate? I'm really not interested in the performance of=20 the second thread, I just want my first thread to run as smooth as=20 possible! I've tried lowering the priority for the second thread, and it does help, but there are still some spikes. Is it possible that it's=20 Windows itself doing some operations at higher priority, like memory=20 management, IO stuff, and the likes? Thanks, Andras ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. = http://ads.osdn.com/?ad_id=3D7477&alloc_id=3D16492&op=3Dclick _______________________________________________ Gamedevlists-general mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-general Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=3D557 |
From: Jamie F. <ja...@qu...> - 2005-07-29 18:57:15
|
Our experience is that you're never going to get that to work, Windows thread management just isn't good enough. You should be able to get further with fibres. Jamie Andras Balogh wrote: > I'm developing a graphics application, that I want to be very > responsive, very smooth, all the time! The rendering is pretty simple, > the framerate is high and stable, so I just lock to vsync, and > everything moves beautifully smooth! The CPU usage for this thread is > always below 10%. > > However, I also have another thread, that has to do some heavy work. > This thread does tons of IO operations, and also makes the CPU sweat! > > There is no synchronization between the two threads, so they should be > able to run independently. Still, I'm experienceing sudden spikes in the > framerate, when the second thread is really hammering. What could be the > reason for this? Is it possible to do something about it, to regain the > continuous framerate? I'm really not interested in the performance of > the second thread, I just want my first thread to run as smooth as > possible! I've tried lowering the priority for the second thread, and it > does help, but there are still some spikes. Is it possible that it's > Windows itself doing some operations at higher priority, like memory > management, IO stuff, and the likes? > > Thanks, > > > Andras > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > _______________________________________________ > Gamedevlists-general mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-general > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=557 |
From: Andras B. <and...@gm...> - 2005-07-29 17:43:56
|
I'm developing a graphics application, that I want to be very responsive, very smooth, all the time! The rendering is pretty simple, the framerate is high and stable, so I just lock to vsync, and everything moves beautifully smooth! The CPU usage for this thread is always below 10%. However, I also have another thread, that has to do some heavy work. This thread does tons of IO operations, and also makes the CPU sweat! There is no synchronization between the two threads, so they should be able to run independently. Still, I'm experienceing sudden spikes in the framerate, when the second thread is really hammering. What could be the reason for this? Is it possible to do something about it, to regain the continuous framerate? I'm really not interested in the performance of the second thread, I just want my first thread to run as smooth as possible! I've tried lowering the priority for the second thread, and it does help, but there are still some spikes. Is it possible that it's Windows itself doing some operations at higher priority, like memory management, IO stuff, and the likes? Thanks, Andras |
From: Pierre T. <pie...@no...> - 2005-07-29 09:37:28
|
Hi, Just a notification for interested people. I just released the Flexporter source code, here: http://www.codercorner.com/FlexporterSrcRelease.rar No time for that anymore. Pierre Terdiman - Novodex AG (www.novodex.com) - Personal : www.codercorner.com |
From: Gianfranco B. <gbe...@gb...> - 2005-07-29 04:04:13
|
gam...@li... wrote: > This is kinda spam, but I'm only doing this on gd-general and this is > one of the perks of being assistant list admin =3D) > > Anyway, my book on writing portable code has been released and is now > available. More info at: > > http://www.writeportablecode.com > > Brian Heh, I ordered it from O'Reilly when it was mentioned on gamedev.net before its release. I was surprised to find that my total was $0, but when I called O'Reilly, I was told that I will be charged the actual price when it was released. I haven't had a chance to read it yet. Harry Potter was one of the reasons. B-) -- GBGames' Blog: http://www.gbgames.com/blog |
From: Brian H. <ho...@bo...> - 2005-07-29 02:23:55
|
This is kinda spam, but I'm only doing this on gd-general and this is one of the perks of being assistant list admin =3D) Anyway, my book on writing portable code has been released and is now available. More info at: http://www.writeportablecode.com Brian |
From: Andras B. <and...@gm...> - 2005-07-20 22:05:02
|
Yeah, I guess I'll just do something like that. Thanks! Lewin, Gareth wrote: > Well if that's the case, just implement a simple Critical Section around > the main loop of each thread, with a Sleep, and turn it only on in > profile > |
From: Lewin, G. <gl...@ea...> - 2005-07-20 21:38:20
|
Well if that's the case, just implement a simple Critical Section around the main loop of each thread, with a Sleep, and turn it only on in profile=20 > -----Original Message----- > From: gam...@li...=20 > [mailto:gam...@li...] On=20 > Behalf Of Andras Balogh > Sent: Wednesday, July 20, 2005 2:33 PM > To: gam...@li... > Subject: Re: [GD-General] profiling multi threaded applications >=20 > I don't have anything against lockstep mode, if it's=20 > automagically forced only during profiling, but I don't want=20 > to design the app to work that way during normal operation.=20 > The reason is that if these steps are not fine enough, it=20 > could hurt interactivity, which I can live with while=20 > profiling, but cannot accept in "final" mode. >=20 >=20 > brian sharon wrote: > > Andras, are all of your threads doing the same thing? Otherwise, a=20 > > critical section won't do anything for you. If only one=20 > thread tries=20 > > to acquire the object, it will (trivially) always get it. > >=20 > > Now, if you're thinking going to put this critical section=20 > at the top=20 > > level of your app and make all threads go through it, then=20 > you're back=20 > > to Christian's suggestion: > >=20 > > If possible, design your architecture so that your threads=20 > can work in=20 > > a lockstep mode, with one central mutex controlling which thread is=20 > > running at any given moment. That way you can at least get=20 > a partial=20 > > profile and optimize each thread individually. > >=20 > > This type of design can also prove very useful to debug deadlocks. > >=20 > > --brian > >=20 >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration=20 > Strategies from IBM. Find simple to follow Roadmaps,=20 > straightforward articles, informative Webcasts and more! Get=20 > everything you need to get up to speed, fast.=20 > http://ads.osdn.com/?ad_id=3D7477&alloc_id=3D16492&op=3Dclick > _______________________________________________ > Gamedevlists-general mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-general > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=3D557 >=20 |
From: Andras B. <and...@gm...> - 2005-07-20 21:32:49
|
I don't have anything against lockstep mode, if it's automagically forced only during profiling, but I don't want to design the app to work that way during normal operation. The reason is that if these steps are not fine enough, it could hurt interactivity, which I can live with while profiling, but cannot accept in "final" mode. brian sharon wrote: > Andras, are all of your threads doing the same thing? Otherwise, a critical > section won't do anything for you. If only one thread tries to acquire the > object, it will (trivially) always get it. > > Now, if you're thinking going to put this critical section at the top level > of your app and make all threads go through it, then you're back to > Christian's suggestion: > > If possible, design your architecture so that your threads can work in a > lockstep mode, with one central mutex controlling which thread is running at > any given moment. That way you can at least get a partial profile and > optimize each thread individually. > > This type of design can also prove very useful to debug deadlocks. > > --brian > |
From: brian s. <bri...@gm...> - 2005-07-20 21:10:04
|
Andras, are all of your threads doing the same thing? Otherwise, a critical= =20 section won't do anything for you. If only one thread tries to acquire the= =20 object, it will (trivially) always get it. Now, if you're thinking going to put this critical section at the top level= =20 of your app and make all threads go through it, then you're back to=20 Christian's suggestion: If possible, design your architecture so that your threads can work in a lockstep mode, with one central mutex controlling which thread is running a= t any given moment. That way you can at least get a partial profile and optimize each thread individually. This type of design can also prove very useful to debug deadlocks. --brian On 7/20/05, Lewin, Gareth <gl...@ea...> wrote: >=20 > That shouldn't be a problem, I assumed your START and END pairs can be > nested. >=20 > From MSDN: >=20 > After a thread has ownership of a critical section, it can make > additional calls to EnterCriticalSection or TryEnterCriticalSection > without blocking its execution. This prevents a thread from deadlocking > itself while waiting for a critical section that it already owns. The > thread enters the critical section each time EnterCriticalSection and > TryEnterCriticalSection succeed. A thread must call LeaveCriticalSection > once for each time that it entered the critical section. >=20 > > -----Original Message----- > > From: gam...@li... > > [mailto:gam...@li...] On > > Behalf Of Andras Balogh > > Sent: Wednesday, July 20, 2005 1:50 PM > > To: gam...@li... > > Subject: Re: [GD-General] profiling multi threaded applications > > > > Yeah, I have something similiar, except that it's > > hierarchical, so START and END can be nested, in which case > > it gets a bit trickier to use CriticalSections, but I think I > > could give that a try! > > > > thx, > > > > Andras > > > > Lewin, Gareth wrote: > > > You could have your START and END macros (I assume you use > > something > > > like that) include EnterCriticalSection and LeaveCriticalSection > > > > > > ------------------------------------------------------- > > SF.Net email is sponsored by: Discover Easy Linux Migration > > Strategies from IBM. Find simple to follow Roadmaps, > > straightforward articles, informative Webcasts and more! Get > > everything you need to get up to speed, fast. > > http://ads.osdn.com/?ad_id=3D7477&alloc_id=3D16492&op=3Dclick > > _______________________________________________ > > Gamedevlists-general mailing list > > Gam...@li... > > https://lists.sourceforge.net/lists/listinfo/gamedevlists-general > > Archives: > > http://sourceforge.net/mailarchive/forum.php?forum_id=3D557 > > >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&opclick > _______________________________________________ > Gamedevlists-general mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-general > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_idU7 > |
From: Lewin, G. <gl...@ea...> - 2005-07-20 20:56:08
|
That shouldn't be a problem, I assumed your START and END pairs can be nested. From MSDN: =20 After a thread has ownership of a critical section, it can make additional calls to EnterCriticalSection or TryEnterCriticalSection without blocking its execution. This prevents a thread from deadlocking itself while waiting for a critical section that it already owns. The thread enters the critical section each time EnterCriticalSection and TryEnterCriticalSection succeed. A thread must call LeaveCriticalSection once for each time that it entered the critical section. > -----Original Message----- > From: gam...@li...=20 > [mailto:gam...@li...] On=20 > Behalf Of Andras Balogh > Sent: Wednesday, July 20, 2005 1:50 PM > To: gam...@li... > Subject: Re: [GD-General] profiling multi threaded applications >=20 > Yeah, I have something similiar, except that it's=20 > hierarchical, so START and END can be nested, in which case=20 > it gets a bit trickier to use CriticalSections, but I think I=20 > could give that a try! >=20 > thx, >=20 > Andras >=20 > Lewin, Gareth wrote: > > You could have your START and END macros (I assume you use=20 > something=20 > > like that) include EnterCriticalSection and LeaveCriticalSection >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration=20 > Strategies from IBM. Find simple to follow Roadmaps,=20 > straightforward articles, informative Webcasts and more! Get=20 > everything you need to get up to speed, fast.=20 > http://ads.osdn.com/?ad_id=3D7477&alloc_id=3D16492&op=3Dclick > _______________________________________________ > Gamedevlists-general mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-general > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=3D557 >=20 |
From: Andras B. <and...@gm...> - 2005-07-20 20:49:57
|
Yeah, I have something similiar, except that it's hierarchical, so START and END can be nested, in which case it gets a bit trickier to use CriticalSections, but I think I could give that a try! thx, Andras Lewin, Gareth wrote: > You could have your START and END macros (I assume you use something > like that) include EnterCriticalSection and LeaveCriticalSection |
From: Lewin, G. <gl...@ea...> - 2005-07-20 20:39:41
|
You could have your START and END macros (I assume you use something like that) include EnterCriticalSection and LeaveCriticalSection=20 > -----Original Message----- > From: gam...@li...=20 > [mailto:gam...@li...] On=20 > Behalf Of Andras Balogh > Sent: Wednesday, July 20, 2005 11:37 AM > To: gam...@li... > Subject: Re: [GD-General] profiling multi threaded applications >=20 > Pretending that this is not an option, are there any other=20 > possibilities? >=20 >=20 > Christian Laforte wrote: > > If possible, design your architecture so that your threads=20 > can work in=20 > > a lockstep mode, with one central mutex controlling which thread is=20 > > running at any given moment. That way you can at least get=20 > a partial=20 > > profile and optimize each thread individually. > >=20 > > This type of design can also prove very useful to debug deadlocks. > >=20 > > Hope that helps a bit, > >=20 > > Christian Laforte > > www.feelingsoftware.com > >=20 > >=20 > >>-----Original Message----- > >>From: gam...@li... > >>[mailto:gam...@li...]=20 > On Behalf Of=20 > >>Andras Balogh > >>Sent: Wednesday, July 20, 2005 10:36 AM > >>To: gam...@li... > >>Subject: [GD-General] profiling multi threaded applications > >> > >>I was about to add a simple profiler into our engine, but I've just=20 > >>realized that the usual hierarchical profiler that measures=20 > the time=20 > >>for a chunk of code won't cut it, in a multithreaded application. > >> > >>I understand that even when I have a single threaded app, there are=20 > >>usually several other applications are running in the=20 > background, but=20 > >>mostly they are all idle, so it's just noise. But in this case, I=20 > >>would have multiple, heavily working threads. If the OS=20 > switches back=20 > >>and forth between these threads all the time, then how is=20 > it possible=20 > >>to make accurate, or even just usable measurements?? > >> > >>Thanks, > >> > >>Andras >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration=20 > Strategies from IBM. Find simple to follow Roadmaps,=20 > straightforward articles, informative Webcasts and more! Get=20 > everything you need to get up to speed, fast.=20 > http://ads.osdn.com/?ad_id=3D7477&alloc_id=3D16492&op=3Dclick > _______________________________________________ > Gamedevlists-general mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-general > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=3D557 >=20 |
From: Andras B. <and...@gm...> - 2005-07-20 19:55:50
|
The platform is Win32, and I'd prefer using an embedded profiler in the engine, not an external one. I can play around with the thread priorities and such, I just hoped that there is a "generic" solution to this problem that I missed.. Thanks, Andras Mick West wrote: > Thread Profilers do exist, (not that I've used one): > > http://www.intel.com/cd/software/products/asmo-na/eng/threading/tp/index.htm > > > What platform is this for? > > Mick. > > > Andras Balogh wrote: > >> Pretending that this is not an option, are there any other possibilities? >> >> >> Christian Laforte wrote: >> >>> If possible, design your architecture so that your threads can work in a >>> lockstep mode, with one central mutex controlling which thread is >>> running at >>> any given moment. That way you can at least get a partial profile and >>> optimize each thread individually. >>> >>> This type of design can also prove very useful to debug deadlocks. >>> >>> Hope that helps a bit, >>> >>> Christian Laforte >>> www.feelingsoftware.com >>> >>>> -----Original Message----- >>>> From: gam...@li... >>>> [mailto:gam...@li...] On Behalf Of >>>> Andras Balogh >>>> Sent: Wednesday, July 20, 2005 10:36 AM >>>> To: gam...@li... >>>> Subject: [GD-General] profiling multi threaded applications >>>> >>>> I was about to add a simple profiler into our engine, but I've just >>>> realized that the usual hierarchical profiler that measures the time >>>> for >>>> a chunk of code won't cut it, in a multithreaded application. >>>> >>>> I understand that even when I have a single threaded app, there are >>>> usually several other applications are running in the background, but >>>> mostly they are all idle, so it's just noise. But in this case, I would >>>> have multiple, heavily working threads. If the OS switches back and >>>> forth between these threads all the time, then how is it possible to >>>> make accurate, or even just usable measurements?? >>>> >>>> Thanks, >>>> >>>> Andras |
From: Mick W. <de...@mi...> - 2005-07-20 19:06:04
|
Thread Profilers do exist, (not that I've used one): http://www.intel.com/cd/software/products/asmo-na/eng/threading/tp/index.htm What platform is this for? Mick. Andras Balogh wrote: > Pretending that this is not an option, are there any other possibilities? > > > Christian Laforte wrote: > >> If possible, design your architecture so that your threads can work in a >> lockstep mode, with one central mutex controlling which thread is >> running at >> any given moment. That way you can at least get a partial profile and >> optimize each thread individually. >> >> This type of design can also prove very useful to debug deadlocks. >> >> Hope that helps a bit, >> >> Christian Laforte >> www.feelingsoftware.com >> >>> -----Original Message----- >>> From: gam...@li... >>> [mailto:gam...@li...] On Behalf Of >>> Andras Balogh >>> Sent: Wednesday, July 20, 2005 10:36 AM >>> To: gam...@li... >>> Subject: [GD-General] profiling multi threaded applications >>> >>> I was about to add a simple profiler into our engine, but I've just >>> realized that the usual hierarchical profiler that measures the time >>> for >>> a chunk of code won't cut it, in a multithreaded application. >>> >>> I understand that even when I have a single threaded app, there are >>> usually several other applications are running in the background, but >>> mostly they are all idle, so it's just noise. But in this case, I would >>> have multiple, heavily working threads. If the OS switches back and >>> forth between these threads all the time, then how is it possible to >>> make accurate, or even just usable measurements?? >>> >>> Thanks, >>> >>> Andras >> > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > _______________________________________________ > Gamedevlists-general mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-general > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=557 > |
From: brian s. <bri...@gm...> - 2005-07-20 18:58:48
|
You could set the thread priority to maximum for the thread you're=20 interested in. Do it at the start of your profiling block - that will prett= y=20 much starve the other threads for the bit you want to profile - and then=20 undo it at the end.=20 This is, of course, assuming we're talking about a platform that allows suc= h=20 things. =20 --brian On 7/20/05, Andras Balogh <and...@gm...> wrote: >=20 > Pretending that this is not an option, are there any other possibilities? >=20 >=20 > Christian Laforte wrote: > > If possible, design your architecture so that your threads can work in = a > > lockstep mode, with one central mutex controlling which thread is=20 > running at > > any given moment. That way you can at least get a partial profile and > > optimize each thread individually. > > > > This type of design can also prove very useful to debug deadlocks. > > > > Hope that helps a bit, > > > > Christian Laforte > > www.feelingsoftware.com <http://www.feelingsoftware.com> > > > > > >>-----Original Message----- > >>From: gam...@li... > >>[mailto:gam...@li...] On Behalf Of > >>Andras Balogh > >>Sent: Wednesday, July 20, 2005 10:36 AM > >>To: gam...@li... > >>Subject: [GD-General] profiling multi threaded applications > >> > >>I was about to add a simple profiler into our engine, but I've just > >>realized that the usual hierarchical profiler that measures the time fo= r > >>a chunk of code won't cut it, in a multithreaded application. > >> > >>I understand that even when I have a single threaded app, there are > >>usually several other applications are running in the background, but > >>mostly they are all idle, so it's just noise. But in this case, I would > >>have multiple, heavily working threads. If the OS switches back and > >>forth between these threads all the time, then how is it possible to > >>make accurate, or even just usable measurements?? > >> > >>Thanks, > >> > >>Andras >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=3D7477&alloc_id=3D16492&op=3Dclic= k > _______________________________________________ > Gamedevlists-general mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-general > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=3D557 >=20 > |
From: Andras B. <and...@gm...> - 2005-07-20 18:37:47
|
Pretending that this is not an option, are there any other possibilities? Christian Laforte wrote: > If possible, design your architecture so that your threads can work in a > lockstep mode, with one central mutex controlling which thread is running at > any given moment. That way you can at least get a partial profile and > optimize each thread individually. > > This type of design can also prove very useful to debug deadlocks. > > Hope that helps a bit, > > Christian Laforte > www.feelingsoftware.com > > >>-----Original Message----- >>From: gam...@li... >>[mailto:gam...@li...] On Behalf Of >>Andras Balogh >>Sent: Wednesday, July 20, 2005 10:36 AM >>To: gam...@li... >>Subject: [GD-General] profiling multi threaded applications >> >>I was about to add a simple profiler into our engine, but I've just >>realized that the usual hierarchical profiler that measures the time for >>a chunk of code won't cut it, in a multithreaded application. >> >>I understand that even when I have a single threaded app, there are >>usually several other applications are running in the background, but >>mostly they are all idle, so it's just noise. But in this case, I would >>have multiple, heavily working threads. If the OS switches back and >>forth between these threads all the time, then how is it possible to >>make accurate, or even just usable measurements?? >> >>Thanks, >> >>Andras |
From: Christian L. <cla...@fe...> - 2005-07-20 15:32:48
|
If possible, design your architecture so that your threads can work in a lockstep mode, with one central mutex controlling which thread is running at any given moment. That way you can at least get a partial profile and optimize each thread individually. This type of design can also prove very useful to debug deadlocks. Hope that helps a bit, Christian Laforte www.feelingsoftware.com > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...] On Behalf Of > Andras Balogh > Sent: Wednesday, July 20, 2005 10:36 AM > To: gam...@li... > Subject: [GD-General] profiling multi threaded applications > > I was about to add a simple profiler into our engine, but I've just > realized that the usual hierarchical profiler that measures the time for > a chunk of code won't cut it, in a multithreaded application. > > I understand that even when I have a single threaded app, there are > usually several other applications are running in the background, but > mostly they are all idle, so it's just noise. But in this case, I would > have multiple, heavily working threads. If the OS switches back and > forth between these threads all the time, then how is it possible to > make accurate, or even just usable measurements?? > > Thanks, > > Andras > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > _______________________________________________ > Gamedevlists-general mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-general > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=557 |
From: Andras B. <and...@gm...> - 2005-07-20 14:35:48
|
I was about to add a simple profiler into our engine, but I've just realized that the usual hierarchical profiler that measures the time for a chunk of code won't cut it, in a multithreaded application. I understand that even when I have a single threaded app, there are usually several other applications are running in the background, but mostly they are all idle, so it's just noise. But in this case, I would have multiple, heavily working threads. If the OS switches back and forth between these threads all the time, then how is it possible to make accurate, or even just usable measurements?? Thanks, Andras |
From: Daniel V. <Dan...@ep...> - 2005-07-13 20:22:39
|
> How do you guys do it? Writing every asm peace 2 or more times? Both VS.NET and GCC understand the same intrinsics so using SSE intrinsics is much nicer than writing inline assembly. We had compiler (and obviously platform) specific inline assembly where it was unavoidable for e.g. Unreal Tournament 2004. > Is there a way to convert Microsoft MASM code to GCC GAS? I remember us looking into it while I was working at Loki Software aeons ago and I believe it was faster and less error prone to convert from Intel to AT&T syntax by hand. -- Daniel, Epic Games Inc. |