Редагувати

Поділитися через


ProfileOptimization.StartProfile(String) Method

Definition

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.

public:
 static void StartProfile(System::String ^ profile);
public static void StartProfile (string? profile);
public static void StartProfile (string profile);
[System.Security.SecurityCritical]
public static void StartProfile (string profile);
static member StartProfile : string -> unit
[<System.Security.SecurityCritical>]
static member StartProfile : string -> unit
Public Shared Sub StartProfile (profile As String)

Parameters

profile
String

The file name of the profile to use.

Attributes

Remarks

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.

Calling this method stops any previous recording in progress. Calling this method with a null profile file name stops any recording in progress and does not start a new recording.

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.

Applies to