Skip to content

Commit 4724680

Browse files
author
zhangjipeng
committed
fix(test): fix performance test workflow use system malloc
Signed-off-by: zhangjipeng <zhangjipeng@xiaomi.com>
1 parent 52d7c88 commit 4724680

2 files changed

Lines changed: 1 addition & 24 deletions

File tree

.github/workflows/performance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
run: >
2626
cmake -B ${{ github.workspace }}/build
2727
-DCMAKE_BUILD_TYPE=Release
28-
-DOPT_SYSTEM_MALLOC=OFF
28+
-DOPT_SYSTEM_MALLOC=ON
2929
-DOPT_PERFTEST=ON
3030
-DOPT_FAST_COPY=OFF
3131
-DOPT_INTERNAL_FREETYPE=ON

perf_tests/test.cpp

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -88,30 +88,8 @@ static void set_cpu_affinity(void)
8888
#endif
8989
}
9090

91-
static void* _tracker_malloc(size_t size)
92-
{
93-
return malloc(size);
94-
}
95-
96-
static void _tracker_free(void* ptr)
97-
{
98-
free(ptr);
99-
}
100-
101-
static void* _tracker_calloc(size_t num, size_t size)
102-
{
103-
return _tracker_malloc(num * size);
104-
}
105-
10691
void PS_Init()
10792
{
108-
ps_memory_funcs funcs;
109-
funcs.mem_malloc = _tracker_malloc;
110-
funcs.mem_calloc = _tracker_calloc;
111-
funcs.mem_free = _tracker_free;
112-
113-
ASSERT_NE(False, ps_set_memory_functions(&funcs));
114-
11593
printf("picasso initialize\n");
11694
ASSERT_NE(False, ps_initialize());
11795

@@ -123,7 +101,6 @@ void PS_Shutdown()
123101
{
124102
printf("picasso shutdown\n");
125103
ps_shutdown();
126-
ASSERT_EQ(STATUS_SUCCEED, ps_last_status());
127104
}
128105

129106
bool PerformanceTest::LoadBaseline(const std::string& file_name, BenchmarkData& data)

0 commit comments

Comments
 (0)