Export (0) Print
Expand All

ProfileOptimization.StartProfile Method

.NET Framework 4.5

Starts just-in-time (JIT) compilation of the methods that were previously recorded in the specified profile file, on a background thread. Starts the process of recording current method use, which later overwrites the specified profile file.

Namespace:  System.Runtime
Assembly:  mscorlib (in mscorlib.dll)

static member StartProfile : 
        profile:string -> unit


Type: System.String

The file name of the profile to use.

If the specified profile exists in the folder specified by the SetProfileRoot method, the information it contains is used to determine the order in which methods are compiled on the background thread. The StartProfile method creates the profile if it does not already exist, and initiates the recording of method use.

Only methods that are actually called are recorded, regardless of whether they were compiled on the background thread or on the main application thread. A method is compiled on the main application thread if the application needs to call it before the background thread has compiled it.

The code that performs the recording tracks the rate at which methods are compiled, including methods that are compiled on both the background thread and on the main thread. When the rate falls below a predetermined level, recording stops. Recording also stops if the rate of JIT compilation exceeds a predetermined upper limit.

If the SetProfileRoot method has not been called for the current application domain, or if the computer does not have multiple cores, the StartProfile method has no effect.

.NET Framework

Supported in: 4.6, 4.5

  • SecurityCriticalAttribute 

    requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

© 2014 Microsoft