Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

154
Visualizações
How to get actual invocation count of a optimized function in V8

Every function has a property invocation_count in FeedbackVector to record the number of times the function was called. But after a function is optimized, its invocation count will not be increased when I call this function again. Is there any way to get the invocation count or update the invocation count attribute in FeedbackVector after a function has been optimized?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

(V8 developer here.)

No, there isn't. Optimized functions don't count how often they've been called (because they have no reason to; having them update a counter would be a waste of time).

If you really care, you have two options:

(1) You could add counters in the JavaScript source of the function(s) in question:

var myFuncCalled = 0;
function myFunc() {
  myFuncCalled++;
  // rest of the function's code...
}

And dump those counters at the end of the program.

(2) You could modify V8 to make optimized code update the count in the feedback vector. Off the top of my head I'm not sure how exactly you'd do that, but it's certainly possible. (We wouldn't want to upstream such a patch, this would be just for your local experimentation.)

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda