From eb17254754255753ba37518190a93677290f84bf Mon Sep 17 00:00:00 2001 From: "skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com" Date: Mon, 23 Apr 2018 15:41:39 +0000 Subject: [PATCH] Roll skia/third_party/skcms 71966da..17d4b82 (1 commits) https://skia.googlesource.com/skcms.git/+log/71966da..17d4b82 2018-04-23 mtklein@chromium.org SKCMS_PROFILE support on ARMv7 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: I342ffdfcbd1c4588f031f574d7fef939b51abd3b Reviewed-on: https://skia-review.googlesource.com/122989 Reviewed-by: skcms-skia-autoroll Commit-Queue: Mike Klein --- third_party/skcms/src/Transform.c | 23 ++++++++++++++++------- third_party/skcms/version.sha1 | 2 +- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/third_party/skcms/src/Transform.c b/third_party/skcms/src/Transform.c index 204bb9f1b7..4edff05d43 100644 --- a/third_party/skcms/src/Transform.c +++ b/third_party/skcms/src/Transform.c @@ -22,17 +22,26 @@ #include #include + #if defined(__arm__) + #include + static const char* now_units = "ticks"; + static uint64_t now() { return (uint64_t)clock(); } + #else + static const char* now_units = "cycles"; + static uint64_t now() { return __builtin_readcyclecounter(); } + #endif + #define M(op) +1 - static uint64_t cycles[FOREACH_Op(M)]; + static uint64_t counts[FOREACH_Op(M)]; #undef M static void profile_dump_stats() { #define M(op) #op, static const char* names[] = { FOREACH_Op(M) }; #undef M - for (int i = 0; i < ARRAY_COUNT(cycles); i++) { - if (cycles[i]) { - fprintf(stderr, "%16s: %12llu cycles\n", names[i], cycles[i]); + for (int i = 0; i < ARRAY_COUNT(counts); i++) { + if (counts[i]) { + fprintf(stderr, "%16s: %12llu %s\n", names[i], counts[i], now_units); } } } @@ -44,11 +53,11 @@ if (!current) { atexit(profile_dump_stats); } else { - *current += __builtin_readcyclecounter() - start; + *current += now() - start; } - current = &cycles[op]; - start = __builtin_readcyclecounter(); + current = &counts[op]; + start = now(); return op; } #else diff --git a/third_party/skcms/version.sha1 b/third_party/skcms/version.sha1 index eb875605a8..350e5edb85 100755 --- a/third_party/skcms/version.sha1 +++ b/third_party/skcms/version.sha1 @@ -1 +1 @@ -71966da6705d6e49b518e56bb829708b797b67b9 \ No newline at end of file +17d4b822a04a12b896fdbdbd6a9ae29ac0d8ccdc \ No newline at end of file