Commit Graph
5 Commits
Author SHA1 Message Date
Anna Henningsen b470ba08e1 src: clean up generic counter implementation
This addresses late review comments for the recently
landed cfbfc1b050 and aligns the new code with the
pre-existing V8 fast call counters.

Refs: https://github.com/nodejs/node/pull/60434#pullrequestreview-3386035944
PR-URL: https://github.com/nodejs/node/pull/60447
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-10-30 00:41:25 +00:00
Joyee Cheung cfbfc1b050 src: add COUNT_GENERIC_USAGE utility for tests
PR-URL: https://github.com/nodejs/node/pull/60434
Fixes: https://github.com/nodejs/node/issues/60423
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
2025-10-28 00:15:54 +00:00
Anna Henningsen 6bb08f7f8e src: use FastStringKey for TrackV8FastApiCall
This is the exact intended use case of `FastStringKey`.

PR-URL: https://github.com/nodejs/node/pull/59148
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Ilyas Shabi <ilyasshabi94@gmail.com>
2025-07-23 16:28:15 +00:00
Yagiz Nizipli de5f91db8b src: avoid copy on getV8FastApiCallCount
PR-URL: https://github.com/nodejs/node/pull/56081
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-12-01 17:27:16 +00:00
Michaël Zasso 1d35a066e7 src,test: ensure that V8 fast APIs are called
Adds a debug-only macro that can be used to track when a V8 fast API is
called. A map of counters is maintained in in thread-local storage and
an internal API can be called to get the total count associated with
a call id.
Specific tests are added and `crypto.timingSafeEqual` as well as
internal documentation are updated to show how to use the macro
and test fast API calls without running long loops.

PR-URL: https://github.com/nodejs/node/pull/54317
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2024-08-13 12:37:02 +00:00