Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
847cde73
Commit
847cde73
authored
Jan 06, 2012
by
Simon Marlow
Browse files
refactoring
parent
a6969bf9
Changes
1
Hide whitespace changes
Inline
Side-by-side
rts/Stats.c
View file @
847cde73
...
...
@@ -566,7 +566,8 @@ stat_exit(int alloc)
// 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
);
gc_cpu
-=
0
+
PROF_VAL
(
RP_tot_time
+
HC_tot_time
);
gc_elapsed
-=
0
+
PROF_VAL
(
RPe_tot_time
+
HCe_tot_time
);
init_cpu
=
get_init_cpu
();
init_elapsed
=
get_init_elapsed
();
...
...
@@ -691,24 +692,23 @@ stat_exit(int alloc)
TimeToSecondsDbl
(
gc_elapsed
)
*
100
/
TimeToSecondsDbl
(
tot_elapsed
));
#endif
if
(
tot_cpu
-
GC_tot_cpu
-
PROF_VAL
(
RP_tot_time
+
HC_tot_time
)
==
0
)
if
(
mut_cpu
==
0
)
{
showStgWord64
(
0
,
temp
,
rtsTrue
/*commas*/
);
else
}
else
{
showStgWord64
(
(
StgWord64
)((
GC_tot_alloc
*
sizeof
(
W_
))
/
TimeToSecondsDbl
(
tot_cpu
-
GC_tot_cpu
-
PROF_VAL
(
RP_tot_time
+
HC_tot_time
))),
temp
,
rtsTrue
/*commas*/
);
(
StgWord64
)((
GC_tot_alloc
*
sizeof
(
W_
))
/
TimeToSecondsDbl
(
mut_cpu
)),
temp
,
rtsTrue
/*commas*/
);
}
statsPrintf
(
" Alloc rate %s bytes per MUT second
\n\n
"
,
temp
);
statsPrintf
(
" Productivity %5.1f%% of total user, %.1f%% of total elapsed
\n\n
"
,
TimeToSecondsDbl
(
tot_cpu
-
GC_tot
_cpu
-
TimeToSecondsDbl
(
tot_cpu
-
gc
_cpu
-
PROF_VAL
(
RP_tot_time
+
HC_tot_time
)
-
init_cpu
)
*
100
/
TimeToSecondsDbl
(
tot_cpu
),
TimeToSecondsDbl
(
tot_cpu
-
GC_tot
_cpu
-
PROF_VAL
(
RP_tot_time
+
HC_tot_time
)
-
init_cpu
)
*
100
/
TimeToSecondsDbl
(
tot_elapsed
));
TimeToSecondsDbl
(
tot_cpu
-
gc
_cpu
-
PROF_VAL
(
RP_tot_time
+
HC_tot_time
)
-
init_cpu
)
*
100
/
TimeToSecondsDbl
(
tot_elapsed
));
/*
TICK_PRINT(1);
...
...
Write
Preview
Supports
Markdown
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