Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Facundo Domínguez
GHC
Commits
52f5e8fb
Commit
52f5e8fb
authored
1 year ago
by
cydparser
Committed by
Marge Bot
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix -ddump-to-file and -ddump-timings interaction (
#20316
)
parent
d7047e0d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
compiler/GHC/Utils/Error.hs
+12
-3
12 additions, 3 deletions
compiler/GHC/Utils/Error.hs
testsuite/tests/driver/T20316.stderr
+0
-6
0 additions, 6 deletions
testsuite/tests/driver/T20316.stderr
with
12 additions
and
9 deletions
compiler/GHC/Utils/Error.hs
+
12
−
3
View file @
52f5e8fb
...
...
@@ -414,7 +414,7 @@ withTiming' :: MonadIO m
->
m
a
withTiming'
logger
what
force_result
prtimings
action
=
if
logVerbAtLeast
logger
2
||
logHasDumpFlag
logger
Opt_D_dump_timings
then
do
when
P
rintTimings
$
then
do
when
p
rintTimings
NotDumpToFile
$
liftIO
$
logInfo
logger
$
withPprStyle
defaultUserStyle
$
text
"***"
<+>
what
<>
colon
let
ctx
=
log_default_user_context
(
logFlags
logger
)
...
...
@@ -432,7 +432,7 @@ withTiming' logger what force_result prtimings action
let
alloc
=
alloc0
-
alloc1
time
=
realToFrac
(
end
-
start
)
*
1e-9
when
(
logVerbAtLeast
logger
2
&&
pr
timings
==
PrintTimings
)
when
(
logVerbAtLeast
logger
2
&&
pr
intTimingsNotDumpToFile
)
$
liftIO
$
logInfo
logger
$
withPprStyle
defaultUserStyle
(
text
"!!!"
<+>
what
<>
colon
<+>
text
"finished in"
<+>
doublePrec
2
time
...
...
@@ -452,7 +452,16 @@ withTiming' logger what force_result prtimings action
pure
r
else
action
where
whenPrintTimings
=
liftIO
.
when
(
prtimings
==
PrintTimings
)
where
whenPrintTimings
=
liftIO
.
when
printTimings
printTimings
=
prtimings
==
PrintTimings
-- Avoid both printing to console and dumping to a file (#20316).
printTimingsNotDumpToFile
=
printTimings
&&
not
(
log_dump_to_file
(
logFlags
logger
))
recordAllocs
alloc
=
liftIO
$
traceMarkerIO
$
"GHC:allocs:"
++
show
alloc
...
...
This diff is collapsed.
Click to expand it.
testsuite/tests/driver/T20316.stderr
deleted
100644 → 0
+
0
−
6
View file @
d7047e0d
*** initializing unit database:
*** Chasing dependencies:
*** Parser [Main]:
*** Renamer/typechecker [Main]:
*** Desugar [Main]:
*** CoreTidy [Main]:
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment