![]() |
| | #1 |
| geek Join Date: Aug 2001 Location: NJ
Posts: 1,141
| Profiler for g++
__________________ Prove you can code in C++ or C# at TopCoder, referrer rrenaud Read my livejournal |
| SilentStrike is offline | |
| | #2 |
| Fingerstyle Guitarist Join Date: Aug 2001
Posts: 564
| Have you tried the GNU one yet? You probably even have it already. http://www.gnu.org/manual/gprof-2.9....gprof_toc.html |
| taylorguitarman is offline | |
| | #3 |
| geek Join Date: Aug 2001 Location: NJ
Posts: 1,141
| I tried it, but it's weird. It doesn't work for my game. I compile it with the -pg flag and then run it, but instead of the game working like normal, it's just all black. The profiler output is obviously erroroneoss as well, the first few lines... Code: Flat profile: Each sample counts as 0.01 seconds. % cumulative self self total time seconds seconds calls us/call us/call name 33.33 0.01 0.01 902 11.09 11.09 _Rb_tree<basic_string<char, string_char_traits<char>, __default_alloc_template<true, 0> >, pair<basic_string<char, string_char_traits<char>, __default_alloc_template<true, 0> > const, SDL_Surface *>, _Select1st<pair<basic_string<char, string_char_traits<char>, __default_alloc_template<true, 0> > const, SDL_Surface *> >, less<basic_string<char, string_char_traits<char>, __default_alloc_template<true, 0> > >, allocator<SDL_Surface *> >::end(void) 33.33 0.02 0.01 321 31.15 31.15 basic_string<char, string_char_traits<char>, __default_alloc_template<true, 0> >::replace(unsigned int, unsigned int, char const *, unsigned int) 33.33 0.03 0.01 83 120.48 120.48 _Rb_tree<basic_string<char, string_char_traits<char>, __default_alloc_template<true, 0> >, pair<basic_string<char, string_char_traits<char>, __default_alloc_template<true, 0> > const, Parse::ParseAction *>, _Select1st<pair<basic_string<char, string_char_traits<char>, __default_alloc_template<true, 0> > const, Parse::ParseAction *> >, less<basic_string<char, string_char_traits<char>, __default_alloc_template<true, 0> > >, allocator<Parse::ParseAction *> >::find(basic_string<char, string_char_traits<char>, __default_alloc_template<true, 0> > const &) 0.00 0.03 0.00 103503 0.00 0.00 basic_string<char, string_char_traits<char>, __default_alloc_template<true, 0> >::rep(void) const 0.00 0.03 0.00 37913 0.00 0.00 Util::Matrix<Game::GameMap::MapTile *>::numCols(void) const 0.00 0.03 0.00 30129 0.00 0.00 basic_string<char, string_char_traits<char>, __default_alloc_template<true, 0> >::length(void) const 0.00 0.03 0.00 29801 0.00 0.00 basic_string<char, string_char_traits<char>, __default_alloc_template<true, 0> >::Rep::data(void) 0.00 0.03 0.00 18840 0.00 0.00 Util::Matrix<Game::GameMap::MapTile *>::operator()(int, int) 0.00 0.03 0.00 17762 0.00 0.00 basic_string<char, string_char_traits<char>, __default_alloc_template<true, 0> >::data(void) const 0.00 0.03 0.00 17408 0.00 0.00 Game::Flame::drawAt(SDL_Surface *, SDL_Rect *) 0.00 0.03 0.00 15640 0.00 0.00 Graphics::SingleFrameImage::drawAt(SDL_Surface *, SDL_Rect *)
__________________ Prove you can code in C++ or C# at TopCoder, referrer rrenaud Read my livejournal |
| SilentStrike is offline | |
| | #4 |
| Fingerstyle Guitarist Join Date: Aug 2001
Posts: 564
| Are you looking for something more like CPU monitors and stuff where you can see the realtime stats? Perhaps just build a small class to output what you need to the screen, like FPS and stuff.
__________________ If a tree falls in the forest, and no one is around to see it, do the other trees make fun of it? |
| taylorguitarman is offline | |
| | #5 |
| geek Join Date: Aug 2001 Location: NJ
Posts: 1,141
| I was looking for a profiler, one that shows the time spent in each function, etc, but using gprof and the -pg flag makes the program not work.
__________________ Prove you can code in C++ or C# at TopCoder, referrer rrenaud Read my livejournal |
| SilentStrike is offline | |
| | #6 |
| geek Join Date: Aug 2001 Location: NJ
Posts: 1,141
| Same black screen odd behavior with the profiler from MSVC, guess I gotta start hunting for memory errors .
__________________ Prove you can code in C++ or C# at TopCoder, referrer rrenaud Read my livejournal |
| SilentStrike is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Looking for free c++ simple profiler | umen242 | C++ Programming | 3 | 05-25-2008 02:38 AM |
| Code profiler? | h3ro | Tech Board | 5 | 04-07-2008 09:16 AM |
| How can I make a .NET profiler? | honeysting | C# Programming | 0 | 03-26-2006 06:30 AM |
| Memory profiler for PHP | alphaoide | Tech Board | 2 | 01-27-2005 04:18 PM |
| Visual C++ Profiler | robquigley | C++ Programming | 2 | 01-17-2003 09:17 AM |