Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drivers don't build with FTRACE enabled #91

Open
NathanTP opened this issue Oct 29, 2019 · 2 comments
Open

Drivers don't build with FTRACE enabled #91

NathanTP opened this issue Oct 29, 2019 · 2 comments

Comments

@NathanTP
Copy link
Contributor

NathanTP commented Oct 29, 2019

Initially brought by [email protected]

We can't seem to build a workload with ftrace enabled.

To reproduce: create a workload with the following in its linux-config kfrag:

CONFIG_FUNCTION_TRACER=y 
CONFIG_FUNCTION_GRAPH_TRACER=y 
# CONFIG_PREEMPTIRQ_EVENTS is not set 
# CONFIG_IRQSOFF_TRACER is not set 
# CONFIG_SCHED_TRACER is not set 
# CONFIG_HWLAT_TRACER is not set 
CONFIG_FTRACE_SYSCALLS=y 
# CONFIG_TRACER_SNAPSHOT is not set 
CONFIG_BRANCH_PROFILE_NONE=y 
# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set 
# CONFIG_PROFILE_ALL_BRANCHES is not set 
CONFIG_STACK_TRACER=y 
# CONFIG_BLK_DEV_IO_TRACE is not set 
CONFIG_UPROBE_EVENTS=y 
CONFIG_DYNAMIC_EVENTS=y 
CONFIG_PROBE_EVENTS=y 
CONFIG_DYNAMIC_FTRACE=y 
CONFIG_DYNAMIC_FTRACE_WITH_REGS=y

Attempt to build the workload once to generate the kconfig:
$ ./marshal build test-workload.json

It will fail. To get a clearer error, try to build a driver directly:

$ cd boards/firechip/drivers/iceblk-driver
$ make LINUXSRC=../../../../riscv-linux/
make -C ../../../../riscv-linux/ ARCH=riscv CROSS_COMPILE=riscv64-unknown-linux-gnu- M=/home/centos/FireMarshal/boards/firechip/drivers/iceblk-driver
make[1]: Entering directory '/home/centos/FireMarshal/riscv-linux'
  Building modules, stage 2.
  MODPOST 1 modules
ERROR: "kmem_cache_alloc_trace" [/home/centos/FireMarshal/boards/firechip/drivers/iceblk-driver/iceblk.ko] undefined!
ERROR: "_mcount" [/home/centos/FireMarshal/boards/firechip/drivers/iceblk-driver/iceblk.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:103: modules-modpost] Error 1
make[1]: *** [Makefile:1628: modules] Error 2
make[1]: Leaving directory '/home/centos/FireMarshal/riscv-linux'
make: *** [Makefile:13: iceblk.ko] Error 2
@NathanTP
Copy link
Contributor Author

@zhemao @a0u any ideas?

@NathanTP
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant