|
| ||||||||||
| Tags: apple, fortran, gprof, mac os x, saturn |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| Profiling with gprof or saturn on Mac OS X
|
|
#2
| |||
| |||
| Re: Profiling with gprof or saturn on Mac OS X
I will agree that the documentation on several alternatives for gprof has been confusing. It ought to work when the -pg option is used throughout (at least from the main program down through the functions you want to profile), including the link step, same as gcc. There are alternate spellings for -pg, but as far as I know, -p is a valid alternate only for Intel compilers on Itanium. |
|
#3
| |||
| |||
| Re: Profiling with gprof or saturn on Mac OS X
Thanks for this advice. I tried gprof once again with -pg (build and link), but the problem remains the same as with the -p option: The function call statistics are correctly reported but the time remains empty. Here is an excerpt of the output of gpgrof: Quote:
|
|
#4
| |||
| |||
| Re: Profiling with gprof or saturn on Mac OS X
Which tool you use profiling in mac? Under Linux, there are many but no port Mac. There's everything you need with the Apple development tools, and most tools are accessible directly via Xcode: Run menu / Start with Performance Tool. If you can provide me some more information related to these things then I will be in a better position to provide you specific answer. |
|
#5
| |||
| |||
| Re: Profiling with gprof or saturn on Mac OS X
I actually saw the performance tools but it seems fairly hermetic. I find no doc: / I think that saturn agrees and walks like gprof but impossible to get it working. You would have an example? What are the compiler options and link to add? Otherwise, for gprof, I need to have a binary "universal". I understand that is a universal application executable ppc and intel. I compiled a test.cpp to the line g + +-O-pg-isysroot / Developer/SDKs/MacOSX10.4u.sdk-arch i386-mmacosx-version-min = 10.4-arch ppc test.cpp On execution, I am creating a file gmon.out instrumentation. By cons, making "gprof a.out" I have the error line gprof: file: a.out Does not Contain the host Architecture Have an idea on what does that mean? Yet by "file a.out" I have a.out: Mach-O universal binary with 2 architectures a.out (for architecture i386): Mach-O executable i386 a.out (for architecture ppc): Mach-O executable ppc I will be waiting for the related reply. |
|
#6
| |||
| |||
| Re: Profiling with gprof or saturn on Mac OS X
LIPO uses (1), lipo-info path / to / binary, gprof does that very partially in osx, NM (1) for symbols, OToole (1) for L-links otool path / to / binary and of course if you're in leopard Seb you are tired "?) To analyze the syntax gere not c + + but that will come universal means clustering FAT, it's universal slang Apple (exists since Matusalem) if you want to know more option read one of my makefile a little hacking and MacOS gcc internals and how the profiling tools for Apple Code: / / # Include bridge_saturn.c <stdio.h> stdlib.h void __attribute__ ((__no_instrument_function__)) __cyg_profile_func_enter (void * f, void * c) (fprintf (stderr, "Enter function% p,% p caller \ n ", f, c);) void __attribute__ ((__no_instrument_function__)) __cyg_profile_func_exit (void * f, void * c) (printf (stderr,"% p Exit function, caller% p \ n ", f, c); ) gcc-c-o bridge_saturn.c bridge_saturn.o realpath.c tatouille / * EOF * / gcc-Wall-o realpath realpath.c \ bridge_saturn.o-framework CoreServices-lSaturn-finstrument-functions . / Realpath / Enter function 0x1dcf, caller 0x1c0e Enter 0x1c3a function, caller 0x1e16 0x1c3a Exit function, caller 0x1e16 / Exit function 0x1dcf, caller 0x1c0e You could create your stub like this / * Extern void __cyg_profile_func_enter (void * f, void * c); extern void __cyg_profile_func_exit (void * f, void * c) void _cyg_profile_func_enter (void * f, void * c) (__cyg_profile_func_enter (& f, & c);) void _cyg_profile_func_exit (void * f, void * c) (__cyg_profile_func_exit (& f, & c);) * / |
|
#7
| |||
| |||
| Re: Profiling with gprof or saturn on Mac OS X
Thanks for the reply that all you have given for solving the problem that I was facing. Now this thing is working fine without any problem. Currently I am not having any issue related to this thing but in future if face any problem I will be coming to visit this thing forum for help . Once again thanks for the help. |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Profiling with gprof or saturn on Mac OS X" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What we can have in Saturn Era DLC of Sonic Generations? | Riley01 | Video Games | 8 | 09-11-2011 08:56 AM |
| Dowload Sega Saturn Emulators , Plugins | ADELIO | Operating Systems | 3 | 11-08-2009 10:16 AM |
| Download Sega Saturn Bios | Gagnesh | Operating Systems | 3 | 07-08-2009 10:47 AM |