mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
7f5edaf090
ready to check where enable the mark_sweep auto gc with threshold failed, add some assert more assert about obj alive, dict mark not correct add pikaGC_try, but cannot run at any time markSweep crashed on keyword save gcRoot for obj to debug add debug point add kernal_debug config to keep more debug info use @res_<opt> to mark operation found self reference on __iter__() can not fix gc err around iter remove lock, only keep the self lock more obj info for debug only pikaui not pass only pikaui not pass
36 lines
890 B
C
36 lines
890 B
C
#include "test_common.h"
|
|
|
|
extern "C" {
|
|
#include "dataMemory.h"
|
|
#include "pika_config_gtest.h"
|
|
}
|
|
|
|
extern "C" {
|
|
void test_purec(void);
|
|
}
|
|
|
|
int main(int argc, char** argv) {
|
|
int res = 0;
|
|
#if USE_GOOGLE_TEST
|
|
::testing::InitGoogleTest(&argc, argv);
|
|
res = RUN_ALL_TESTS();
|
|
#else
|
|
test_purec();
|
|
#endif
|
|
mem_pool_deinit();
|
|
#if PIKA_ARG_CACHE_ENABLE
|
|
extern PikaMemInfo g_PikaMemInfo;
|
|
#if PIKA_GC_MARK_SWEEP_ENABLE
|
|
extern PikaObjState g_PikaObjState;
|
|
printf("[ GC]: object num max: %d, last GC: %d\r\n",
|
|
g_PikaObjState.objCntMax, g_PikaObjState.objCntLastGC);
|
|
#endif
|
|
printf("[ Info]: alloc times: %d, cached times: %d (%0.2f%%)\r\n",
|
|
g_PikaMemInfo.alloc_times, g_PikaMemInfo.alloc_times_cache,
|
|
((float)g_PikaMemInfo.alloc_times_cache /
|
|
(float)g_PikaMemInfo.alloc_times) *
|
|
100.0);
|
|
#endif
|
|
return res;
|
|
}
|