-
Notifications
You must be signed in to change notification settings - Fork 650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce format-agnostic API for JS Sampling #1603
Conversation
This pull request was exported from Phabricator. Differential Revision: D67353585 |
Summary: This diff adds a new API on `HermesRuntime`, which will emit a `struct` with all necessary information about completed JavaScript Sampling Profile. This `struct` can later be used by other third parties, such as React Native. The reason for creating a data source, and not just providing a stream to which Hermes will emit serialized information is that on React Native side we own the format in which data should be serialized, together with the data from other potential sources, such as User Timings, Interactions, Network, etc. HermesRuntime will have 2 new API endpoints: - `dumpAsProfile`. A method on `HermesRuntime` instance, which returns `Profile` that contains all relevant information about the recorded sampled stack trace. - `dumpAsProfilesGlobal`. A static method, which returns vector of all recorded Profiles for all registered sampling profiler instances. The actual conversion to Trace Event Format will hapen on React Native side, Hermes will only emit data structure that is agnostic to format and operates only with JavaScript runtime-level entities and general stuff: call stack frame information, timestamps, information about OS process and thread where sampling occured. Differential Revision: D67353585
64f3216
to
3486e70
Compare
This pull request was exported from Phabricator. Differential Revision: D67353585 |
Summary: This diff adds a new API on `HermesRuntime`, which will emit a `struct` with all necessary information about completed JavaScript Sampling Profile. This `struct` can later be used by other third parties, such as React Native. The reason for creating a data source, and not just providing a stream to which Hermes will emit serialized information is that on React Native side we own the format in which data should be serialized, together with the data from other potential sources, such as User Timings, Interactions, Network, etc. HermesRuntime will have 2 new API endpoints: - `dumpAsProfile`. A method on `HermesRuntime` instance, which returns `Profile` that contains all relevant information about the recorded sampled stack trace. - `dumpAsProfilesGlobal`. A static method, which returns vector of all recorded Profiles for all registered sampling profiler instances. The actual conversion to Trace Event Format will hapen on React Native side, Hermes will only emit data structure that is agnostic to format and operates only with JavaScript runtime-level entities and general stuff: call stack frame information, timestamps, information about OS process and thread where sampling occured. Reviewed By: dannysu Differential Revision: D67353585
3486e70
to
80fcff0
Compare
This pull request was exported from Phabricator. Differential Revision: D67353585 |
Summary: This diff adds a new API on `HermesRuntime`, which will emit a `struct` with all necessary information about completed JavaScript Sampling Profile. This `struct` can later be used by other third parties, such as React Native. The reason for creating a data source, and not just providing a stream to which Hermes will emit serialized information is that on React Native side we own the format in which data should be serialized, together with the data from other potential sources, such as User Timings, Interactions, Network, etc. HermesRuntime will have 2 new API endpoints: - `dumpAsProfile`. A method on `HermesRuntime` instance, which returns `Profile` that contains all relevant information about the recorded sampled stack trace. - `dumpAsProfilesGlobal`. A static method, which returns vector of all recorded Profiles for all registered sampling profiler instances. The actual conversion to Trace Event Format will hapen on React Native side, Hermes will only emit data structure that is agnostic to format and operates only with JavaScript runtime-level entities and general stuff: call stack frame information, timestamps, information about OS process and thread where sampling occured. Reviewed By: dannysu Differential Revision: D67353585
80fcff0
to
94d5eef
Compare
This pull request was exported from Phabricator. Differential Revision: D67353585 |
Summary: This diff adds a new API on `HermesRuntime`, which will emit a `struct` with all necessary information about completed JavaScript Sampling Profile. This `struct` can later be used by other third parties, such as React Native. The reason for creating a data source, and not just providing a stream to which Hermes will emit serialized information is that on React Native side we own the format in which data should be serialized, together with the data from other potential sources, such as User Timings, Interactions, Network, etc. HermesRuntime will have 2 new API endpoints: - `dumpAsProfile`. A method on `HermesRuntime` instance, which returns `Profile` that contains all relevant information about the recorded sampled stack trace. - `dumpAsProfilesGlobal`. A static method, which returns vector of all recorded Profiles for all registered sampling profiler instances. The actual conversion to Trace Event Format will hapen on React Native side, Hermes will only emit data structure that is agnostic to format and operates only with JavaScript runtime-level entities and general stuff: call stack frame information, timestamps, information about OS process and thread where sampling occured. Reviewed By: dannysu Differential Revision: D67353585
94d5eef
to
16e0443
Compare
This pull request was exported from Phabricator. Differential Revision: D67353585 |
This pull request has been merged in 37437be. |
Summary:
This diff adds a new API on
HermesRuntime
, which will emit astruct
with all necessary information about completed JavaScript Sampling Profile.This
struct
can later be used by other third parties, such as React Native. The reason for creating a data source, and not just providing a stream to which Hermes will emit serialized information is that on React Native side we own the format in which data should be serialized, together with the data from other potential sources, such as User Timings, Interactions, Network, etc.HermesRuntime will have 2 new API endpoints:
dumpAsProfile
. A method onHermesRuntime
instance, which returnsProfile
that contains all relevant information about the recorded sampled stack trace.dumpAsProfilesGlobal
. A static method, which returns vector of all recorded Profiles for all registered sampling profiler instances.The actual conversion to Trace Event Format will hapen on React Native side, Hermes will only emit data structure that is agnostic to format and operates only with JavaScript runtime-level entities and general stuff: call stack frame information, timestamps, information about OS process and thread where sampling occured.
Differential Revision: D67353585