-
-
Notifications
You must be signed in to change notification settings - Fork 640
Added Instrumented Profiling Support #2446
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
Added Instrumented Profiling Support #2446
Conversation
redorav
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it's both a property in the property sheet and a manually set flag? Sounds a bit of an odd setup but I guess that's the way it works, looks good to me
Can you elaborate? This is something that we can set via the MSBuild API and if we are using msc from a non Visual Studio exporter. |
|
Ah it's like a part of it goes to the program database file (the pdb I guess) where it's set on the property pages and another part is set in the linker with a manual /PROFILE flag |
|
The "msc.lua" is completely separate from the VS exporter. They both pipe data to the linker. |
|
Ah I see, I misunderstand many parts of Premake still |
Jarod42
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be -pg flags for gcc/clang to be usable with gprof?
src/tools/msc.lua
Outdated
| table.insert(flags, '/NODEFAULTLIB:' .. ignore) | ||
| end | ||
|
|
||
| -- If the type is ConsoleApp, WindowedApp, or SharedLib and PROFILE is set, add the appropriate flag. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find that kind of comment useless, it just repeats the below code (which is clear).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I wrote the comment for myself before writing all the code. Will remove.
I completely forgot about this flag. I'll need to investigate where all this would need to go. |
fa7aa1e to
19b8ac0
Compare
19b8ac0 to
fe39521
Compare
fe39521 to
993df49
Compare
What does this PR do?
Adds an API for enabling instrumented profiling in gcc, clang, cosmocc, and msc, as well as the Visual Studio exporter.
How does this PR change Premake's behavior?
No breaking changes. Only a functionality add.
Anything else we should know?
N/A
Did you check all the boxes?
closes #XXXXin comment to auto-close issue when PR is merged)You can now support Premake on our OpenCollective. Your contributions help us spend more time responding to requests like these!