summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaekyun Kim <tkq.kim@samsung.com>2011-09-19 20:37:02 +0900
committerTaekyun Kim <tkq.kim@samsung.com>2011-11-22 15:07:31 +0900
commit09ed1275356e1474242d20e11f6d0e0cb5f958a0 (patch)
tree36393cb43e230c297392611c106bdec21036a766
parent2a0dc9a95c45a073b234eccc4fef38ad5c82782c (diff)
perfstat: Gather performance data from pixman_blt()perfstat
-rw-r--r--pixman/pixman-arm-neon.c12
-rw-r--r--pixman/pixman-mmx.c12
-rw-r--r--pixman/pixman-sse2.c12
3 files changed, 36 insertions, 0 deletions
diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c
index 3d91860..b603418 100644
--- a/pixman/pixman-arm-neon.c
+++ b/pixman/pixman-arm-neon.c
@@ -437,6 +437,11 @@ arm_neon_blt (pixman_implementation_t *imp,
int width,
int height)
{
+ double t0 = 0.0, t1 = 0.0;
+
+ if (perfstat_is_enabled ())
+ t0 = perfstat_get_time ();
+
if (!pixman_blt_neon (
src_bits, dst_bits, src_stride, dst_stride, src_bpp, dst_bpp,
src_x, src_y, dest_x, dest_y, width, height))
@@ -448,6 +453,13 @@ arm_neon_blt (pixman_implementation_t *imp,
src_x, src_y, dest_x, dest_y, width, height);
}
+ if (perfstat_is_enabled ())
+ {
+ t1 = perfstat_get_time ();
+ perfstat_add_blt (PIXMAN_IMPLEMENTATION_ARM_NEON,
+ src_bpp, dst_bpp, width, height, t1 - t0);
+ }
+
return TRUE;
}
diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c
index da3a395..536feb6 100644
--- a/pixman/pixman-mmx.c
+++ b/pixman/pixman-mmx.c
@@ -3165,6 +3165,11 @@ mmx_blt (pixman_implementation_t *imp,
int width,
int height)
{
+ double t0 = 0.0, t1 = 0.0;
+
+ if (perfstat_is_enabled ())
+ t0 = perfstat_get_time ();
+
if (!pixman_blt_mmx (
src_bits, dst_bits, src_stride, dst_stride, src_bpp, dst_bpp,
src_x, src_y, dest_x, dest_y, width, height))
@@ -3176,6 +3181,13 @@ mmx_blt (pixman_implementation_t *imp,
src_x, src_y, dest_x, dest_y, width, height);
}
+ if (perfstat_is_enabled ())
+ {
+ t1 = perfstat_get_time ();
+ perfstat_add_blt (PIXMAN_IMPLEMENTATION_MMX,
+ src_bpp, dst_bpp, width, height, t1 - t0);
+ }
+
return TRUE;
}
diff --git a/pixman/pixman-sse2.c b/pixman/pixman-sse2.c
index 62bd7be..970a0fc 100644
--- a/pixman/pixman-sse2.c
+++ b/pixman/pixman-sse2.c
@@ -5793,6 +5793,11 @@ sse2_blt (pixman_implementation_t *imp,
int width,
int height)
{
+ double t0 = 0.0, t1 = 0.0;
+
+ if (perfstat_is_enabled ())
+ t0 = perfstat_get_time ();
+
if (!pixman_blt_sse2 (
src_bits, dst_bits, src_stride, dst_stride, src_bpp, dst_bpp,
src_x, src_y, dest_x, dest_y, width, height))
@@ -5804,6 +5809,13 @@ sse2_blt (pixman_implementation_t *imp,
src_x, src_y, dest_x, dest_y, width, height);
}
+ if (perfstat_is_enabled ())
+ {
+ t1 = perfstat_get_time ();
+ perfstat_add_blt (PIXMAN_IMPLEMENTATION_SSE2,
+ src_bpp, dst_bpp, width, height, t1 - t0);
+ }
+
return TRUE;
}