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
Reinier Maas
GHC
Commits
f1e5245a
Commit
f1e5245a
authored
1 year ago
by
BinderDavid
Committed by
Marge Bot
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Add RTS option to supress tix file
parent
6a27eb97
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
libraries/base/GHC/RTS/Flags.hsc
+13
-0
13 additions, 0 deletions
libraries/base/GHC/RTS/Flags.hsc
rts/Hpc.c
+1
-1
1 addition, 1 deletion
rts/Hpc.c
rts/RtsFlags.c
+6
-0
6 additions, 0 deletions
rts/RtsFlags.c
rts/include/rts/Flags.h
+7
-0
7 additions, 0 deletions
rts/include/rts/Flags.h
with
27 additions
and
1 deletion
libraries/base/GHC/RTS/Flags.hsc
+
13
−
0
View file @
f1e5245a
...
@@ -387,6 +387,13 @@ data ParFlags = ParFlags
...
@@ -387,6 +387,13 @@ data ParFlags = ParFlags
, Generic -- ^ @since 4.15.0.0
, Generic -- ^ @since 4.15.0.0
)
)
-- | Parameters pertaining to Haskell program coverage (HPC)
data HpcFlags = HpcFlags
{ emitTixFile :: Bool
}
deriving (Show
, Generic
)
-- | Parameters of the runtime system
-- | Parameters of the runtime system
--
--
-- @since 4.8.0.0
-- @since 4.8.0.0
...
@@ -400,6 +407,7 @@ data RTSFlags = RTSFlags
...
@@ -400,6 +407,7 @@ data RTSFlags = RTSFlags
, traceFlags :: TraceFlags
, traceFlags :: TraceFlags
, tickyFlags :: TickyFlags
, tickyFlags :: TickyFlags
, parFlags :: ParFlags
, parFlags :: ParFlags
, hpcFlags :: HpcFlags
} deriving ( Show -- ^ @since 4.8.0.0
} deriving ( Show -- ^ @since 4.8.0.0
, Generic -- ^ @since 4.15.0.0
, Generic -- ^ @since 4.15.0.0
)
)
...
@@ -417,6 +425,7 @@ getRTSFlags =
...
@@ -417,6 +425,7 @@ getRTSFlags =
<*> getTraceFlags
<*> getTraceFlags
<*> getTickyFlags
<*> getTickyFlags
<*> getParFlags
<*> getParFlags
<*> getHpcFlags
peekFilePath :: Ptr () -> IO (Maybe FilePath)
peekFilePath :: Ptr () -> IO (Maybe FilePath)
peekFilePath ptr
peekFilePath ptr
...
@@ -488,6 +497,10 @@ getParFlags = do
...
@@ -488,6 +497,10 @@ getParFlags = do
<*> (toBool <$>
<*> (toBool <$>
(#{peek PAR_FLAGS, setAffinity} ptr :: IO CBool))
(#{peek PAR_FLAGS, setAffinity} ptr :: IO CBool))
getHpcFlags :: IO HpcFlags
getHpcFlags = error "TODO: Implement getHpcFlags"
getConcFlags :: IO ConcFlags
getConcFlags :: IO ConcFlags
getConcFlags = do
getConcFlags = do
let ptr = (#ptr RTS_FLAGS, ConcFlags) rtsFlagsPtr
let ptr = (#ptr RTS_FLAGS, ConcFlags) rtsFlagsPtr
...
...
This diff is collapsed.
Click to expand it.
rts/Hpc.c
+
1
−
1
View file @
f1e5245a
...
@@ -394,7 +394,7 @@ exitHpc(void) {
...
@@ -394,7 +394,7 @@ exitHpc(void) {
#else
#else
bool
is_subprocess
=
false
;
bool
is_subprocess
=
false
;
#endif
#endif
if
(
!
is_subprocess
)
{
if
(
!
is_subprocess
&&
RtsFlags
.
HpcFlags
.
emitTixFile
)
{
FILE
*
f
=
__rts_fopen
(
tixFilename
,
"w+"
);
FILE
*
f
=
__rts_fopen
(
tixFilename
,
"w+"
);
writeTix
(
f
);
writeTix
(
f
);
}
}
...
...
This diff is collapsed.
Click to expand it.
rts/RtsFlags.c
+
6
−
0
View file @
f1e5245a
...
@@ -294,6 +294,7 @@ void initRtsFlagsDefaults(void)
...
@@ -294,6 +294,7 @@ void initRtsFlagsDefaults(void)
RtsFlags
.
TickyFlags
.
showTickyStats
=
false
;
RtsFlags
.
TickyFlags
.
showTickyStats
=
false
;
RtsFlags
.
TickyFlags
.
tickyFile
=
NULL
;
RtsFlags
.
TickyFlags
.
tickyFile
=
NULL
;
#endif
#endif
RtsFlags
.
HpcFlags
.
emitTixFile
=
true
;
}
}
static
const
char
*
static
const
char
*
...
@@ -1040,6 +1041,11 @@ error = true;
...
@@ -1040,6 +1041,11 @@ error = true;
RtsFlags
.
GcFlags
.
nonmovingDenseAllocatorCount
=
threshold
;
RtsFlags
.
GcFlags
.
nonmovingDenseAllocatorCount
=
threshold
;
}
}
}
}
else
if
(
strequal
(
"emit-tix-file=false"
,
&
rts_argv
[
arg
][
2
]))
{
OPTION_UNSAFE
;
RtsFlags
.
HpcFlags
.
emitTixFile
=
false
;
}
#if defined(THREADED_RTS)
#if defined(THREADED_RTS)
#if defined(mingw32_HOST_OS)
#if defined(mingw32_HOST_OS)
else
if
(
!
strncmp
(
"io-manager-threads"
,
else
if
(
!
strncmp
(
"io-manager-threads"
,
...
...
This diff is collapsed.
Click to expand it.
rts/include/rts/Flags.h
+
7
−
0
View file @
f1e5245a
...
@@ -281,6 +281,12 @@ typedef struct _PAR_FLAGS {
...
@@ -281,6 +281,12 @@ typedef struct _PAR_FLAGS {
bool
setAffinity
;
/* force thread affinity with CPUs */
bool
setAffinity
;
/* force thread affinity with CPUs */
}
PAR_FLAGS
;
}
PAR_FLAGS
;
/* See Note [Synchronization of flags and base APIs] */
typedef
struct
_HPC_FLAGS
{
bool
emitTixFile
;
/* Whether the RTS should write a tix
file at the end of execution */
}
HPC_FLAGS
;
/* See Note [Synchronization of flags and base APIs] */
/* See Note [Synchronization of flags and base APIs] */
typedef
struct
_TICKY_FLAGS
{
typedef
struct
_TICKY_FLAGS
{
bool
showTickyStats
;
bool
showTickyStats
;
...
@@ -301,6 +307,7 @@ typedef struct _RTS_FLAGS {
...
@@ -301,6 +307,7 @@ typedef struct _RTS_FLAGS {
TRACE_FLAGS
TraceFlags
;
TRACE_FLAGS
TraceFlags
;
TICKY_FLAGS
TickyFlags
;
TICKY_FLAGS
TickyFlags
;
PAR_FLAGS
ParFlags
;
PAR_FLAGS
ParFlags
;
HPC_FLAGS
HpcFlags
;
}
RTS_FLAGS
;
}
RTS_FLAGS
;
#if defined(COMPILING_RTS_MAIN)
#if defined(COMPILING_RTS_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