Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
4,322
Issues
4,322
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
362
Merge Requests
362
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
986ac01d
Commit
986ac01d
authored
Nov 23, 2001
by
simonmar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[project @ 2001-11-23 10:27:58 by simonmar]
Fix compilation problems with Stats.c in the !DEBUG case.
parent
9469779a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
9 deletions
+28
-9
ghc/rts/Stats.c
ghc/rts/Stats.c
+22
-5
ghc/rts/Stats.h
ghc/rts/Stats.h
+6
-4
No files found.
ghc/rts/Stats.c
View file @
986ac01d
/* -----------------------------------------------------------------------------
* $Id: Stats.c,v 1.3
6 2001/11/22 14:25:12
simonmar Exp $
* $Id: Stats.c,v 1.3
7 2001/11/23 10:27:58
simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
...
...
@@ -229,6 +229,7 @@ mut_user_time( void )
return
TICK_TO_DBL
(
CurrentUserTime
-
GC_tot_time
-
RP_tot_time
-
LDV_tot_time
);
}
#ifdef PROFILING
/*
mut_user_time_during_RP() is similar to mut_user_time_during_GC();
it returns the MUT time during retainer profiling.
...
...
@@ -245,6 +246,7 @@ mut_user_time_during_LDV( void )
{
return
TICK_TO_DBL
(
LDV_start_time
-
GC_tot_time
-
RP_tot_time
-
LDV_tot_time
);
}
#endif // PROFILING
static
nat
pageFaults
(
void
)
...
...
@@ -497,17 +499,23 @@ stat_endGC(lnat alloc, lnat collect, lnat live, lnat copied, lnat gen)
/* -----------------------------------------------------------------------------
Called at the beginning of each Retainer Profiliing
-------------------------------------------------------------------------- */
void
stat_startRP
(
void
)
#ifdef PROFILING
void
stat_startRP
(
void
)
{
getTimes
();
RP_start_time
=
CurrentUserTime
;
RPe_start_time
=
CurrentElapsedTime
;
}
#endif // PROFILING
/* -----------------------------------------------------------------------------
Called at the end of each Retainer Profiliing
-------------------------------------------------------------------------- */
void
stat_endRP
(
#ifdef PROFILING
void
stat_endRP
(
nat
retainerGeneration
,
#ifdef DEBUG_RETAINER
nat
maxCStackSize
,
...
...
@@ -531,26 +539,33 @@ void stat_endRP(
fprintf
(
prof_file
,
"
\t
Current total costs in bytes = %u
\n
"
,
allCost
*
sizeof
(
StgWord
));
fprintf
(
prof_file
,
"
\t
Number of retainer sets = %u
\n\n
"
,
numSet
);
}
#endif // PROFILING
/* -----------------------------------------------------------------------------
Called at the beginning of each LDV Profiliing
-------------------------------------------------------------------------- */
void
stat_startLDV
(
void
)
#ifdef PROFILING
void
stat_startLDV
(
void
)
{
getTimes
();
LDV_start_time
=
CurrentUserTime
;
LDVe_start_time
=
CurrentElapsedTime
;
}
#endif // PROFILING
/* -----------------------------------------------------------------------------
Called at the end of each LDV Profiliing
-------------------------------------------------------------------------- */
void
stat_endLDV
(
void
)
#ifdef PROFILING
void
stat_endLDV
(
void
)
{
getTimes
();
LDV_tot_time
+=
CurrentUserTime
-
LDV_start_time
;
LDVe_tot_time
+=
CurrentElapsedTime
-
LDVe_start_time
;
}
#endif // PROFILING
/* -----------------------------------------------------------------------------
stat_workerStop
...
...
@@ -737,6 +752,7 @@ stat_exit(int alloc)
Produce some detailed info on the state of the generational GC.
-------------------------------------------------------------------------- */
#ifdef DEBUG
void
statDescribeGens
(
void
)
{
...
...
@@ -779,6 +795,7 @@ statDescribeGens(void)
}
fprintf
(
stderr
,
"
\n
"
);
}
#endif
/* -----------------------------------------------------------------------------
Stats available via a programmatic interface, so eg. GHCi can time
...
...
ghc/rts/Stats.h
View file @
986ac01d
/* -----------------------------------------------------------------------------
* $Id: Stats.h,v 1.1
2 2001/11/22 14:25:12
simonmar Exp $
* $Id: Stats.h,v 1.1
3 2001/11/23 10:27:58
simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
...
...
@@ -14,6 +14,7 @@ extern void stat_startGC(void);
extern
void
stat_endGC
(
lnat
alloc
,
lnat
collect
,
lnat
live
,
lnat
copied
,
lnat
gen
);
#ifdef PROFILING
extern
void
stat_startRP
(
void
);
extern
void
stat_endRP
(
nat
,
#ifdef DEBUG_RETAINER
...
...
@@ -23,6 +24,7 @@ extern void stat_endRP(nat,
extern
void
stat_startLDV
(
void
);
extern
void
stat_endLDV
(
void
);
#endif // PROFILING
extern
void
stat_startExit
(
void
);
extern
void
stat_endExit
(
void
);
...
...
@@ -33,12 +35,12 @@ extern void stat_workerStop(void);
extern
void
initStats
(
void
);
extern
double
mut_user_time_during_GC
(
void
);
extern
double
mut_user_time
(
void
);
#ifdef PROFILING
// @retainer profiling
extern
double
mut_user_time_during_RP
(
void
);
extern
double
mut_user_time_during_LDV
(
void
);
#endif
extern
double
mut_user_time
(
void
);
#endif // PROFILING
extern
void
statDescribeGens
(
void
);
extern
HsInt
getAllocations
(
void
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment