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

Determine the factors contributing to unexpected slowdowns during self-hosting #86

Closed
jserv opened this issue Dec 7, 2023 · 2 comments
Assignees

Comments

@jserv
Copy link
Collaborator

jserv commented Dec 7, 2023

This project has the capability for self-hosting, transitioning from native compilation in stage 1 to stage 2. Given that shecc is composed in ANSI C, it allows for the use of any compiler across various platforms for the initial compilation. This process is further facilitated through the use of RISC-V and/or Arm emulators for bootstrapping. Nevertheless, we are experiencing unforeseen delays during the self-hosting process, particularly in the execution times of stages 1 and 2. Our aim is to conduct a thorough investigation into the causes of these slowdowns.

We can use uftrace to identify the sources of slowdowns.

@vacantron
Copy link
Collaborator

After #90 , it no more needs to run the qemu on the ARM32 host. The time of the stage-2 build has decreased from ~25s to 4s.

The uftrace needs the debug symbols (built with GCC "-g" and "-finstrument-functions" flags) to trace the executable file. We can only use it in the stage-1 build, instead, we can use perf to identify the slowdowns in the stage-2 build.

@vacantron
Copy link
Collaborator

@jserv , should we close and migrate this topic into #88 ?

@jserv jserv closed this as completed Dec 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants