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 <skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com> Commit-Queue: Mike Klein <mtklein@google.com>
This commit is contained in:
parent
4231401dba
commit
eb17254754
23
third_party/skcms/src/Transform.c
vendored
23
third_party/skcms/src/Transform.c
vendored
@ -22,17 +22,26 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#if defined(__arm__)
|
||||
#include <time.h>
|
||||
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
|
||||
|
2
third_party/skcms/version.sha1
vendored
2
third_party/skcms/version.sha1
vendored
@ -1 +1 @@
|
||||
71966da6705d6e49b518e56bb829708b797b67b9
|
||||
17d4b822a04a12b896fdbdbd6a9ae29ac0d8ccdc
|
Loading…
Reference in New Issue
Block a user