Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(Android): Migrate Hermes Instruments to Kotlin (#48378)
Summary: Time to migrate some of Hermes's instruments. I see that HermesMemoryDumper(`react/hermes/instrumentation/HermesMemoryDumper.h`) implements the interface on C++, ~but not sure if i need to update the `getId` call to just `id` (same with `getInternalStorage`) or if the interop between Kotlin and Java applies to these things as well. cortinico Any thoughts on your side would be appreciated. HermesSamplingProfiler just became an object, since it was a singleton and a static anyway. Here is what HermesMemoryDumper.h looks like: <img width="1840" alt="Screenshot 2024-12-24 at 10 03 00" src="https://github.com/user-attachments/assets/d18e378a-9b23-47a9-83c9-402d29aeaa5f" />~ *Updated*: I ended up making them match the function signature on Cxx, because even if it does have that implicit behavior, doesn't feel right to tap into it like this. ## Changelog: [INTERNAL] [FIXED] - Migrate HermesMemoryDumper and HermesSamplingProfiler to Kotlin Pull Request resolved: #48378 Test Plan: `/gradlew test`: <img width="1840" alt="Screenshot 2024-12-24 at 09 54 29" src="https://github.com/user-attachments/assets/1b23fb6f-9da8-42e4-a348-7da868df77c1" /> Reviewed By: cortinico Differential Revision: D67657481 Pulled By: philIip fbshipit-source-id: 4fb5e003789d51d464d0cca5800704ea51324b69
- Loading branch information