Help Center
Help CenterFreeBASIC

__FB_PROFILE__keyword

Intrinsic define set by the compiler

Intrinsic Defineskeyworddocumented

Syntax

__FB_PROFILE__

Description


Intrinsic define set to an integer to indicate the profiling method.
The different value are defined in the ./inc/fbc-int/profile.bi include file (inside Namespace: FB and Enum: PROFGEN_ID):
    • PROFGEN_ID_NONE: profiling is not enabled
    • PROFGEN_ID_GMON: code is being generated for gmon/gprof
    • PROFGEN_ID_CALLS: code is being generated for fb's function call profiler
    • PROFGEN_ID_CYCLES: code is being generated for fb's cycle count call profiler

Remarks

Version


  • Since fbc 1.20.0

Differences from QB


  • New to FreeBASIC

See also


Example


#cmdline "-profgen fb"

#include Once "fbc-int/profile.bi"

Using FBC



Print "__FB_PROFILE__ = ";



Select Case __FB_PROFILE__

Case PROFGEN_ID_NONE

    Print "PROFGEN_ID_NONE"

Case PROFGEN_ID_GMON

    Print "PROFGEN_ID_GMON"

Case PROFGEN_ID_CALLS

    Print "PROFGEN_ID_CALLS"

Case PROFGEN_ID_CYCLES

    Print "PROFGEN_ID_CYCLES"

End Select

Reference

  • Documented in KeyPgDdfbprofile.html