-
Notifications
You must be signed in to change notification settings - Fork 136
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
[DebugInfo] Support for -gpubnames
option in flang
#1033
Conversation
Hi @SouraVX , I recently realized that our CI might not be exactly following the official building guidelines (or that the guidelines might have an error). |
Thanks @michalpasztamobica for clarifying.
Once driver CI completes the build, then I'll take those artifacts and use them to build/validate |
Hi Sourabh, |
Yea, Though not much of CI/yaml person, but I noticed the same :)
Thanks for clarifying again :) This is what we used locally for building/validating i.e, First build the |
@michalpasztamobica the only role of the guidelines is to provide you with a guidance, not a list of strict requirements. With this guidance some baseline was established. If someone was able to build flang its own way and it works for them, then fine. But when one runs into trouble (e.g. the resulting flang compiler is haunted by ICEs), then conformance to the guidelines is verified first. Also, these guidelines are not set in stone: if you observe that they result in a suboptimal or faulty product, they need to be revisited. They were not revisited for a very long time, apparently no one was in any immediate need for discussing them. |
Once #1034 is merged, is there a way to re-trigger the CI builds ? That should make these CI bots green(Happy). |
@SouraVX - now the CI is using the right compiler:
But the failure is still there... Do you see any difference between how the CI builds and runs tests and how you do it locally? |
My test case is passing I think(Summary not listed in https://github.com/flang-compiler/flang/pull/1033/checks?check_run_id=2378342786) ?
|
Yes. but as a more intrusive check, how should one confirm the HEAD of the |
@SouraVX - you have a point, yes. What I can do is tweak my local fork to build your changes flang-compiler/classic-flang-llvm-project#32 and this PR, as I did previously and then I should be able to see that everything is passing. This will take a while, because the classic-flang-llvm-project on Github builds for more thatn 2 hours, but we should have the results available soon. If the failure is there - we can debug the CI configuration. |
@michalpasztamobica, The process we follow internally, when such dependent changes are to be merged. We merge the parent change first (flang-driver). Once that is done we merge the child one. This may seems sequential but doesn't break things, since CI would automatically pick up the latest flang-driver. |
Sure, we this would save me some hassle, indeed :) The failure looks like it could be caused by the missing changes from the dependent PR. |
lowered strictness of a check in |
Huh 💯 it worked, CI is in good shape. Thanks @michalpasztamobica :) |
Is this a fix of the test or just a temporary workaround until we have the dependent PR available? |
This PR is extending
Notice last closing brace
Usually we follow, not so strict style such that no test should be upgraded randomly since they failed due to there strict nature. |
EDIT: corrected testname. @SouraVX , how come this PR (namely the new I think this situation we are having here reveals another flaw in our CI setup worth discussing on the Wednesday call. |
You meant |
@SouraVX , yes, my mistake sorry. I thought this test will only pass with the dependent changes? |
It seems to me like, there might be some missing/mismatch/delta of pieces between upstream and downstream :(
Log for flang-fork: Section absent in both cases
|
test/debug_info/nametable.f90
Outdated
!RUN: %flang %s -g -gpubnames -S -emit-llvm -o - | FileCheck %s --check-prefix=PUBNAMESECTION | ||
|
||
!Ensure that "nameTableKind: None" field is not present in DICompileUnit. | ||
!NAMESECTION-NOT: !DICompileUnit({{.*}}, nameTableKind: None |
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.
These checks should fail, catching if the nameTableKind: None
is present when -gpubnames
is specified. To my surprise this is still passing :(
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 got the test to work correctly by not using -DAG
checks.
Hi @SouraVX,
Does this make sense? I believe this suggestion would be in line with what @bryanpkc suggested in one of the Wednesday calls when we were discussing this topic. |
Thanks for taking out time & revisiting this @michalpasztamobica :). I've pushed changes updated the testcase to be more specific. Detailed log:
|
@michalpasztamobica Is it possible for you to build the driver using PR: flang-compiler/classic-flang-llvm-project#32 and then build |
@SouraVX , I can do it or I can try to hack the CI on my fork to do it for us :) |
Rebased in hopes of CI pick up the parent Driver change first! |
I am running your commit on my fork: michalpasztamobica/classic-flang-llvm-project#4. |
Thank you @michalpasztamobica so much for taking out time & collaborating on this one! |
CI all checks passes here in michalpasztamobica/classic-flang-llvm-project#4 thanks to @michalpasztamobica . |
No problem at all, it took me just a couple minutes to cherry-pick your changes and modify the script to run a different repo and branch. Feel free to use this trick in your branch to test such multi-repo builds :) Thanks should go to github for letting us use their servers, which in fact did all the actual work 😄 |
PING! |
@SouraVX what do you need here to proceed? I guess the driver/llvm side changes have to be committed first? |
Yes, I think driver PR needed for other branches as well. I'll be doing this in a moment. |
Once CI passes in all branches(i.e after merging of the Driver PR's) -- rebasing should be enough to trigger a CI build. |
This option is used to generate extra debug information. i.e DWARFv4 `flang -gdwarf-4 -gpubnames test.c` will generate `.debug_pubnames` and `.debug_pubtypes` in the executable. DWARFv5 `flang -gdwarf-5 -gpubnames test.c` will generate `.debug_names` in the executable. Prior to this change these sections were getting generated by default. These sections were extra and may or maynot be used by the debugger. Hence generation of these sections are bind to this `-gpubnames` option. This behavior is analogous to `clang`, `gcc`, gfortran.
@kiranchandramohan @bryanpkc , All CI bots are green now :) Would you please take a look. Thank You! |
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.
LGTM. Tests ran fine in our build.
@kiranchandramohan could you please have a look :) |
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.
LGTM.
I am wondering if we should advertise the merge of this PR somehow? It requires an update of the llvm-project build for |
Thanks for the noting this, I'll put a note in Slack. Would that be Okay ? Otherwise folks subscribed/starred to this repo should also receiving this communication & from looking at PR they can easily figure out ? |
@SouraVX , I was thinking about the mailing list, but I think you are right that Slack channel is a better idea :) If people think otherwise they can ask for an e-mail to the mailing list :) I think only people subscribed to this particular PR will receive updates from this PR. At least I am not getting notificiation from other PRs, just those that I contribute, comment or subscribe to. |
@michalpasztamobica I think it's a matter of notification/starring the repo settings: I receive notifications for every event happening in this repo :) |
This option is used to generate extra debug information.
i.e
DWARFv4
flang -gdwarf-4 -gpubnames test.c
will generate.debug_pubnames
and.debug_pubtypes
in the executable.DWARFv5
flang -gdwarf-5 -gpubnames test.c
will generate.debug_names
inthe executable.
Prior to this change these sections were getting generated by default.
These sections were extra and may or maynot be used by the debugger. Hence
generation of these sections are bind to this
-gpubnames
option.This behavior is analogous to
clang
,gcc
, gfortran.