How to enable FreeRTOS trace facility for ESP32S3?

I want to use uxTaskGetSystemState() function of ESP32S3 in arduino framework and I am using
image

#define CONFIG_FREERTOS_USE_TRACE_FACILITY
#define configUSE_TRACE_FACILITY 1

still error: undefined reference to ‘uxTaskGetSystemState’

I noticed that someone mentioned that it was possible to compile the ESP source code and start the trace facility in Menuconfig, but after compiling the source code, a replaces the native "framework-arduinoespressif32" dependency, But are the menuconfig config config compiled from source and PIO generated dependencies the same? Or which “*.a” files should I replace? :smiling_face_with_tear:
measuring-task-execution-time

This is where I use uxTaskGetSystemState():

void showUserAllTask(void *pvParam)
{
    Stream *stream = (Stream *)pvParam;
    TaskHandle_t *TaskList;
    uint8_t TaskNum = uxTaskGetNumberOfTasks();
    TaskList = (TaskHandle_t *)malloc(TaskNum * sizeof(TaskHandle_t));
    if (TaskList == NULL)
    {
        stream->println("[E][Show Task]TaskList malloc failed.");
        vTaskDelete(NULL);
    }
    else
    {
        TaskNum = uxTaskGetSystemState((TaskStatus_t *)TaskList, TaskNum, NULL);
        stream->printf("**************Task List**************\n");
        stream->println("Ser.\tTaskName\tHandle");
        for (uint8_t i = 0; i < TaskNum; i++)
        {
            stream->printf("%d\t%s\t%p\n", i, pcTaskGetTaskName(TaskList[i]), TaskList[i]);
        }
        stream->printf("[I][Task]TaskNum:%d\n", TaskNum);
        free(TaskList);
    }
    vTaskDelete(NULL);
}