summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaekyun Kim <tkq.kim@samsung.com>2011-09-19 20:30:16 +0900
committerTaekyun Kim <tkq.kim@samsung.com>2011-11-22 15:07:29 +0900
commit2a0dc9a95c45a073b234eccc4fef38ad5c82782c (patch)
tree87336ca3875b1c3165e9c7f391c60467027f3673
parent197b70e4575d0f310c0ac735676be64358ff8053 (diff)
perfstat: Gather performance data from pixman_fill()
-rw-r--r--pixman/pixman-arm-neon.c22
-rw-r--r--pixman/pixman-fast-path.c12
-rw-r--r--pixman/pixman-mmx.c12
-rw-r--r--pixman/pixman-sse2.c12
4 files changed, 54 insertions, 4 deletions
diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c
index a0b309b..3d91860 100644
--- a/pixman/pixman-arm-neon.c
+++ b/pixman/pixman-arm-neon.c
@@ -462,11 +462,25 @@ arm_neon_fill (pixman_implementation_t *imp,
int height,
uint32_t xor)
{
- if (pixman_fill_neon (bits, stride, bpp, x, y, width, height, xor))
- return TRUE;
+ double t0 = 0.0, t1 = 0.0;
+
+ if (perfstat_is_enabled ())
+ t0 = perfstat_get_time ();
+
+ if (!pixman_fill_neon (bits, stride, bpp, x, y, width, height, xor))
+ {
+ return _pixman_implementation_fill (
+ imp->delegate, bits, stride, bpp, x, y, width, height, xor);
+ }
- return _pixman_implementation_fill (
- imp->delegate, bits, stride, bpp, x, y, width, height, xor);
+ if (perfstat_is_enabled ())
+ {
+ t1 = perfstat_get_time ();
+ perfstat_add_fill (PIXMAN_IMPLEMENTATION_ARM_NEON,
+ bpp, width, height, t1 - t0);
+ }
+
+ return TRUE;
}
#define BIND_COMBINE_U(name) \
diff --git a/pixman/pixman-fast-path.c b/pixman/pixman-fast-path.c
index 3dc41f1..92faf35 100644
--- a/pixman/pixman-fast-path.c
+++ b/pixman/pixman-fast-path.c
@@ -2160,12 +2160,24 @@ fast_path_fill (pixman_implementation_t *imp,
int height,
uint32_t xor)
{
+ double t0 = 0.0, t1 = 0.0;
+
+ if (perfstat_is_enabled ())
+ t0 = perfstat_get_time ();
+
if (!pixman_fill_fast_path (bits, stride, bpp, x, y, width, height, xor))
{
return _pixman_implementation_fill (
imp->delegate, bits, stride, bpp, x, y, width, height, xor);
}
+ if (perfstat_is_enabled ())
+ {
+ t1 = perfstat_get_time ();
+ perfstat_add_fill (PIXMAN_IMPLEMENTATION_C_FAST_PATH,
+ bpp, width, height, t1 - t0);
+ }
+
return TRUE;
}
diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c
index df3bb76..da3a395 100644
--- a/pixman/pixman-mmx.c
+++ b/pixman/pixman-mmx.c
@@ -3190,12 +3190,24 @@ mmx_fill (pixman_implementation_t *imp,
int height,
uint32_t xor)
{
+ double t0 = 0.0, t1 = 0.0;
+
+ if (perfstat_is_enabled ())
+ t0 = perfstat_get_time ();
+
if (!pixman_fill_mmx (bits, stride, bpp, x, y, width, height, xor))
{
return _pixman_implementation_fill (
imp->delegate, bits, stride, bpp, x, y, width, height, xor);
}
+ if (perfstat_is_enabled ())
+ {
+ t1 = perfstat_get_time ();
+ perfstat_add_fill (PIXMAN_IMPLEMENTATION_MMX,
+ bpp, width, height, t1 - t0);
+ }
+
return TRUE;
}
diff --git a/pixman/pixman-sse2.c b/pixman/pixman-sse2.c
index e4fc080..62bd7be 100644
--- a/pixman/pixman-sse2.c
+++ b/pixman/pixman-sse2.c
@@ -5821,12 +5821,24 @@ sse2_fill (pixman_implementation_t *imp,
int height,
uint32_t xor)
{
+ double t0 = 0.0, t1 = 0.0;
+
+ if (perfstat_is_enabled ())
+ t0 = perfstat_get_time ();
+
if (!pixman_fill_sse2 (bits, stride, bpp, x, y, width, height, xor))
{
return _pixman_implementation_fill (
imp->delegate, bits, stride, bpp, x, y, width, height, xor);
}
+ if (perfstat_is_enabled ())
+ {
+ t1 = perfstat_get_time ();
+ perfstat_add_fill (PIXMAN_IMPLEMENTATION_SSE2,
+ bpp, width, height, t1 - t0);
+ }
+
return TRUE;
}