How do I/O Tracing Privileged Linux Containers?

An error occurred while tracing the privileged container. As a result of 4kb I/O (fio jobfile) using a tracing simplification tool called uftrace, kernel tracking is rejected.

$ sudo uftrace record --force -P -a -k -K 50 fio jobfile
WARN: kernel tracing disabled due to an error
is CONFIG_FUNCTION_GRAPH_TRACER enabled in the kernel?
job1: (g=0): rw=randwrite, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=1
fio-3.30-80-gdff3
Starting 1 process

job1: (groupid=0, jobs=1): err= 0: pid=502: Tue Jul 26 08:49:51 2022

...

Run status group 0 (all jobs):
WRITE: bw=41.8MiB/s (43.9MB/s), 41.8MiB/s-41.8MiB/s (43.9MB/s-43.9MB/s), io=10.0MiB (10.5MB), run=239-239msec

Disk stats (read/write):
dm-1: ios=0/1449, merge=0/0, ticks=0/108, in_queue=108, util=61.29%, aggrios=1/1280, aggrmerge=0/0, aggrticks=0/70, aggrin_queue=70, aggrutil=63.21%
nvme0n1: ios=0/0, merge=0/0, ticks=0/0, in_queue=0, util=0.00%
nvme0n2: ios=2/2560, merge=0/0, ticks=0/141, in_queue=141, util=63.21%

The value of CONFIG_FUNCTION_GRAPH_TRACE in my host OS is set to enable, and all other trace options are set to enable.

The privileged container was created through this command.
$ sudo lxc launch ubuntu:20.04 mycon2Pool2 --storage=pool2 -c security.privileged=true -c security.nesting=true

Which config should I modify to trace the kernel of host os in the container? I’d appreciate it if you could let me know how to modify it. Please tell me if you need any more information.

Environment
Host Kernel version: linux-5.10.0-1052-oem
Host OS: Ubuntu Emulated with qemu
Host OS Ubuntu version: ubuntu 20.04
Container Ubuntu version: ubuntu 20.04
Uftrace version: 0.12
Fio version: 3.30

mycon2Pool2 container lxc.conf

$ cat /var/snap/lxd/common/lxd/logs/mycon2Pool2/lxc.conf

lxc.log.file = /var/snap/lxd/common/lxd/logs/mycon2Pool2/lxc.log
lxc.log.level = warn
lxc.console.buffer.size = auto
lxc.console.size = auto
lxc.console.logfile = /var/snap/lxd/common/lxd/logs/mycon2Pool2/console.log
lxc.cap.drop = sys_time sys_module sys_rawio
lxc.mount.auto = proc:mixed sys:mixed cgroup:mixed
lxc.autodev = 1
lxc.pty.max = 1024
lxc.mount.entry = mqueue dev/mqueue mqueue rw,relatime,create=dir,optional 0 0
lxc.mount.entry = /dev/fuse dev/fuse none bind,create=file,optional 0 0
lxc.mount.entry = /dev/net/tun dev/net/tun none bind,create=file,optional 0 0
lxc.mount.entry = /proc/sys/fs/binfmt_misc proc/sys/fs/binfmt_misc none rbind,create=dir,optional 0 0
lxc.mount.entry = /sys/fs/fuse/connections sys/fs/fuse/connections none rbind,create=dir,optional 0 0
lxc.mount.entry = /sys/fs/pstore sys/fs/pstore none rbind,create=dir,optional 0 0
lxc.mount.entry = /sys/kernel/config sys/kernel/config none rbind,create=dir,optional 0 0
lxc.mount.entry = /sys/kernel/debug sys/kernel/debug none rbind,create=dir,optional 0 0
lxc.mount.entry = /sys/kernel/security sys/kernel/security none rbind,create=dir,optional 0 0
lxc.mount.entry = /sys/kernel/tracing sys/kernel/tracing none rbind,create=dir,optional 0 0
lxc.include = /snap/lxd/current/lxc/config//common.conf.d/
lxc.cgroup.devices.deny = a
lxc.cgroup.devices.allow = b *:* m
lxc.cgroup.devices.allow = c *:* m
lxc.cgroup.devices.allow = c 136:* rwm
lxc.cgroup.devices.allow = c 1:3 rwm
lxc.cgroup.devices.allow = c 1:5 rwm
lxc.cgroup.devices.allow = c 1:7 rwm
lxc.cgroup.devices.allow = c 1:8 rwm
lxc.cgroup.devices.allow = c 1:9 rwm
lxc.cgroup.devices.allow = c 5:0 rwm
lxc.cgroup.devices.allow = c 5:1 rwm
lxc.cgroup.devices.allow = c 5:2 rwm
lxc.cgroup.devices.allow = c 10:229 rwm
lxc.cgroup.devices.allow = c 10:200 rwm
lxc.mount.entry = proc dev/.lxc/proc proc create=dir,optional 0 0
lxc.mount.entry = sys dev/.lxc/sys sysfs create=dir,optional 0 0
lxc.arch = linux64
lxc.hook.version = 1
lxc.hook.pre-start = /proc/15687/exe callhook /var/snap/lxd/common/lxd "default" "mycon2Pool2" start
lxc.hook.stop = /snap/lxd/current/bin/lxd callhook /var/snap/lxd/common/lxd "default" "mycon2Pool2" stopns
lxc.hook.post-stop = /snap/lxd/current/bin/lxd callhook /var/snap/lxd/common/lxd "default" "mycon2Pool2" stop
lxc.tty.max = 0
lxc.uts.name = mycon2Pool2
lxc.mount.entry = /var/snap/lxd/common/lxd/devlxd dev/lxd none bind,create=dir 0 0
lxc.apparmor.profile = lxd-mycon2Pool2_</var/snap/lxd/common/lxd>//&:lxd-mycon2Pool2_<var-snap-lxd-common-lxd>:
lxc.seccomp.profile = /var/snap/lxd/common/lxd/security/seccomp/mycon2Pool2
lxc.mount.auto = shmounts:/var/snap/lxd/common/lxd/shmounts/mycon2Pool2:/dev/.lxd-mounts
lxc.net.0.type = phys
lxc.net.0.name = eth0
lxc.net.0.flags = up
lxc.net.0.link = vethd5ddb1b5
lxc.rootfs.path = dir:/var/snap/lxd/common/lxd/storage-pools/pool2/containers/mycon2Pool2/rootfs