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

ghc -ddump-simpl-stats output missing #2012

Closed
harendra-kumar opened this issue Apr 8, 2016 · 8 comments
Closed

ghc -ddump-simpl-stats output missing #2012

harendra-kumar opened this issue Apr 8, 2016 · 8 comments

Comments

@harendra-kumar
Copy link
Collaborator

I used the following command line to print the ghc simplifier stats:

stack build --ghc-options -ddump-simpl-stats

I also tried the -v option but I could not find the output of the command anywhere. Neither on console nor in the logs. Though when I invoked ghc directly I see the output as follows. I expect to find the same with stack build as well.

cueball:/vol/hosts/cueball/workspace/projects/unicode-transforms/Data/Text$ stack ghc --package unicode-transforms -- -ddump-simpl-stats NormalizeNative.hs
[1 of 1] Compiling Data.Text.NormalizeNative ( NormalizeNative.hs, NormalizeNative.o )

==================== Grand total simplifier statistics ====================
Total ticks:     2

1 PreInlineUnconditionally 1 t_a2Uk
1 BetaReduction 1 t_a2Uk
2 SimplifierDone 2
@mgsloan
Copy link
Contributor

mgsloan commented Apr 8, 2016

This is likely due to stack providing the ghc options -ddump-hi -ddump-to-file so that it can get build dependency info. Not sure what to about that, except perhaps putting the file to the console or something (but without the ddump-hi portions)

@mgsloan mgsloan added this to the P2: Should milestone Apr 8, 2016
@harendra-kumar
Copy link
Collaborator Author

Even a pointer to the dump file location at the end of the compilation should help. At least the user will know what happened and where the info can be found.

@mgsloan
Copy link
Contributor

mgsloan commented Apr 8, 2016

Yeah, that's a good solution!

@harendra-kumar
Copy link
Collaborator Author

harendra-kumar commented May 20, 2016

There is another strange problem when using -ddump compiler options in the cabal file, the dump output for stg/cmm/asm is duplicated in the dump file. This is the case for stg/cmm/asm outputs but strangely not for the core output.

@mgsloan
Copy link
Contributor

mgsloan commented May 21, 2016

It's strange to me that the ddump output appends, that may be an oversight in ghc, because for the dump-hi files it recreates them.

It'd be tricky to correctly clear out the dump files. We can either:

  1. Remove all dump files. This means that for partial recompiles, we'd only have dump files for stuff that recompiled. So to get all ddump data you'd need to do -fforce-recomp.

  2. Somehow know which modules will recompile, and delete the associated dump files.

@harendra-kumar
Copy link
Collaborator Author

Earlier I thought it appends. But it does not append it just appears twice in each file every time. Strangely it does not happen for .dump-simpl but happens for all other dump files. Perhaps some ghc option is causing it, not sure which one.

@sjakobi
Copy link
Member

sjakobi commented Jul 15, 2016

Even a pointer to the dump file location at the end of the compilation should help.

This idea is also being tracked in #1727.

@snoyberg
Copy link
Contributor

Closing in favor of #1727. Also, this should be addressed more completely by #4545

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants