Error in building kernal module

Hi,

I am trying to build a kernel module for profiling application. My source code is trying to access tracepoints_ptr in struct module. But it is not available and throws an error.

“error: struct module has no member named num_tracepoints”

OS:Debian GNU/Linux buster/sid
Kernel: Linux linaro-alip 4.11.0-qcomlt #1 SMP PREEMPT Mon Nov 6 23:24:36 UTC 2017 aarch64 GNU/Linux

How can I fix this issue?

Thanks,
S

you probably missed to enable CONFIG_TRACEPOINTS.

Will the linux headers change if I enable this conf option?

Tx

For userspace programs, no. For kernel modules, yes.

Thanks.

Initially the /usr/src/ folder was empty and I installed the header using the command.

sudo apt-get install linux-headers-$(uname -r)