Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Glasgow Haskell Compiler
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
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
Shayne Fletcher
Glasgow Haskell Compiler
Commits
bd72eeb1
Commit
bd72eeb1
authored
Oct 26, 2011
by
Simon Marlow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix time calculation for retainer profiling
parent
0047d2c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
rts/Stats.c
rts/Stats.c
+11
-3
No files found.
rts/Stats.c
View file @
bd72eeb1
...
...
@@ -89,7 +89,9 @@ Ticks stat_getElapsedTime(void)
double
mut_user_time_until
(
Ticks
t
)
{
return
TICK_TO_DBL
(
t
-
GC_tot_cpu
-
PROF_VAL
(
RP_tot_time
));
return
TICK_TO_DBL
(
t
-
GC_tot_cpu
);
// heapCensus() time is included in GC_tot_cpu, so we don't need
// to subtract it here.
}
double
...
...
@@ -108,13 +110,13 @@ mut_user_time( void )
double
mut_user_time_during_RP
(
void
)
{
return
TICK_TO_DBL
(
RP_start_time
-
GC_tot_cpu
-
RP_tot_time
);
return
TICK_TO_DBL
(
RP_start_time
-
GC_tot_cpu
-
RP_tot_time
);
}
double
mut_user_time_during_heap_census
(
void
)
{
return
TICK_TO_DBL
(
HC_start_time
-
GC_tot_cpu
-
RP_tot_time
);
return
TICK_TO_DBL
(
HC_start_time
-
GC_tot_cpu
-
RP_tot_time
);
}
#endif
/* PROFILING */
...
...
@@ -560,6 +562,12 @@ stat_exit(int alloc)
gc_elapsed
+=
GC_coll_elapsed
[
i
];
}
// heapCensus() is called by the GC, so RP and HC time are
// included in the GC stats. We therefore subtract them to
// obtain the actual GC cpu time. XXX: we aren't doing this
// for elapsed time.
gc_cpu
-=
0
+
PROF_VAL
(
RP_tot_time
+
HC_tot_time
);
init_cpu
=
get_init_cpu
();
init_elapsed
=
get_init_elapsed
();
...
...
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