Search found 3274 matches
- May 07, 2024 10:36
- Forum: Documentation
- Topic: Profiling freebasic programs
- Replies: 27
- Views: 2195
Re: Profiling freebasic programs
But accumulation of procedures (or builtin instructions) should only be carried out in the same thread, because it is illogical to add up the execution times of procedures (or builtin instructions) that execute in parallel (not serially). ... Yes, have been working on all this. In the next update t...
- May 01, 2024 9:19
- Forum: Documentation
- Topic: Profiling freebasic programs
- Replies: 27
- Views: 2195
Re: Profiling freebasic programs
Child procedures with the same name (regardless of their nesting orders) must be accumulated in the 'Global results' section Yes, agreed. I added the procedure count using same method as total time. I think the issue is a carry over from original implementation. In this example the total time for s...
- May 01, 2024 9:12
- Forum: Documentation
- Topic: Profiling freebasic programs
- Replies: 27
- Views: 2195
Re: Profiling freebasic programs
Why the call tree representation depends on the procedure-name size (the only change) ? The procedure information is stored in a kind of hash table and the hash index is generated by a hashing function that operates on the procedure name. The order of procedures will follow the hashing index. So, n...
- Apr 29, 2024 21:46
- Forum: Documentation
- Topic: Profiling freebasic programs
- Replies: 27
- Views: 2195
Re: Profiling freebasic programs
Could you give a little information on these SUBs that can be used in the case of multi-threading ? #if __FB_MT__ extern "rtlib" declare sub fbProfileLock alias "fb_ProfileLock" () declare sub fbProfileUnlock alias "fb_ProfileUnlock" () end extern #endif 'fbProfileLock...
- Apr 29, 2024 0:44
- Forum: Documentation
- Topic: Profiling freebasic programs
- Replies: 27
- Views: 2195
Re: Profiling freebasic programs
Call fb's profiler directly to perform custom profiling and a report Also, what is the feature of 'fbc.InitProfile()' ? note: name changed in the last update These procedures expose fb's profiler as an API that can then be called directly and used to generate a profiling report based on whatever st...
- Apr 29, 2024 0:10
- Forum: Documentation
- Topic: Profiling freebasic programs
- Replies: 27
- Views: 2195
Re: Profiling freebasic programs
Conditional generation of profiling code #pragma profile [=value]' or '#pragma push( profile [,value] )' "#pragma profile" controls the generation of profiling code. This allows optionally including or excluding sections of source code to be profiled. when #pragma profile = true, then pro...
- Apr 28, 2024 23:57
- Forum: Documentation
- Topic: Profiling freebasic programs
- Replies: 27
- Views: 2195
Re: Profiling freebasic programs
Conditional compilation depending on profile code generation method - add '__FB_PROFILE__' __FB_PROFILE__ is an intrinsic define set to an integer to indicate the profiling method. namespace FBC enum PROFGEN_ID PROFGEN_ID_NONE = 0 PROFGEN_ID_GMON = 1 PROFGEN_ID_CALLS = 2 PROFGEN_ID_CYCLES = 3 end e...
- Apr 28, 2024 13:17
- Forum: Documentation
- Topic: Profiling freebasic programs
- Replies: 27
- Views: 2195
Re: Profiling freebasic programs
while under the main lock. ... this profile lock Just to clarify, what is your opinion / which do you suggest the "main lock" should be? Because I am uncertain and thought about this a bit before doing what I did. The original implementation of the profiler (what I started off with) used ...
- Apr 28, 2024 13:03
- Forum: Documentation
- Topic: Profiling freebasic programs
- Replies: 27
- Views: 2195
Re: Profiling freebasic programs
About documentation update: - Added 'Compiler Option: -profgen' page. - Waiting for new update to add '__FB_PROFILE__' and '__FB_OPTION_PROFILE__'. - @ Jeff : For the Programmer's Guide, a single page containing profiling for both gmon/gprof and fb's profiler, or 2 separate pages (the simpler in my...
- Apr 28, 2024 10:50
- Forum: Documentation
- Topic: Profiling freebasic programs
- Replies: 27
- Views: 2195
Re: Profiling freebasic programs
thank you adeyblue for the tests Indirect calls aren't faring too well. See also external callbacks like this https://www.freebasic.net/forum/viewtopic.php?t=32483 where the called-back function is missed out since it's never directly called (ie ProcessEvents won't ever show up, all its data gets at...
- Apr 27, 2024 23:28
- Forum: Documentation
- Topic: Profiling freebasic programs
- Replies: 27
- Views: 2195
Re: Profiling freebasic programs
Generating a call tree For example, with this source we tell the profiler to generate a call tree instead of timings and counts. #cmdline "-profgen fb" #include once "fbc-int/profile.bi" fbc.ProfileSetOptions( fbc.PROFILE_OPTION_REPORT_CALLTREE ) sub A print "A" end su...
- Apr 27, 2024 23:17
- Forum: Documentation
- Topic: Profiling freebasic programs
- Replies: 27
- Views: 2195
Re: Profiling freebasic programs
Setting the output report file name at run-time New include file 'fbc-int/profile.bi' adds some API for working with profiling For example, this has the effect of setting the output filename for the profile report to "prof-hhmmss.txt" where 'hhmmss' is replaced with the current time: #incl...
- Apr 27, 2024 21:41
- Forum: Documentation
- Topic: Profiling freebasic programs
- Replies: 27
- Views: 2195
Re: Profiling freebasic programs
Simple example, profiling a freebasic program and generating the default report: A simple example: #cmdline "-profgen fb" sub Pause100 sleep 100, 1 end sub sub Pause200 sleep 200, 1 end sub sub Pause400 sleep 400, 1 end sub for i as integer = 1 to 3 Pause100 next Pause200 Pause400 After c...
- Apr 27, 2024 21:36
- Forum: Documentation
- Topic: Profiling freebasic programs
- Replies: 27
- Views: 2195
Re: Profiling freebasic programs
New command line option -profgen: 'fbc -profgen gmon' : enable profiling code generation for gmon/gprof 'fbc -profgen fb' : enable function call profiling using fb's profiler 'fbc -profgen cycles' : coming soon, for cpu cycle counting on some targets (currently a wip on -gen gas64 only) FYI on comma...
- Apr 27, 2024 21:35
- Forum: Community Discussion
- Topic: Freebasic 1.20.0 Development
- Replies: 270
- Views: 26016
Re: Freebasic 1.20.0 Development
In latest fbc, added the first part for profiling freebasic programs.
Started a topic for this in the documentation sub forum:
Profiling freebasic programs
Started a topic for this in the documentation sub forum:
Profiling freebasic programs