aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com <skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>2018-04-24 14:32:32 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-04-24 14:55:06 +0000
commitb97f28b90399c2571712401a30b0299d37b4b52e (patch)
tree859a91a8f5bf7e10ea8b324f92f3248f9dbe47ab
parentfffa6418966ed24378c4046afc7527841adf2fa4 (diff)
Roll skia/third_party/skcms 6a4194e..5cbdc0a (1 commits)
https://skia.googlesource.com/skcms.git/+log/6a4194e..5cbdc0a 2018-04-24 mtklein@chromium.org build profiling mode into all clang debug builds The AutoRoll server is located here: https://skcms-skia-roll.skia.org Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff, who should be CC'd on the roll, and stop the roller if necessary. TBR=stani@google.com Change-Id: I43af99da817e1850bd4738993c842f077761fd07 Reviewed-on: https://skia-review.googlesource.com/123389 Reviewed-by: skcms-skia-autoroll <skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com> Commit-Queue: skcms-skia-autoroll <skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
-rw-r--r--third_party/skcms/src/Transform.c26
-rwxr-xr-xthird_party/skcms/version.sha12
2 files changed, 17 insertions, 11 deletions
diff --git a/third_party/skcms/src/Transform.c b/third_party/skcms/src/Transform.c
index cb023c3046..9bb1ccda99 100644
--- a/third_party/skcms/src/Transform.c
+++ b/third_party/skcms/src/Transform.c
@@ -16,7 +16,10 @@
#include <stdint.h>
#include <string.h>
-#if defined(SKCMS_PROFILE)
+extern bool g_skcms_dump_profile;
+bool g_skcms_dump_profile = false;
+
+#if !defined(NDEBUG) && defined(__clang__)
// Basic profiling tools to time each Op. Not at all thread safe.
#include <stdio.h>
@@ -48,21 +51,24 @@
}
static Op profile_next_op(Op op) {
- static uint64_t start = 0;
- static uint64_t* current = NULL;
+ if (g_skcms_dump_profile) {
+ static uint64_t start = 0;
+ static uint64_t* current = NULL;
+
+ if (!current) {
+ atexit(profile_dump_stats);
+ } else {
+ *current += now() - start;
+ }
- if (!current) {
- atexit(profile_dump_stats);
- } else {
- *current += now() - start;
+ current = &counts[op];
+ start = now();
}
-
- current = &counts[op];
- start = now();
return op;
}
#else
static inline Op profile_next_op(Op op) {
+ (void)g_skcms_dump_profile;
return op;
}
#endif
diff --git a/third_party/skcms/version.sha1 b/third_party/skcms/version.sha1
index 64381c08a2..8877d580b8 100755
--- a/third_party/skcms/version.sha1
+++ b/third_party/skcms/version.sha1
@@ -1 +1 @@
-6a4194ed7d6fc920745f114e568d0fcdf021c0bc \ No newline at end of file
+5cbdc0acf72bc4031f409516fbeb50e254ba638b \ No newline at end of file