Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

146
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda