firesim / FireMarshal

Software workload management tool for RISC-V based SoC research. This is the default workload management tool for Chipyard and FireSim.
https://docs.fires.im/en/latest/Advanced-Usage/Workloads/index.html
Other
76 stars 49 forks source link

Drivers don't build with FTRACE enabled #91

Open NathanTP opened 4 years ago

NathanTP commented 4 years ago

Initially brought by hzhuo2@wisc.edu

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 commented 4 years ago

@zhemao @a0u any ideas?

NathanTP commented 4 years ago

also see: https://groups.google.com/forum/#!topic/firesim/sMC_4-CGAMk