Skip to content

Fix stats and progress issues in codegen#14763

Merged
straight-shoota merged 3 commits intocrystal-lang:masterfrom
ysbaddaden:fix/compiler-progress-track
Jul 1, 2024
Merged

Fix stats and progress issues in codegen#14763
straight-shoota merged 3 commits intocrystal-lang:masterfrom
ysbaddaden:fix/compiler-progress-track

Conversation

@ysbaddaden
Copy link
Collaborator

@ysbaddaden ysbaddaden commented Jun 27, 2024

The --stats and --progress params had a couple issues:

  • codegen progress isn't updated when --threads=1 (always the case on Windows);
  • only stats need to collect reused modules (progress doesn't).

Idea for a follow-up: the report fiber of forked codegen could set unit.reused_previous_compilation instead of collecting reused module names, then we wouldn't need to collect the module names into a reused array (we can trust units to be updated) and the #print_codegen_stats method would count & filter has needed.

- progress isn't updated when `--threads=1` (always true on Windows);
- progress doesn't need to collect reused modules (only stats do).
@ysbaddaden ysbaddaden added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:codegen labels Jun 27, 2024
@ysbaddaden ysbaddaden self-assigned this Jun 27, 2024
@straight-shoota straight-shoota added this to the 1.13.0 milestone Jun 28, 2024
Copy link
Member

@sdogruyol sdogruyol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @ysbaddaden 🙏

@ysbaddaden
Copy link
Collaborator Author

@sdogruyol I assume you faced the issue?

@sdogruyol
Copy link
Member

@sdogruyol I assume you faced the issue?

Yes, I recently experienced --stats issue on Windows

@ysbaddaden
Copy link
Collaborator Author

Merged with master to fix conflict with #14762.

@straight-shoota straight-shoota merged commit 53c4991 into crystal-lang:master Jul 1, 2024
@straight-shoota straight-shoota changed the title Codegen: stats and progress issues Fix stats and progress issues in codegen Jul 2, 2024
@ysbaddaden ysbaddaden deleted the fix/compiler-progress-track branch July 2, 2024 08:30
straight-shoota pushed a commit that referenced this pull request Jul 2, 2024
The `--stats` and `--progress` params had a couple issues:

- codegen progress isn't updated when `--threads=1` (always the case on Windows);
- only stats need to collect reused modules (progress doesn't).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:codegen

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants