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

ftime-trace: add tracing of CTFE ! #4339

Merged

Conversation

JohanEngelen
Copy link
Member

--ftime-trace was not yet tracing CTFE, a major oversight... With these changes it now does trace CTFE. The start, and function calls during CTFE. I think that gives the user enough info to pinpoint where time is spent.

Testcase gives this output:

image

@rikkimax

@JohanEngelen
Copy link
Member Author

JohanEngelen commented Mar 2, 2023

about CI errors: Perhaps dmd-2.102.2-beta.1 miscompiles ?
(it's annoying to test with DMD on macOS, because I have to rebuild LLVM for x86_64 arch...... also with prebuilt llvm for x86_64 I'm running into other linking trouble because of arm/x86_64 mixed link inputs...)
I can disable the testing for LLVM <=10, just to satisfy CI. But latest DMD might really be miscompiling...

@JohanEngelen
Copy link
Member Author

about CI errors: Perhaps dmd-2.102.2-beta.1 miscompiles ?

Pff, I'm a bit rusty it seems... version (LDC) ---> version (IN_LLVM). doh!

@JohanEngelen JohanEngelen reopened this Mar 3, 2023
@JohanEngelen JohanEngelen enabled auto-merge (squash) March 3, 2023 19:13
@JohanEngelen
Copy link
Member Author

@kinke I'd like to get this in the release, automerge enabled.

@JohanEngelen JohanEngelen merged commit 15da933 into ldc-developers:master Mar 3, 2023
@JohanEngelen JohanEngelen deleted the johan/timetrace_ctfe branch March 3, 2023 21:30
@JohanEngelen
Copy link
Member Author

@rikkimax This should be available in ldc-latest-ci (install.sh), see here: https://github.com/ldc-developers/ldc/releases/tag/CI

@rikkimax
Copy link
Contributor

rikkimax commented Mar 6, 2023

There appears to be something wrong with that build (even without time-trace), its take >3 minutes to build what should take sub-40 seconds normally. Was it not optimized?

Perfetto can no longer work with the resulting trace, when scrolled out. Ah I think I know why, CTFE start: [33, 33, 33, 33, 3 ... giant Unicode table here. Yeahhhh the name field needs to be shrunk. If the name is bigger than what a symbol name can be please truncate. After all how many kilobytes do you need to know its a table?

I've included a screenshot of a problem module, and yeahhhh that tells a much better story.
Capture

@JohanEngelen
Copy link
Member Author

There appears to be something wrong with that build (even without time-trace), its take >3 minutes to build what should take sub-40 seconds normally. Was it not optimized?

Perfetto can no longer work with the resulting trace, when scrolled out. Ah I think I know why, CTFE start: [33, 33, 33, 33, 3 ... giant Unicode table here. Yeahhhh the name field needs to be shrunk. If the name is bigger than what a symbol name can be please truncate. After all how many kilobytes do you need to know its a table?

please submit bug reports whenever you find something ;-). (this one I can remember)

JohanEngelen added a commit to weka/ldc that referenced this pull request Jun 1, 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

Successfully merging this pull request may close these issues.

2 participants