OSDN Git Service
(root)
/
android-x86
/
art.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b652da7
)
Limit profman log spam with time threshold
author
David Sehr
<sehr@google.com>
Thu, 5 May 2016 16:02:38 +0000
(09:02 -0700)
committer
David Sehr
<sehr@google.com>
Thu, 5 May 2016 20:17:52 +0000
(13:17 -0700)
Bug:
28599906
Change-Id: Ibe1001da94c7916761c8f3b4b5dbacd8cf3809a7
(cherry picked from commit
305ed710a8ea732e59bdc782121dea3389adc357
)
profman/profman.cc
patch
|
blob
|
history
diff --git
a/profman/profman.cc
b/profman/profman.cc
index
3e632bc
..
0febf63
100644
(file)
--- a/
profman/profman.cc
+++ b/
profman/profman.cc
@@
-216,7
+216,10
@@
class ProfMan FINAL {
}
void LogCompletionTime() {
- LOG(INFO) << "profman took " << PrettyDuration(NanoTime() - start_ns_);
+ static constexpr uint64_t kLogThresholdTime = MsToNs(100); // 100ms
+ uint64_t time_taken = NanoTime() - start_ns_;
+ if (time_taken > kLogThresholdTime)
+ LOG(WARNING) << "profman took " << PrettyDuration(NanoTime() - start_ns_);
}
std::vector<std::string> profile_files_;