ProfileOptimization.StartProfile(String) Método

Definição

Inicia a compilação JIT (Just-In-Time) dos métodos que foram registrados anteriormente no arquivo de perfil especificado em um thread em segundo plano.Starts just-in-time (JIT) compilation of the methods that were previously recorded in the specified profile file, on a background thread. Inicia o processo de gravação do uso do método atual, que posteriormente substituirá o arquivo de perfil especificado.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)

Parâmetros

profile
String

O nome de arquivo do perfil a ser usado.The file name of the profile to use.

Atributos

Comentários

Se o perfil especificado existir na pasta especificada pelo SetProfileRoot método, as informações contidas nele serão usadas para determinar a ordem na qual os métodos são compilados no thread em segundo plano.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. O StartProfile método criará o perfil se ele ainda não existir e iniciará a gravação do uso do método.The StartProfile method creates the profile if it does not already exist, and initiates the recording of method use.

Somente os métodos que são realmente chamados são registrados, independentemente de terem sido compilados no thread em segundo plano ou no thread do aplicativo principal.Only methods that are actually called are recorded, regardless of whether they were compiled on the background thread or on the main application thread. Um método é compilado no thread do aplicativo principal se o aplicativo precisar chamá-lo antes que o thread em segundo plano o tenha compilado.A method is compiled on the main application thread if the application needs to call it before the background thread has compiled it.

O código que executa a gravação controla a taxa na qual os métodos são compilados, incluindo métodos que são compilados no thread em segundo plano e no thread principal.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. Quando a taxa cai abaixo de um nível predeterminado, a gravação é interrompida.When the rate falls below a predetermined level, recording stops. A gravação também parará se a taxa de compilação JIT exceder um limite superior predeterminado.Recording also stops if the rate of JIT compilation exceeds a predetermined upper limit.

Chamar esse método interrompe qualquer gravação anterior em andamento.Calling this method stops any previous recording in progress. Chamar esse método com um nome de arquivo de perfil nulo interrompe qualquer gravação em andamento e não inicia uma nova gravação.Calling this method with a null profile file name stops any recording in progress and does not start a new recording.

Se o SetProfileRoot método não tiver sido chamado para o domínio de aplicativo atual ou se o computador não tiver vários núcleos, o StartProfile método não terá nenhum efeito.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.

Aplica-se a