Skip to content

8146132: Excessive output from make test-image#11930

Closed
coleenp wants to merge 2 commits intoopenjdk:masterfrom
coleenp:output
Closed

8146132: Excessive output from make test-image#11930
coleenp wants to merge 2 commits intoopenjdk:masterfrom
coleenp:output

Conversation

@coleenp
Copy link
Contributor

@coleenp coleenp commented Jan 10, 2023

This change makes native output files be only printed when building with LOG=info, to make the build not have so many pages of output.
Tested with GHA and locally (tbd)


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/11930/head:pull/11930
$ git checkout pull/11930

Update a local copy of the PR:
$ git checkout pull/11930
$ git pull https://git.openjdk.org/jdk pull/11930/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 11930

View PR using the GUI difftool:
$ git pr show -t 11930

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/11930.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 10, 2023

👋 Welcome back coleenp! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Jan 10, 2023
@openjdk
Copy link

openjdk bot commented Jan 10, 2023

@coleenp The following label will be automatically applied to this pull request:

  • build

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the build build-dev@openjdk.org label Jan 10, 2023
@mlbridge
Copy link

mlbridge bot commented Jan 10, 2023

Webrevs

Copy link
Member

@erikj79 erikj79 left a comment

Choose a reason for hiding this comment

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

I'm sorry, but I don't think this is the right solution here. I agree that the log level needs to be altered in some way when compiling the tests, as there are so many of them, but this removes logging at the default level for all native targets. I also think it's inconsistent if the "Creating ..." log message is on info while the "Updating ..." of the same thing is still on warn.

I think a better solution would be to give SetupNativeCompilation a parameter or two that controls log level, and that the SetupTestCompilation macro could use that to lower the level for test compilations, while probably also adding a meta log message for all the tests it's building to replace the individual log messages on level warn.

@coleenp
Copy link
Contributor Author

coleenp commented Jan 11, 2023

Hi Erik, I'm so annoyed with this page of messages that I don't want to see every time I run tests for the first time. I kept the Updating message on Warn because that is an interesting message (ie you've touched a .c file and want to see it got compiled).
As far as the second paragraph goes, I have no idea what that means. I don't want to have more special options in my build scripts. I want this "Creating every.o file in our test system" message to not come out by default for me or for anyone.
Can you make this happen? I'd rather not have this private patch in all the repositories I create from now on because seeing pages of these messages is that annoying to me.

@coleenp
Copy link
Contributor Author

coleenp commented Jan 11, 2023

Turning on LOG=info for test-images has reams of information that probably should be LOG=debug. Really nobody needs to see each native object file copied here and there.

@coleenp
Copy link
Contributor Author

coleenp commented Jan 12, 2023

@erikj79 @magicus I added a parameter but not the meta log message for the tests. It seems to work.

@magicus
Copy link
Member

magicus commented Jan 13, 2023

Hm. I fully agree on the problem description, but not entirely sure about this solution. In contrast with Erik, I was more thinking along the lines that the decision to be more quiet could be made by SetupNativeCompilation itself, based on the number of files it compiled. So if it only compiled a single c file into a single dll, then it should be quiet.

With "meta message", I think Erik means that if all tests are suddenly being quiet, we should compensate by printing a more general high-level message like
"Building NN native tests".

@coleenp
Copy link
Contributor Author

coleenp commented Jan 13, 2023

The reason I'm picking on the test files and not the message Creating blah because of (1) file is because it has the logic in TestFilesCompilation.gmk compiles each individually.
Adding a message at the end of it like:

+  $$(call LogWarn, Creating $$($1_OUTPUT_DIR)/support/ from $$(words \
+               $$(filter-out %.vardeps, $$($1_FILTERED_FILE_LIST))) file(s))

comes out whether anything compiled or not, which nobody wants.
Unless you can pass status back from this 'foreach' loop. I guess I'm stuck.

@erikj79
Copy link
Member

erikj79 commented Jan 13, 2023

Hm. I fully agree on the problem description, but not entirely sure about this solution. In contrast with Erik, I was more thinking along the lines that the decision to be more quiet could be made by SetupNativeCompilation itself, based on the number of files it compiled. So if it only compiled a single c file into a single dll, then it should be quiet.

With "meta message", I think Erik means that if all tests are suddenly being quiet, we should compensate by printing a more general high-level message like "Building NN native tests".

I think such a rule is too generic and could easily end up not logging a JDK library or launcher. My idea with having SetupTestCompilation control the log level for tests was that it could add a single "meta" log message saying something like "Building NN native tests", which would then replace all of those hidden messages that would otherwise have been printed by SetupNativeCompilation. At least in my mind, that divides the responsibility better with less risk of hiding future useful log messages.

comes out whether anything compiled or not, which nobody wants.
Unless you can pass status back from this 'foreach' loop. I guess I'm stuck.

Yes, getting this right is more tricky. We also want the message to be printed before the compilation starts. To do this, we need to create a rule with a dummy (but real) target that depends on all the source files found by SetupTestCompilation, prints the message and then touches the target file. It's possible we need to some more tweaking to make it work well, not sure.

@coleenp
Copy link
Contributor Author

coleenp commented Jan 16, 2023

I don't know how to do this. My local solution:

make jdk-image test-image | grep -v "Creating "

@coleenp coleenp closed this Jan 16, 2023
@coleenp coleenp deleted the output branch January 16, 2023 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build build-dev@openjdk.org rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

3 participants