fixed typo that resulted in negative fix values
Costa Tsaousis (ktsaou) committed
Jul 9, 2016 at 06:26 UTC
9f523e3ead3f060e3a0c977bb7077b0361196749
1 file changed
+6
-2
src/apps_plugin.c
+6
-2
@@ -2267,8 +2267,10 @@ void normalize_data(struct target *root) {
2267
2268
if(utime_fix_ratio > 1.0) utime_fix_ratio = 1.0;
2269
if(cutime_fix_ratio > 1.0) cutime_fix_ratio = 1.0;
2270
+ // if(utime_fix_ratio < 0.0) utime_fix_ratio = 0.0;
2271
+ // if(cutime_fix_ratio < 0.0) cutime_fix_ratio = 0.0;
2272
2271
- if(global_utime && utime) {
2273
+ if(global_stime && stime) {
2274
if(global_stime > stime + cstime) {
2275
// everything we collected is short
2276
cstime_fix_ratio =
@@ -2290,8 +2292,10 @@ void normalize_data(struct target *root) {
2292
stime_fix_ratio = 0.0;
2293
}
2294
2293
- if(stime_fix_ratio > 1.0) stime_fix_ratio = 1.0;
2295
+ if(stime_fix_ratio > 1.0) stime_fix_ratio = 1.0;
2296
if(cstime_fix_ratio > 1.0) cstime_fix_ratio = 1.0;
2297
+ // if(stime_fix_ratio < 0.0) stime_fix_ratio = 0.0;
2298
+ // if(cstime_fix_ratio < 0.0) cstime_fix_ratio = 0.0;
2299
2300
// FIXME
2301
// we use cpu time to normalize page faults