Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Side by Side Diff: tools/ThermalManager.cpp

Issue 2343233002: Is it just me or is this logging just noise? (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "ThermalManager.h" 8 #include "ThermalManager.h"
9 9
10 #include "SkOSFile.h" 10 #include "SkOSFile.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 int32_t threshold) 90 int32_t threshold)
91 : fThermalZoneRoot(thermalZoneRoot) 91 : fThermalZoneRoot(thermalZoneRoot)
92 , fPointName(pointName) { 92 , fPointName(pointName) {
93 SkString fullPath(thermalZoneRoot); 93 SkString fullPath(thermalZoneRoot);
94 fullPath.appendf("/%s", pointName.c_str()); 94 fullPath.appendf("/%s", pointName.c_str());
95 fPoint = OpenFileAndReadInt32(fullPath.c_str()); 95 fPoint = OpenFileAndReadInt32(fullPath.c_str());
96 fBase = GetTemp(fThermalZoneRoot); 96 fBase = GetTemp(fThermalZoneRoot);
97 fThreshold = threshold; 97 fThreshold = threshold;
98 fDisabled = fBase + fThreshold >= fPoint; // We disable any trip point whic h start off 98 fDisabled = fBase + fThreshold >= fPoint; // We disable any trip point whic h start off
99 // triggered 99 // triggered
100 if (!fDisabled) {
101 SkDebugf("Trip point %s base - %d trip point-%d\n", fullPath.c_str(),
102 fBase, fPoint);
103 }
104 } 100 }
105 101
106 bool ThermalManager::TripPoint::willTrip() { 102 bool ThermalManager::TripPoint::willTrip() {
107 int32_t currentTemp = GetTemp(fThermalZoneRoot); 103 int32_t currentTemp = GetTemp(fThermalZoneRoot);
108 bool wouldTrip = !fDisabled && currentTemp + fThreshold >= fPoint; 104 bool wouldTrip = !fDisabled && currentTemp + fThreshold >= fPoint;
109 105
110 if (wouldTrip) { 106 if (wouldTrip) {
111 SkDebugf("%s/%s would trip {%d,%d,%d,%d}\n", fThermalZoneRoot.c_str(), 107 SkDebugf("%s/%s would trip {%d,%d,%d,%d}\n", fThermalZoneRoot.c_str(),
112 fPointName.c_str(), fBase, currentTemp, fPoint, fThreshold); 108 fPointName.c_str(), fBase, currentTemp, fPoint, fThreshold);
113 } 109 }
114 return wouldTrip; 110 return wouldTrip;
115 } 111 }
116 112
117 #endif 113 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698