vm:testing.unsafe.trace-entrypoints-fn pragma

This pragma is used for testing purposes in the test suite.

Example:

void hook(String functionName, int entryPointId) {
  // ...
}

class C<T> {
  @pragma('vm:testing.unsafe.trace-entrypoints-fn', hook)
  void foo(T x) {
    // ...
  }
}

When foo is invoked, hook will be called in foo's prologue if foo was compiled with multiple entry points. hook will be passed the name of the function it was called for and the ID of the entry point used for the invocation: