linux/kernel/kallsyms_selftest.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Test the function and performance of kallsyms
 *
 * Copyright (C) Huawei Technologies Co., Ltd., 2022
 *
 * Authors: Zhen Lei <[email protected]> Huawei
 */

#define pr_fmt(fmt)

#include <linux/init.h>
#include <linux/module.h>
#include <linux/kallsyms.h>
#include <linux/random.h>
#include <linux/sched/clock.h>
#include <linux/kthread.h>
#include <linux/vmalloc.h>

#include "kallsyms_internal.h"
#include "kallsyms_selftest.h"


#define MAX_NUM_OF_RECORDS

struct test_stat {};

struct test_item {};

#define ITEM_FUNC(s)

#define ITEM_DATA(s)


static int kallsyms_test_var_bss_static;
static int kallsyms_test_var_data_static =;
int kallsyms_test_var_bss;
int kallsyms_test_var_data =;

static int kallsyms_test_func_static(void)
{}

int kallsyms_test_func(void)
{}

__weak int kallsyms_test_func_weak(void)
{}

static struct test_item test_items[] =;

static char stub_name[KSYM_NAME_LEN];

static int stat_symbol_len(void *data, const char *name, unsigned long addr)
{}

static void test_kallsyms_compression_ratio(void)
{}

static int lookup_name(void *data, const char *name, unsigned long addr)
{}

static void test_perf_kallsyms_lookup_name(void)
{}

static bool match_cleanup_name(const char *s, const char *name)
{}

static int find_symbol(void *data, const char *name, unsigned long addr)
{}

static void test_perf_kallsyms_on_each_symbol(void)
{}

static int match_symbol(void *data, unsigned long addr)
{}

static void test_perf_kallsyms_on_each_match_symbol(void)
{}

static int test_kallsyms_basic_function(void)
{}

static int test_entry(void *p)
{}

static int __init kallsyms_test_init(void)
{}
late_initcall(kallsyms_test_init);