Skip to content
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

Porting over Hermes Events to Chrome Format [Duplicate] #13

Closed
saphal1998 opened this issue Jun 18, 2020 · 1 comment
Closed

Porting over Hermes Events to Chrome Format [Duplicate] #13

saphal1998 opened this issue Jun 18, 2020 · 1 comment
Assignees

Comments

@saphal1998
Copy link
Collaborator

The Trace Event Format has listed down the various chrome events and how they are understood by the Chrome Profiler.

The Chrome Profiler consumes this profiling data in the JSON Array Format while the Hermes Profile is generated in the JSON Object Format. We might have made an oversight in assuming that the traceEvents generated by the Hermes Profiler are going to have phases assigned similar to Chrome Profiler, however this is not the case.

The phases in the case of the Hermes Profile need to be derived from the Samples and Stack Frames Properties in the Hermes Profile. This is where things are accumulated from lower level OS Kernels and we need to make sense of this data.

@saphal1998
Copy link
Collaborator Author

I went through how the Chrome Profiles do this and came across the Catapult Project which basically implements the trace-viewer for Chrome. I believe we can find the way to make sense of our code by digging deep through this repository

On some research I found this systrace/profile_chrome/main.py file to be relevant to what we want to achieve. My reasons for believing so are simply based on this line in the code. This leads us to this systrace/profile_chrome/profiler.py file where a CaptureProfile Method has been implemented, now the relevant line in this method is probably the tracing_controller, which leads us to the systrace/systrace/tracing_controller.py file containing tracing code, however such tracing code is also available at other locations, for example: ftrace_events, android_events. From what I understand, the tracing_controller mentioned earlier, aggregates the events generated by these events. For the purposes for this project, I think we should pay particular emphasis on the Android Agent. However, this does require an extremely deep dive into the code. I think we should confirm with @jevakallio if we are on the right path, or if I am mistaken here.

@react-native-community react-native-community locked and limited conversation to collaborators Jun 18, 2020
@saphal1998 saphal1998 changed the title Porting over Hermes Events to Chrome Format Porting over Hermes Events to Chrome Format [Duplicate] Jun 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants