From 24635750839f2cdfcbf758a4fd0ec80d617f5957 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Tue, 14 Feb 2017 12:29:07 +0100 Subject: [PATCH] Print profiler header and footer. --- libfreerdp/primitives/test/TestPrimitivesColors.c | 2 ++ libfreerdp/primitives/test/TestPrimitivesYCbCr.c | 2 ++ libfreerdp/primitives/test/TestPrimitivesYCoCg.c | 2 ++ libfreerdp/primitives/test/TestPrimitivesYUV.c | 12 ++++++++++++ 4 files changed, 18 insertions(+) diff --git a/libfreerdp/primitives/test/TestPrimitivesColors.c b/libfreerdp/primitives/test/TestPrimitivesColors.c index fc375c00c..820ea8603 100644 --- a/libfreerdp/primitives/test/TestPrimitivesColors.c +++ b/libfreerdp/primitives/test/TestPrimitivesColors.c @@ -103,8 +103,10 @@ static BOOL test_RGBToRGB_16s8u_P3AC4R_func(prim_size_t roi, DWORD DstFormat) } printf("Results for %lux%lu [%s]", roi.width, roi.height, GetColorFormatName(DstFormat)); + PROFILER_PRINT_HEADER; PROFILER_PRINT(genericProf); PROFILER_PRINT(optProf); + PROFILER_PRINT_FOOTER; fail: PROFILER_FREE(genericProf); PROFILER_FREE(optProf); diff --git a/libfreerdp/primitives/test/TestPrimitivesYCbCr.c b/libfreerdp/primitives/test/TestPrimitivesYCbCr.c index 2abf87485..4a68b6eac 100644 --- a/libfreerdp/primitives/test/TestPrimitivesYCbCr.c +++ b/libfreerdp/primitives/test/TestPrimitivesYCbCr.c @@ -2238,7 +2238,9 @@ static int test_PrimitivesYCbCr(const primitives_t* prims, UINT32 format, prim_s printf("B: diff: %d (%f%%)\n", cnt[0], err[0]); } + PROFILER_PRINT_HEADER; PROFILER_PRINT(prof); + PROFILER_PRINT_FOOTER; fail: _aligned_free(actual); PROFILER_FREE(prof); diff --git a/libfreerdp/primitives/test/TestPrimitivesYCoCg.c b/libfreerdp/primitives/test/TestPrimitivesYCoCg.c index 24371fbb0..8239e95dd 100644 --- a/libfreerdp/primitives/test/TestPrimitivesYCoCg.c +++ b/libfreerdp/primitives/test/TestPrimitivesYCoCg.c @@ -95,8 +95,10 @@ static BOOL test_YCoCgRToRGB_8u_AC4R_func(UINT32 width, UINT32 height) } } + PROFILER_PRINT_HEADER; PROFILER_PRINT(genericProf); PROFILER_PRINT(optProf); + PROFILER_PRINT_FOOTER; } fail: diff --git a/libfreerdp/primitives/test/TestPrimitivesYUV.c b/libfreerdp/primitives/test/TestPrimitivesYUV.c index 1b798935a..9c0309f02 100644 --- a/libfreerdp/primitives/test/TestPrimitivesYUV.c +++ b/libfreerdp/primitives/test/TestPrimitivesYUV.c @@ -254,7 +254,9 @@ static BOOL TestPrimitiveYUVCombine(primitives_t* prims, prim_size_t roi) } PROFILER_EXIT(yuvCombine); + PROFILER_PRINT_HEADER; PROFILER_PRINT(yuvCombine); + PROFILER_PRINT_FOOTER; for (x = 0; x < 3; x++) { @@ -282,7 +284,9 @@ static BOOL TestPrimitiveYUVCombine(primitives_t* prims, prim_size_t roi) } PROFILER_EXIT(yuvSplit); + PROFILER_PRINT_HEADER; PROFILER_PRINT(yuvSplit); + PROFILER_PRINT_FOOTER; for (x = 0; x < 3; x++) { @@ -468,7 +472,9 @@ static BOOL TestPrimitiveYUV(primitives_t* prims, prim_size_t roi, BOOL use444) } PROFILER_EXIT(rgbToYUV444); + PROFILER_PRINT_HEADER; PROFILER_PRINT(rgbToYUV444); + PROFILER_PRINT_FOOTER; } else { @@ -483,7 +489,9 @@ static BOOL TestPrimitiveYUV(primitives_t* prims, prim_size_t roi, BOOL use444) } PROFILER_EXIT(rgbToYUV420); + PROFILER_PRINT_HEADER; PROFILER_PRINT(rgbToYUV420); + PROFILER_PRINT_FOOTER; } if (!check_padding(rgb, size * sizeof(UINT32), padding, "rgb")) @@ -507,7 +515,9 @@ static BOOL TestPrimitiveYUV(primitives_t* prims, prim_size_t roi, BOOL use444) } PROFILER_EXIT(yuv444ToRGB); + PROFILER_PRINT_HEADER; PROFILER_PRINT(yuv444ToRGB); + PROFILER_PRINT_FOOTER; } else { @@ -521,7 +531,9 @@ static BOOL TestPrimitiveYUV(primitives_t* prims, prim_size_t roi, BOOL use444) } PROFILER_EXIT(yuv420ToRGB); + PROFILER_PRINT_HEADER; PROFILER_PRINT(yuv420ToRGB); + PROFILER_PRINT_FOOTER; } if (!check_padding(rgb_dst, size * sizeof(UINT32), padding, "rgb dst"))