From 0725895127a5ca002a61e3f90246e1cf7b8ae552 Mon Sep 17 00:00:00 2001 From: Dick Sites Date: Mon, 15 Jul 2024 12:59:45 -0700 Subject: [PATCH] Update for linux-6.6.36 kernel Patch file is linux/linux-6.6.36/kutrace_patch_file_6.6.36.txt Directions in linux/linux-6.6.36/README Loadable module adds optional LLC miss tracking per timespan plus monitor/mwait wakeup from idle plus small performance tweaks rawtoevent.cc and eventtospan3.cc add LLC tracking eventtospan3.cc adds per-CPU handling of c-exit duration plus adds IPI arcs, including monitor/mwait idle wakeup show_cpu.html adds IPI arcs and LLC drawing --- ...ld_demo.html => hello_world_demo_live.html | 0 linux/android/kutrace/kutrace_mod_llc..docx | Bin 0 -> 43944 bytes linux/android/kutrace/name_routines.docx | Bin 0 -> 14609 bytes linux/linux-6.6.36/README | 130 + .../kutrace_patch_file_6.6.36.txt | 3918 +++++++++++++++++ linux/loadable-module/Use_module_instead | 1 - linux/module/kutrace_mod.c | 289 +- postproc/Makefile | 14 + postproc/base40.cc | 50 +- postproc/build.sh | 16 + postproc/eventtospan3.cc | 133 +- postproc/hello_world_trace.c | 12 + postproc/kutrace_control.cc | 262 ++ postproc/kutrace_control_names.h | 60 +- postproc/kutrace_control_names_4_4.h | 508 +++ postproc/kutrace_control_names_arm32.h | 551 +++ postproc/kutrace_control_names_i3.h | 605 +++ postproc/kutrace_control_names_rpi4.h | 492 +++ postproc/kutrace_control_names_ryzen.h | 528 +++ postproc/kutrace_control_names_x86.h | 521 +++ postproc/kutrace_lib.cc | 146 +- postproc/kutrace_lib.h | 69 +- postproc/kutrace_unittest.cc | 31 + postproc/postproc3.sh | 0 postproc/rawtoevent.cc | 293 +- postproc/remake.sh | 15 +- postproc/show_cpu.html | 411 +- postproc/time_getpid.cc | 27 +- postproc/timecounters.h | 62 + 29 files changed, 8672 insertions(+), 472 deletions(-) rename hello_world_demo.html => hello_world_demo_live.html (100%) create mode 100644 linux/android/kutrace/kutrace_mod_llc..docx create mode 100644 linux/android/kutrace/name_routines.docx create mode 100644 linux/linux-6.6.36/README create mode 100644 linux/linux-6.6.36/kutrace_patch_file_6.6.36.txt delete mode 100644 linux/loadable-module/Use_module_instead create mode 100644 postproc/Makefile create mode 100644 postproc/build.sh create mode 100644 postproc/hello_world_trace.c create mode 100644 postproc/kutrace_control.cc create mode 100644 postproc/kutrace_control_names_4_4.h create mode 100644 postproc/kutrace_control_names_arm32.h create mode 100644 postproc/kutrace_control_names_i3.h create mode 100644 postproc/kutrace_control_names_rpi4.h create mode 100644 postproc/kutrace_control_names_ryzen.h create mode 100644 postproc/kutrace_control_names_x86.h create mode 100644 postproc/kutrace_unittest.cc mode change 100755 => 100644 postproc/postproc3.sh mode change 100755 => 100644 postproc/remake.sh create mode 100644 postproc/timecounters.h diff --git a/hello_world_demo.html b/hello_world_demo_live.html similarity index 100% rename from hello_world_demo.html rename to hello_world_demo_live.html diff --git a/linux/android/kutrace/kutrace_mod_llc..docx b/linux/android/kutrace/kutrace_mod_llc..docx new file mode 100644 index 0000000000000000000000000000000000000000..53499abd6db65577720cd1fd7f6010e98fb3c2f2 GIT binary patch literal 43944 zcmeFX1Cu6A)HZmxZQJ&A&$Mk!+qP}nwr$&X_q1)>Hn*R5zunl4{R!VzMpZ^tWMx*J zIM=~-QdSZK6cqptfCK;lM1bwWIZJgQ0Duq-06+mi0&57`SUVb7JL)L9*%~=$(Ysn% z66S*fQ|1DIf5!j+$N$C>XiOZp?q@_4eolHrh-*>OKglnr29DrKrjtK~!1MrC{)`{# z{OU#lmQwJJbjNz*|5qyn@|W)nbbXs89(p?oq6ZEYYQZ0i_Dfv zrU?QEUON{VCZT@$x0kgTF{a_F!@R0Vl2o8>BWl>0=jlRDqGyV1to?d`1Kv$EHYRVX ztV%S*g(HC@iyY19FmbVqURgwqr=q4?TWuk&^g8a&gHjP$aG zWi2zjaLVoh$gE(WcX+GDvTDj~2f%bX@1vC=wq!C5@o1IHhc|k({%-XG0swq}g8*dz zUy#I)!*03$(KG2E#KHVPQpeuN(t&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cOX|H2d4)rtEj>vuLE$g33xQ_TsJnmf$EvVDnfEYX*yI9ymxw(EGe+Pav zuTwuo03IRCsQv}4Lo7u2V*$dSXoP6w=74bGXYT)%DQG|wuiGC0*e}KZW9I2^vag8M z4Sz8GljCFU4Z zf0sG`#@8hMh5t?T{GH+7LfzkZ#Ltrg0Q@f7{f_>(T=Gx!*R+42e~Bl*!+#&O{!NgZ d`K$E)?-*812^A3@KVuCW(1nP($&#Pn{twQNoAUqw literal 0 HcmV?d00001 diff --git a/linux/android/kutrace/name_routines.docx b/linux/android/kutrace/name_routines.docx new file mode 100644 index 0000000000000000000000000000000000000000..cc3a20657d1dd737f44d68d05d130e22c21b02f0 GIT binary patch literal 14609 zcmeHu1$SLJvhFcc95XXx%*@OjGcz+grkI(TnVFemh?$w~m?37ipVN2xb$4do`vZ4$ z*4A2E(pS>as@kP0Rmn+$fFc9H0gwOyfB>+OKW(WF1OVWJ0RTt?8*4`+YeyYL zH(MhIEgDxVOZ;3=VDfAL@ca1xmjA^&P#-^H-Ae~Ae3$SD7t^Gqe~?>B2^_|g_(|aq z0^J>0`6YI+{k0PbSY8Pz2HKL4gz;{jQF*{`YB|*s3ZcP;VfT}_ zAqMGIJl#6~cb2b~Ozj;QQY=7pL=AnhW1pdA)AQ2(P*m>$k(3Eh%EVtH7;*idQ5iSy zI@Upw)=6wBWE&u`K5Azp!o<}sFnd~y5uzI|In1blMcc3V zIpF+^#6;&!mQ#s@IB~>tWRj;E8Xzom(JKk7@=(-tYpKqsmRZ5xyjCh8sefGlBt#1o zGrpRdTcMh>mia~wQ5XT#&LzCFf&)hpvxy1d+?Vl3k>afqxfp3j%FkU5NycpE60ul= ziZKPral4(^TU<^L%^$bB1~SXr;T>47vaA?4+XT=b&UkC3iOri#K-^em^WhBbtvp%X zg8%?;Zy*44|<*qt-<69`Vs`BhPV{c%A)zg>kHT7BCyt>p6JN*Ox)xbhjbCA&3LV! zn2AcTp&d~3588biPwlRNgn;$}de?c|?GI^tx5h8SM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.36/README new file mode 100644 index 000000000000..962a7923fc9a --- /dev/null +++ b/linux/linux-6.6.36/README @@ -0,0 +1,130 @@ +Installing KUtrace for Linux 6.6.36 +dsites 2024.07.15 + +Download and unpack a copy of Linux 6.6.36 from kernel.org or one of its clones, +putting everything in a directory named linux-6.6.36 + +Install any tools needed for a kernel build. I follow the directions in + https://davidaugustat.com/linux/how-to-compile-linux-kernel-on-ubuntu + + +(1) Initial unpatched build, a version tailored to your specific machine +$ cd linux-6.6.36 +$ cp -v /boot/config-$(uname -r) .config +$ make localmodconfig + +$ scripts/config --disable SYSTEM_TRUSTED_KEYS +$ scripts/config --disable SYSTEM_REVOCATION_KEYS +$ scripts/config --set-str CONFIG_SYSTEM_TRUSTED_KEYS "" +$ scripts/config --set-str CONFIG_SYSTEM_REVOCATION_KEYS "" + +$ fakeroot make -j4 + The first time, this will take a while, perhaps 1/2 hour to five hours. +$ sudo make modules_install +$ sudo make install +$ sudo reboot + +... + +Hold down shift key while booting to get to grub advanced choices, and pick off the +newly-built 6.6.36 kernel to load + +When it comes up and you log in, do +$ uname -a + +to confirm that the kernel version and date are the just-built 6.6.36 version. + +If there are difficulties, stay with it (perhaps with help from someone) until you +have a successful unmodified 6.6.36 kernel running. + + +(2) Initial patched build +Apply the patch file via +$ cd linux-6.6.36 +$ patch -p1 kutrace_patch_file_6.6.36.txt + +This changes about 24 files, installing new files include/linux/kutrace.h, +kernel/kutrace/kutrace.c, and kernel/kutrace/Makefile. All the other changes are simple +mostly-one-line hooks to record individual KUtrace events. + +$make menuconfig + +Find the KUtrace configuration choice inserted by the patched arch/x86/Kconfig and +turn it on. + +$ fakeroot make -j4 + This will be much faster because it only recompiles the changed files. +$ sudo make modules_install +$ sudo make install +$ sudo reboot + ... shift key for grub, login, uname to confirm + + +(3) The loadable module +From the github KUtrace code, download the linux/module and postproc subdirectories +$ cd linux/module +$ make + +This produces kutrace_mod.ko, which has to be recompiled each time you modify the kernel +because it links against exported symbols there, including the exported KUtrace +variables. + +$ sudo insmod kutrace_mod.ko tracemb=20 check=0 + +This installs the loadable module, which has all the implementation code for the hooks +patched into various kernel source files above. It also has the implementation code +for user-supplied control calls via the kutrace_control program or the lower-level +kutrace_lib code linked into some program. + +tracemb specifies the size in megabytes of the reserved trace buffer. +check specifies whether to require the PTRACE privilege in a task that does + user-supplied calls. 0 means don't check. + +(The command $ sudo rmmod kutrace_mod.ko removes the module) + + +(4) The control and postprocessing code +From the github KUtrace code, +$ cd postproc +$ ./build.sh + +This compiles the postprocessing programs. + + +(5) Make a trace +From the github KUtrace code, +$ cd postproc +$ ./kutrace_control + +At the prompt, type "goipc" +and at the next prompt, type "stop" + +go starts a trace +goipc starts a trace that also includes instructions-per-cycle for each timespan +gollc starts a trace that also includes last-level cache misses for each timespan +goipcllc does both (ipc and llc are in alphabetic order here) +stop stops a trace and writes the raw trace binary to a disk file + +This will write a raw trace file with a name like + ku_20240709_152922_dclab-2_11686.trace + +$ ./postproc3.sh ku_20240709_152922_dclab-2_11686.trace "Caption here" + +This will produce + ku_20240709_152922_dclab-2_11686.json and + ku_20240709_152922_dclab-2_11686.html + +and try to open the HTML in the Google Chrome browser (if you want a different browser, +change the script to use it instead). If all goes well, your browser will display the +the full trace timeline, with rows for multiple CPU cores. It will mostly be idle job +loop and timer interrupts, but you can pan (click-drag) and zoom (mouse wheel) +around to see what is there. See the github KUtrace files + hello_world_demo_live.html and + hello_world_walkthrough.pdf +for some guidance on what to look for. + + +(6) Go celebrate + + + diff --git a/linux/linux-6.6.36/kutrace_patch_file_6.6.36.txt b/linux/linux-6.6.36/kutrace_patch_file_6.6.36.txt new file mode 100644 index 000000000000..5fe986a39cc7 --- /dev/null +++ b/linux/linux-6.6.36/kutrace_patch_file_6.6.36.txt @@ -0,0 +1,3918 @@ +diff -Naur original/arch/x86/entry/common.c patched/arch/x86/entry/common.c +--- original/arch/x86/entry/common.c 2024-07-15 09:10:38.771859555 -0700 ++++ patched/arch/x86/entry/common.c 2024-07-15 09:11:08.056275279 -0700 +@@ -36,6 +36,8 @@ + #include + #include + ++#include ++ + #ifdef CONFIG_X86_64 + + static __always_inline bool do_syscall_x64(struct pt_regs *regs, int nr) +@@ -48,8 +50,34 @@ + + if (likely(unr < NR_syscalls)) { + unr = array_index_nospec(unr, NR_syscalls); ++ ++ /* dsites 2023.02.18 track all syscalls and normal returns */ ++ /* Pass in low 16 bits of call arg0 and return value */ ++ kutrace1(KUTRACE_SYSCALL64 | kutrace_map_nr(unr), regs->di & 0xFFFFul); + regs->ax = x64_sys_call(regs, unr); ++ ++ /* dsites 2023.02.18 track all syscalls and normal returns */ ++ /* Pass in low 16 bits of return value */ ++ kutrace1(KUTRACE_SYSRET64 | kutrace_map_nr(unr), regs->ax & 0xFFFFul); ++ + return true; ++ ++#ifdef CONFIG_KUTRACE ++ /* dsites 2023.02.18 hook for controlling kutrace */ ++ } else if ((nr == __NR_kutrace_control) && ++ (kutrace_global_ops.kutrace_trace_control != NULL)) { ++ BUILD_BUG_ON_MSG(NR_syscalls > __NR_kutrace_control, ++ "__NR_kutrace_control is too small"); ++ BUILD_BUG_ON_MSG(16 > TASK_COMM_LEN, ++ "TASK_COMM_LEN is less than 16"); ++ /* Calling kutrace_control(u64 command, u64 arg) */ ++ /* see arch/x86/calling.h: */ ++ /* syscall arg0 in rdi (command), arg1 in rsi (arg) */ ++ regs->ax = (*kutrace_global_ops.kutrace_trace_control)( ++ regs->di, regs->si); ++ return true; ++#endif ++ + } + return false; + } +diff -Naur original/arch/x86/Kconfig patched/arch/x86/Kconfig +--- original/arch/x86/Kconfig 2024-07-15 09:10:38.771859555 -0700 ++++ patched/arch/x86/Kconfig 2024-07-15 09:11:08.056275279 -0700 +@@ -47,6 +47,15 @@ + generic code, as other architectures still use it. But we + only need to keep it around for x86_64. No need to keep it + for x86_32. For x86_32, force DYNAMIC_FTRACE. ++ ++config KUTRACE ++ bool "KUtrace kernel/user tracing" ++ depends on 64BIT ++ def_bool n ++ help ++ Enables kernel/user transition tracing patches, in conjunction with ++ the kutrace_mod loadable module. ++ + # + # Arch settings + # +diff -Naur original/arch/x86/kernel/acpi/cstate.c patched/arch/x86/kernel/acpi/cstate.c +--- original/arch/x86/kernel/acpi/cstate.c 2024-07-15 09:10:38.771859555 -0700 ++++ patched/arch/x86/kernel/acpi/cstate.c 2024-07-15 09:11:08.056275279 -0700 +@@ -16,6 +16,8 @@ + #include + #include + ++#include ++ + /* + * Initialize bm_flags based on the CPU cache properties + * On SMP it depends on cache configuration +@@ -210,8 +212,10 @@ + struct cstate_entry *percpu_entry; + + percpu_entry = per_cpu_ptr(cpu_cstate_entry, cpu); ++ kutrace1(KUTRACE_MWAIT, percpu_entry->states[cx->index].eax); + mwait_idle_with_hints(percpu_entry->states[cx->index].eax, + percpu_entry->states[cx->index].ecx); ++ /*kutrace1(0x20C, 6);*/ /* f */ + } + EXPORT_SYMBOL_GPL(acpi_processor_ffh_cstate_enter); + +diff -Naur original/arch/x86/kernel/apic/apic.c patched/arch/x86/kernel/apic/apic.c +--- original/arch/x86/kernel/apic/apic.c 2024-07-15 09:10:38.771859555 -0700 ++++ patched/arch/x86/kernel/apic/apic.c 2024-07-15 09:11:08.056275279 -0700 +@@ -65,6 +65,8 @@ + #include + #include + ++#include ++ + #include "local.h" + + unsigned int num_processors; +@@ -1078,9 +1080,22 @@ + struct pt_regs *old_regs = set_irq_regs(regs); + + apic_eoi(); ++ ++ /* dsites 2023.02.18 */ ++ kutrace1(KUTRACE_IRQ + LOCAL_TIMER_VECTOR, 0); + trace_local_timer_entry(LOCAL_TIMER_VECTOR); + local_apic_timer_interrupt(); + trace_local_timer_exit(LOCAL_TIMER_VECTOR); ++ /* dsites 2023.02.18 */ ++ kutrace1(KUTRACE_IRQRET + LOCAL_TIMER_VECTOR, 0); ++ ++ /* dsites 2023.02.18 Trace return address -- we are also a profiler now */ ++ /* This call will also insert the current CPU frequency if available */ ++#ifdef CONFIG_KUTRACE ++ if (kutrace_tracing) { ++ (*kutrace_global_ops.kutrace_trace_2)(KUTRACE_PC, 0, regs->ip); ++ } ++#endif + + set_irq_regs(old_regs); + } +diff -Naur original/arch/x86/kernel/apic/ipi.c patched/arch/x86/kernel/apic/ipi.c +--- original/arch/x86/kernel/apic/ipi.c 2024-07-15 09:10:38.771859555 -0700 ++++ patched/arch/x86/kernel/apic/ipi.c 2024-07-15 09:11:08.056275279 -0700 +@@ -8,6 +8,8 @@ + + #include "local.h" + ++#include ++ + DEFINE_STATIC_KEY_FALSE(apic_use_ipi_shorthand); + + #ifdef CONFIG_SMP +@@ -70,16 +72,20 @@ + WARN(1, "sched: Unexpected reschedule of offline CPU#%d!\n", cpu); + return; + } ++ kutrace1(KUTRACE_IPI, cpu); + __apic_send_IPI(cpu, RESCHEDULE_VECTOR); + } + + void native_send_call_func_single_ipi(int cpu) + { ++ kutrace1(KUTRACE_IPI, cpu); + __apic_send_IPI(cpu, CALL_FUNCTION_SINGLE_VECTOR); + } + + void native_send_call_func_ipi(const struct cpumask *mask) + { ++ /* Use CPU 0 as a placeholder to indicate when mask was sent */ ++ kutrace1(KUTRACE_IPI, 0); + if (static_branch_likely(&apic_use_ipi_shorthand)) { + unsigned int cpu = smp_processor_id(); + +diff -Naur original/arch/x86/kernel/irq.c patched/arch/x86/kernel/irq.c +--- original/arch/x86/kernel/irq.c 2024-07-15 09:10:38.771859555 -0700 ++++ patched/arch/x86/kernel/irq.c 2024-07-15 09:11:08.056275279 -0700 +@@ -26,6 +26,8 @@ + #define CREATE_TRACE_POINTS + #include + ++#include ++ + DEFINE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat); + EXPORT_PER_CPU_SYMBOL(irq_stat); + +@@ -249,6 +251,8 @@ + struct pt_regs *old_regs = set_irq_regs(regs); + struct irq_desc *desc; + ++ kutrace1(KUTRACE_IRQ + (vector & 0xFF), 0); ++ + /* entry code tells RCU that we're not quiescent. Check it. */ + RCU_LOCKDEP_WARN(!rcu_is_watching(), "IRQ failed to wake up RCU"); + +@@ -267,6 +271,8 @@ + } + } + ++ kutrace1(KUTRACE_IRQRET + (vector & 0xFF), 0); ++ + set_irq_regs(old_regs); + } + +@@ -281,11 +287,13 @@ + struct pt_regs *old_regs = set_irq_regs(regs); + + apic_eoi(); ++ kutrace1(KUTRACE_IRQ + X86_PLATFORM_IPI_VECTOR, 0); + trace_x86_platform_ipi_entry(X86_PLATFORM_IPI_VECTOR); + inc_irq_stat(x86_platform_ipis); + if (x86_platform_ipi_callback) + x86_platform_ipi_callback(); + trace_x86_platform_ipi_exit(X86_PLATFORM_IPI_VECTOR); ++ kutrace1(KUTRACE_IRQRET + X86_PLATFORM_IPI_VECTOR, 0); + set_irq_regs(old_regs); + } + #endif +diff -Naur original/arch/x86/kernel/irq_work.c patched/arch/x86/kernel/irq_work.c +--- original/arch/x86/kernel/irq_work.c 2024-07-15 09:10:38.771859555 -0700 ++++ patched/arch/x86/kernel/irq_work.c 2024-07-15 09:11:08.056275279 -0700 +@@ -13,14 +13,18 @@ + #include + #include + ++#include ++ + #ifdef CONFIG_X86_LOCAL_APIC + DEFINE_IDTENTRY_SYSVEC(sysvec_irq_work) + { + apic_eoi(); ++ kutrace1(KUTRACE_IRQ + IRQ_WORK_VECTOR, 0); + trace_irq_work_entry(IRQ_WORK_VECTOR); + inc_irq_stat(apic_irq_work_irqs); + irq_work_run(); + trace_irq_work_exit(IRQ_WORK_VECTOR); ++ kutrace1(KUTRACE_IRQRET + IRQ_WORK_VECTOR, 0); + } + + void arch_irq_work_raise(void) +diff -Naur original/arch/x86/kernel/process.c patched/arch/x86/kernel/process.c +--- original/arch/x86/kernel/process.c 2024-07-15 09:10:38.771859555 -0700 ++++ patched/arch/x86/kernel/process.c 2024-07-15 09:11:08.056275279 -0700 +@@ -55,6 +55,8 @@ + + #include "process.h" + ++#include ++ + /* + * per-CPU TSS segments. Threads are completely 'soft' on Linux, + * no more per-task TSS's. The TSS size is kept cacheline-aligned +@@ -927,6 +929,7 @@ + __monitor((void *)¤t_thread_info()->flags, 0, 0); + if (!need_resched()) { + __sti_mwait(0, 0); ++ kutrace1(KUTRACE_MONITOREXIT, 0); + raw_local_irq_disable(); + } + } +diff -Naur original/arch/x86/kernel/smp.c patched/arch/x86/kernel/smp.c +--- original/arch/x86/kernel/smp.c 2024-07-15 09:10:38.771859555 -0700 ++++ patched/arch/x86/kernel/smp.c 2024-07-15 09:11:08.056275279 -0700 +@@ -23,6 +23,8 @@ + #include + #include + ++#include ++ + #include + #include + #include +@@ -244,28 +246,34 @@ + DEFINE_IDTENTRY_SYSVEC_SIMPLE(sysvec_reschedule_ipi) + { + apic_eoi(); ++ kutrace1(KUTRACE_IRQ + RESCHEDULE_VECTOR, 0); + trace_reschedule_entry(RESCHEDULE_VECTOR); + inc_irq_stat(irq_resched_count); + scheduler_ipi(); + trace_reschedule_exit(RESCHEDULE_VECTOR); ++ kutrace1(KUTRACE_IRQRET + RESCHEDULE_VECTOR, 0); + } + + DEFINE_IDTENTRY_SYSVEC(sysvec_call_function) + { + apic_eoi(); ++ kutrace1(KUTRACE_IRQ + CALL_FUNCTION_VECTOR, 0); + trace_call_function_entry(CALL_FUNCTION_VECTOR); + inc_irq_stat(irq_call_count); + generic_smp_call_function_interrupt(); + trace_call_function_exit(CALL_FUNCTION_VECTOR); ++ kutrace1(KUTRACE_IRQRET + CALL_FUNCTION_VECTOR, 0); + } + + DEFINE_IDTENTRY_SYSVEC(sysvec_call_function_single) + { + apic_eoi(); ++ kutrace1(KUTRACE_IRQ + CALL_FUNCTION_SINGLE_VECTOR, 0); + trace_call_function_single_entry(CALL_FUNCTION_SINGLE_VECTOR); + inc_irq_stat(irq_call_count); + generic_smp_call_function_single_interrupt(); + trace_call_function_single_exit(CALL_FUNCTION_SINGLE_VECTOR); ++ kutrace1(KUTRACE_IRQRET + CALL_FUNCTION_SINGLE_VECTOR, 0); + } + + static int __init nonmi_ipi_setup(char *str) +diff -Naur original/arch/x86/mm/fault.c patched/arch/x86/mm/fault.c +--- original/arch/x86/mm/fault.c 2024-07-15 09:10:38.771859555 -0700 ++++ patched/arch/x86/mm/fault.c 2024-07-15 09:11:08.056275279 -0700 +@@ -38,6 +38,8 @@ + #define CREATE_TRACE_POINTS + #include + ++#include ++ + /* + * Returns 0 if mmiotrace is disabled, or if the fault is not + * handled by mmiotrace: +@@ -1458,6 +1460,8 @@ + if (unlikely(kmmio_fault(regs, address))) + return; + ++ kutrace1(KUTRACE_TRAP + KUTRACE_PAGEFAULT, 0); ++ + /* Was the fault on kernel-controlled part of the address space? */ + if (unlikely(fault_in_kernel_space(address))) { + do_kern_addr_fault(regs, error_code, address); +@@ -1472,6 +1476,8 @@ + */ + local_irq_disable(); + } ++ ++ kutrace1(KUTRACE_TRAPRET + KUTRACE_PAGEFAULT, 0); + } + + DEFINE_IDTENTRY_RAW_ERRORCODE(exc_page_fault) +diff -Naur original/.config patched/.config +--- original/.config 2024-07-15 09:10:38.779859667 -0700 ++++ patched/.config 2024-07-15 09:11:08.056275279 -0700 +@@ -40,13 +40,13 @@ + CONFIG_HAVE_KERNEL_LZO=y + CONFIG_HAVE_KERNEL_LZ4=y + CONFIG_HAVE_KERNEL_ZSTD=y +-CONFIG_KERNEL_GZIP=y ++# CONFIG_KERNEL_GZIP is not set + # CONFIG_KERNEL_BZIP2 is not set + # CONFIG_KERNEL_LZMA is not set + # CONFIG_KERNEL_XZ is not set + # CONFIG_KERNEL_LZO is not set + # CONFIG_KERNEL_LZ4 is not set +-# CONFIG_KERNEL_ZSTD is not set ++CONFIG_KERNEL_ZSTD=y + CONFIG_DEFAULT_INIT="" + CONFIG_DEFAULT_HOSTNAME="(none)" + CONFIG_SYSVIPC=y +@@ -54,7 +54,7 @@ + CONFIG_SYSVIPC_COMPAT=y + CONFIG_POSIX_MQUEUE=y + CONFIG_POSIX_MQUEUE_SYSCTL=y +-# CONFIG_WATCH_QUEUE is not set ++CONFIG_WATCH_QUEUE=y + CONFIG_CROSS_MEMORY_ATTACH=y + CONFIG_USELIB=y + CONFIG_AUDIT=y +@@ -104,7 +104,7 @@ + CONFIG_NO_HZ_FULL=y + CONFIG_CONTEXT_TRACKING_USER=y + # CONFIG_CONTEXT_TRACKING_USER_FORCE is not set +-# CONFIG_NO_HZ is not set ++CONFIG_NO_HZ=y + CONFIG_HIGH_RES_TIMERS=y + CONFIG_CLOCKSOURCE_WATCHDOG_MAX_SKEW_US=100 + # end of Timers subsystem +@@ -122,7 +122,7 @@ + CONFIG_BPF_JIT_DEFAULT_ON=y + CONFIG_BPF_UNPRIV_DEFAULT_OFF=y + # CONFIG_BPF_PRELOAD is not set +-# CONFIG_BPF_LSM is not set ++CONFIG_BPF_LSM=y + # end of BPF subsystem + + CONFIG_PREEMPT_BUILD=y +@@ -132,7 +132,7 @@ + CONFIG_PREEMPT_COUNT=y + CONFIG_PREEMPTION=y + CONFIG_PREEMPT_DYNAMIC=y +-# CONFIG_SCHED_CORE is not set ++CONFIG_SCHED_CORE=y + + # + # CPU/Task time and stats accounting +@@ -146,7 +146,8 @@ + CONFIG_TASK_DELAY_ACCT=y + CONFIG_TASK_XACCT=y + CONFIG_TASK_IO_ACCOUNTING=y +-# CONFIG_PSI is not set ++CONFIG_PSI=y ++# CONFIG_PSI_DEFAULT_DISABLED is not set + # end of CPU/Task time and stats accounting + + CONFIG_CPU_ISOLATION=y +@@ -166,7 +167,7 @@ + CONFIG_RCU_NEED_SEGCBLIST=y + CONFIG_RCU_NOCB_CPU=y + # CONFIG_RCU_NOCB_CPU_DEFAULT_ALL is not set +-# CONFIG_RCU_LAZY is not set ++CONFIG_RCU_LAZY=y + # end of RCU Subsystem + + CONFIG_IKCONFIG=m +@@ -180,7 +181,8 @@ + # + # Scheduler features + # +-# CONFIG_UCLAMP_TASK is not set ++CONFIG_UCLAMP_TASK=y ++CONFIG_UCLAMP_BUCKETS_COUNT=5 + # end of Scheduler features + + CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y +@@ -204,6 +206,7 @@ + CONFIG_CFS_BANDWIDTH=y + # CONFIG_RT_GROUP_SCHED is not set + CONFIG_SCHED_MM_CID=y ++CONFIG_UCLAMP_TASK_GROUP=y + CONFIG_CGROUP_PIDS=y + CONFIG_CGROUP_RDMA=y + CONFIG_CGROUP_FREEZER=y +@@ -214,7 +217,7 @@ + CONFIG_CGROUP_CPUACCT=y + CONFIG_CGROUP_PERF=y + CONFIG_CGROUP_BPF=y +-# CONFIG_CGROUP_MISC is not set ++CONFIG_CGROUP_MISC=y + # CONFIG_CGROUP_DEBUG is not set + CONFIG_SOCK_CGROUP_DATA=y + CONFIG_NAMESPACES=y +@@ -236,7 +239,9 @@ + CONFIG_RD_LZO=y + CONFIG_RD_LZ4=y + CONFIG_RD_ZSTD=y +-# CONFIG_BOOT_CONFIG is not set ++CONFIG_BOOT_CONFIG=y ++# CONFIG_BOOT_CONFIG_FORCE is not set ++# CONFIG_BOOT_CONFIG_EMBED is not set + CONFIG_INITRAMFS_PRESERVE_MTIME=y + CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y + # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +@@ -302,7 +307,9 @@ + CONFIG_HAVE_IMA_KEXEC=y + CONFIG_KEXEC=y + CONFIG_KEXEC_FILE=y +-# CONFIG_KEXEC_SIG is not set ++CONFIG_KEXEC_SIG=y ++# CONFIG_KEXEC_SIG_FORCE is not set ++CONFIG_KEXEC_BZIMAGE_VERIFY_SIG=y + CONFIG_KEXEC_JUMP=y + CONFIG_CRASH_DUMP=y + CONFIG_CRASH_HOTPLUG=y +@@ -337,7 +344,7 @@ + CONFIG_ARCH_SUPPORTS_UPROBES=y + CONFIG_FIX_EARLYCON_MEM=y + CONFIG_DYNAMIC_PHYSICAL_MASK=y +-CONFIG_PGTABLE_LEVELS=4 ++CONFIG_PGTABLE_LEVELS=5 + CONFIG_CC_HAS_SANE_STACKPROTECTOR=y + + # +@@ -347,11 +354,11 @@ + CONFIG_X86_X2APIC=y + CONFIG_X86_MPPARSE=y + # CONFIG_GOLDFISH is not set +-# CONFIG_X86_CPU_RESCTRL is not set ++CONFIG_X86_CPU_RESCTRL=y + CONFIG_X86_EXTENDED_PLATFORM=y + CONFIG_X86_NUMACHIP=y + # CONFIG_X86_VSMP is not set +-# CONFIG_X86_UV is not set ++CONFIG_X86_UV=y + # CONFIG_X86_GOLDFISH is not set + # CONFIG_X86_INTEL_MID is not set + CONFIG_X86_INTEL_LPSS=y +@@ -384,9 +391,9 @@ + CONFIG_PVH=y + # CONFIG_PARAVIRT_TIME_ACCOUNTING is not set + CONFIG_PARAVIRT_CLOCK=y +-# CONFIG_JAILHOUSE_GUEST is not set +-# CONFIG_ACRN_GUEST is not set +-# CONFIG_INTEL_TDX_GUEST is not set ++CONFIG_JAILHOUSE_GUEST=y ++CONFIG_ACRN_GUEST=y ++CONFIG_INTEL_TDX_GUEST=y + # CONFIG_MK8 is not set + # CONFIG_MPSC is not set + # CONFIG_MCORE2 is not set +@@ -404,9 +411,9 @@ + CONFIG_PROCESSOR_SELECT=y + CONFIG_CPU_SUP_INTEL=y + CONFIG_CPU_SUP_AMD=y +-# CONFIG_CPU_SUP_HYGON is not set ++CONFIG_CPU_SUP_HYGON=y + CONFIG_CPU_SUP_CENTAUR=y +-# CONFIG_CPU_SUP_ZHAOXIN is not set ++CONFIG_CPU_SUP_ZHAOXIN=y + CONFIG_HPET_TIMER=y + CONFIG_HPET_EMULATE_RTC=y + CONFIG_DMI=y +@@ -435,11 +442,11 @@ + # Performance monitoring + # + CONFIG_PERF_EVENTS_INTEL_UNCORE=y +-# CONFIG_PERF_EVENTS_INTEL_RAPL is not set +-# CONFIG_PERF_EVENTS_INTEL_CSTATE is not set ++CONFIG_PERF_EVENTS_INTEL_RAPL=m ++CONFIG_PERF_EVENTS_INTEL_CSTATE=m + # CONFIG_PERF_EVENTS_AMD_POWER is not set +-CONFIG_PERF_EVENTS_AMD_UNCORE=y +-# CONFIG_PERF_EVENTS_AMD_BRS is not set ++# CONFIG_PERF_EVENTS_AMD_UNCORE is not set ++CONFIG_PERF_EVENTS_AMD_BRS=y + # end of Performance monitoring + + CONFIG_X86_16BIT=y +@@ -448,9 +455,9 @@ + CONFIG_X86_IOPL_IOPERM=y + CONFIG_MICROCODE=y + # CONFIG_MICROCODE_LATE_LOADING is not set +-# CONFIG_X86_MSR is not set ++CONFIG_X86_MSR=m + # CONFIG_X86_CPUID is not set +-# CONFIG_X86_5LEVEL is not set ++CONFIG_X86_5LEVEL=y + CONFIG_X86_DIRECT_GBPAGES=y + # CONFIG_X86_CPA_STATISTICS is not set + CONFIG_X86_MEM_ENCRYPT=y +@@ -478,13 +485,13 @@ + CONFIG_X86_UMIP=y + CONFIG_CC_HAS_IBT=y + CONFIG_X86_CET=y +-CONFIG_X86_KERNEL_IBT=y ++# CONFIG_X86_KERNEL_IBT is not set + CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS=y + CONFIG_X86_INTEL_TSX_MODE_OFF=y + # CONFIG_X86_INTEL_TSX_MODE_ON is not set + # CONFIG_X86_INTEL_TSX_MODE_AUTO is not set +-# CONFIG_X86_SGX is not set +-# CONFIG_X86_USER_SHADOW_STACK is not set ++CONFIG_X86_SGX=y ++CONFIG_X86_USER_SHADOW_STACK=y + CONFIG_EFI=y + CONFIG_EFI_STUB=y + CONFIG_EFI_HANDOVER_PROTOCOL=y +@@ -492,10 +499,10 @@ + # CONFIG_EFI_FAKE_MEMMAP is not set + CONFIG_EFI_RUNTIME_MAP=y + # CONFIG_HZ_100 is not set +-CONFIG_HZ_250=y ++# CONFIG_HZ_250 is not set + # CONFIG_HZ_300 is not set +-# CONFIG_HZ_1000 is not set +-CONFIG_HZ=250 ++CONFIG_HZ_1000=y ++CONFIG_HZ=1000 + CONFIG_SCHED_HRTICK=y + CONFIG_ARCH_SUPPORTS_KEXEC=y + CONFIG_ARCH_SUPPORTS_KEXEC_FILE=y +@@ -515,7 +522,7 @@ + CONFIG_DYNAMIC_MEMORY_LAYOUT=y + CONFIG_RANDOMIZE_MEMORY=y + CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING=0xa +-# CONFIG_ADDRESS_MASKING is not set ++CONFIG_ADDRESS_MASKING=y + CONFIG_HOTPLUG_CPU=y + # CONFIG_COMPAT_VDSO is not set + CONFIG_LEGACY_VSYSCALL_XONLY=y +@@ -546,7 +553,7 @@ + CONFIG_CPU_IBPB_ENTRY=y + CONFIG_CPU_IBRS_ENTRY=y + CONFIG_CPU_SRSO=y +-# CONFIG_SLS is not set ++CONFIG_SLS=y + # CONFIG_GDS_FORCE_MITIGATION is not set + CONFIG_MITIGATION_RFDS=y + CONFIG_MITIGATION_SPECTRE_BHI=y +@@ -580,7 +587,7 @@ + CONFIG_PM_TRACE_RTC=y + CONFIG_PM_CLK=y + CONFIG_WQ_POWER_EFFICIENT_DEFAULT=y +-# CONFIG_ENERGY_MODEL is not set ++CONFIG_ENERGY_MODEL=y + CONFIG_ARCH_SUPPORTS_ACPI=y + CONFIG_ACPI=y + CONFIG_ACPI_LEGACY_TABLES_LOOKUP=y +@@ -589,7 +596,7 @@ + CONFIG_ACPI_DEBUGGER=y + CONFIG_ACPI_DEBUGGER_USER=y + CONFIG_ACPI_SPCR_TABLE=y +-# CONFIG_ACPI_FPDT is not set ++CONFIG_ACPI_FPDT=y + CONFIG_ACPI_LPIT=y + CONFIG_ACPI_SLEEP=y + CONFIG_ACPI_REV_OVERRIDE_POSSIBLE=y +@@ -624,7 +631,7 @@ + # CONFIG_ACPI_REDUCED_HARDWARE_ONLY is not set + # CONFIG_ACPI_NFIT is not set + CONFIG_ACPI_NUMA=y +-# CONFIG_ACPI_HMAT is not set ++CONFIG_ACPI_HMAT=y + CONFIG_HAVE_ACPI_APEI=y + CONFIG_HAVE_ACPI_APEI_NMI=y + CONFIG_ACPI_APEI=y +@@ -633,13 +640,19 @@ + CONFIG_ACPI_APEI_MEMORY_FAILURE=y + # CONFIG_ACPI_APEI_EINJ is not set + # CONFIG_ACPI_APEI_ERST_DEBUG is not set +-# CONFIG_ACPI_DPTF is not set ++CONFIG_ACPI_DPTF=y ++# CONFIG_DPTF_POWER is not set ++# CONFIG_DPTF_PCH_FIVR is not set + # CONFIG_ACPI_EXTLOG is not set + # CONFIG_ACPI_CONFIGFS is not set + # CONFIG_ACPI_PFRUT is not set + CONFIG_ACPI_PCC=y +-# CONFIG_ACPI_FFH is not set +-# CONFIG_PMIC_OPREGION is not set ++CONFIG_ACPI_FFH=y ++CONFIG_PMIC_OPREGION=y ++CONFIG_BYTCRC_PMIC_OPREGION=y ++CONFIG_CHTCRC_PMIC_OPREGION=y ++CONFIG_CHT_WC_PMIC_OPREGION=y ++CONFIG_ACPI_VIOT=y + CONFIG_ACPI_PRMT=y + CONFIG_X86_PM_TIMER=y + +@@ -650,10 +663,10 @@ + CONFIG_CPU_FREQ_GOV_ATTR_SET=y + CONFIG_CPU_FREQ_GOV_COMMON=y + CONFIG_CPU_FREQ_STAT=y +-CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y ++# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set + # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set + # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set +-# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set ++CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y + CONFIG_CPU_FREQ_GOV_PERFORMANCE=y + CONFIG_CPU_FREQ_GOV_POWERSAVE=y + CONFIG_CPU_FREQ_GOV_USERSPACE=y +@@ -666,7 +679,8 @@ + # + CONFIG_X86_INTEL_PSTATE=y + CONFIG_X86_PCC_CPUFREQ=y +-# CONFIG_X86_AMD_PSTATE is not set ++CONFIG_X86_AMD_PSTATE=y ++CONFIG_X86_AMD_PSTATE_DEFAULT_MODE=3 + # CONFIG_X86_AMD_PSTATE_UT is not set + CONFIG_X86_ACPI_CPUFREQ=y + CONFIG_X86_ACPI_CPUFREQ_CPB=y +@@ -686,9 +700,9 @@ + CONFIG_CPU_IDLE=y + CONFIG_CPU_IDLE_GOV_LADDER=y + CONFIG_CPU_IDLE_GOV_MENU=y +-# CONFIG_CPU_IDLE_GOV_TEO is not set ++CONFIG_CPU_IDLE_GOV_TEO=y + CONFIG_CPU_IDLE_GOV_HALTPOLL=y +-CONFIG_HALTPOLL_CPUIDLE=y ++# CONFIG_HALTPOLL_CPUIDLE is not set + # end of CPU Idle + + CONFIG_INTEL_IDLE=y +@@ -718,8 +732,35 @@ + # end of Binary Emulations + + CONFIG_HAVE_KVM=y ++CONFIG_HAVE_KVM_PFNCACHE=y ++CONFIG_HAVE_KVM_IRQCHIP=y ++CONFIG_HAVE_KVM_IRQFD=y ++CONFIG_HAVE_KVM_IRQ_ROUTING=y ++CONFIG_HAVE_KVM_DIRTY_RING=y ++CONFIG_HAVE_KVM_DIRTY_RING_TSO=y ++CONFIG_HAVE_KVM_DIRTY_RING_ACQ_REL=y ++CONFIG_HAVE_KVM_EVENTFD=y ++CONFIG_KVM_MMIO=y ++CONFIG_KVM_ASYNC_PF=y ++CONFIG_HAVE_KVM_MSI=y ++CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT=y ++CONFIG_KVM_VFIO=y ++CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y ++CONFIG_KVM_COMPAT=y ++CONFIG_HAVE_KVM_IRQ_BYPASS=y ++CONFIG_HAVE_KVM_NO_POLL=y ++CONFIG_KVM_XFER_TO_GUEST_WORK=y ++CONFIG_HAVE_KVM_PM_NOTIFIER=y ++CONFIG_KVM_GENERIC_HARDWARE_ENABLING=y + CONFIG_VIRTUALIZATION=y +-# CONFIG_KVM is not set ++CONFIG_KVM=m ++CONFIG_KVM_WERROR=y ++CONFIG_KVM_INTEL=m ++CONFIG_X86_SGX_KVM=y ++# CONFIG_KVM_AMD is not set ++CONFIG_KVM_SMM=y ++CONFIG_KVM_XEN=y ++# CONFIG_KVM_PROVE_MMU is not set + CONFIG_AS_AVX512=y + CONFIG_AS_SHA1_NI=y + CONFIG_AS_SHA256_NI=y +@@ -749,6 +790,7 @@ + CONFIG_ARCH_USE_BUILTIN_BSWAP=y + CONFIG_KRETPROBES=y + CONFIG_KRETPROBE_ON_RETHOOK=y ++CONFIG_USER_RETURN_NOTIFIER=y + CONFIG_HAVE_IOREMAP_PROT=y + CONFIG_HAVE_KPROBES=y + CONFIG_HAVE_KRETPROBES=y +@@ -829,9 +871,9 @@ + CONFIG_ARCH_HAS_ELF_RANDOMIZE=y + CONFIG_HAVE_ARCH_MMAP_RND_BITS=y + CONFIG_HAVE_EXIT_THREAD=y +-CONFIG_ARCH_MMAP_RND_BITS=28 ++CONFIG_ARCH_MMAP_RND_BITS=32 + CONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y +-CONFIG_ARCH_MMAP_RND_COMPAT_BITS=8 ++CONFIG_ARCH_MMAP_RND_COMPAT_BITS=16 + CONFIG_HAVE_ARCH_COMPAT_MMAP_BASES=y + CONFIG_PAGE_SIZE_LESS_THAN_64KB=y + CONFIG_PAGE_SIZE_LESS_THAN_256KB=y +@@ -849,7 +891,7 @@ + CONFIG_VMAP_STACK=y + CONFIG_HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET=y + CONFIG_RANDOMIZE_KSTACK_OFFSET=y +-# CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT is not set ++CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT=y + CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y + CONFIG_STRICT_KERNEL_RWX=y + CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y +@@ -869,6 +911,7 @@ + CONFIG_ARCH_HAS_ELFCORE_COMPAT=y + CONFIG_ARCH_HAS_PARANOID_L1D_FLUSH=y + CONFIG_DYNAMIC_SIGFRAME=y ++CONFIG_HAVE_ARCH_NODE_DEV_GROUP=y + CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG=y + + # +@@ -893,8 +936,9 @@ + CONFIG_MODULE_UNLOAD=y + # CONFIG_MODULE_FORCE_UNLOAD is not set + # CONFIG_MODULE_UNLOAD_TAINT_TRACKING is not set +-# CONFIG_MODVERSIONS is not set +-CONFIG_MODULE_SRCVERSION_ALL=y ++CONFIG_MODVERSIONS=y ++CONFIG_ASM_MODVERSIONS=y ++# CONFIG_MODULE_SRCVERSION_ALL is not set + CONFIG_MODULE_SIG=y + # CONFIG_MODULE_SIG_FORCE is not set + CONFIG_MODULE_SIG_ALL=y +@@ -904,16 +948,18 @@ + # CONFIG_MODULE_SIG_SHA384 is not set + CONFIG_MODULE_SIG_SHA512=y + CONFIG_MODULE_SIG_HASH="sha512" +-CONFIG_MODULE_COMPRESS_NONE=y ++# CONFIG_MODULE_COMPRESS_NONE is not set + # CONFIG_MODULE_COMPRESS_GZIP is not set + # CONFIG_MODULE_COMPRESS_XZ is not set +-# CONFIG_MODULE_COMPRESS_ZSTD is not set ++CONFIG_MODULE_COMPRESS_ZSTD=y ++CONFIG_MODULE_DECOMPRESS=y + # CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set + CONFIG_MODPROBE_PATH="/sbin/modprobe" + # CONFIG_TRIM_UNUSED_KSYMS is not set + CONFIG_MODULES_TREE_LOOKUP=y + CONFIG_BLOCK=y + CONFIG_BLOCK_LEGACY_AUTOLOAD=y ++CONFIG_BLK_RQ_ALLOC_TIME=y + CONFIG_BLK_CGROUP_RWSTAT=y + CONFIG_BLK_DEV_BSG_COMMON=y + CONFIG_BLK_DEV_BSGLIB=y +@@ -925,12 +971,13 @@ + CONFIG_BLK_WBT=y + CONFIG_BLK_WBT_MQ=y + # CONFIG_BLK_CGROUP_IOLATENCY is not set +-# CONFIG_BLK_CGROUP_IOCOST is not set +-# CONFIG_BLK_CGROUP_IOPRIO is not set ++CONFIG_BLK_CGROUP_IOCOST=y ++CONFIG_BLK_CGROUP_IOPRIO=y + CONFIG_BLK_DEBUG_FS=y + CONFIG_BLK_DEBUG_FS_ZONED=y + CONFIG_BLK_SED_OPAL=y +-# CONFIG_BLK_INLINE_ENCRYPTION is not set ++CONFIG_BLK_INLINE_ENCRYPTION=y ++CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK=y + + # + # Partition Types +@@ -972,6 +1019,7 @@ + # CONFIG_IOSCHED_BFQ is not set + # end of IO Schedulers + ++CONFIG_PREEMPT_NOTIFIERS=y + CONFIG_ASN1=y + CONFIG_UNINLINE_SPIN_UNLOCK=y + CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y +@@ -995,7 +1043,7 @@ + CONFIG_ELFCORE=y + CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y + CONFIG_BINFMT_SCRIPT=y +-# CONFIG_BINFMT_MISC is not set ++CONFIG_BINFMT_MISC=m + CONFIG_COREDUMP=y + # end of Executable file formats + +@@ -1035,7 +1083,7 @@ + CONFIG_SLAB_FREELIST_HARDENED=y + # CONFIG_SLUB_STATS is not set + CONFIG_SLUB_CPU_PARTIAL=y +-# CONFIG_RANDOM_KMALLOC_CACHES is not set ++CONFIG_RANDOM_KMALLOC_CACHES=y + # end of SLAB allocator options + + CONFIG_SHUFFLE_PAGE_ALLOCATOR=y +@@ -1088,11 +1136,7 @@ + CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y + CONFIG_USE_PERCPU_NUMA_NODE_ID=y + CONFIG_HAVE_SETUP_PER_CPU_AREA=y +-CONFIG_CMA=y +-# CONFIG_CMA_DEBUG is not set +-# CONFIG_CMA_DEBUGFS is not set +-# CONFIG_CMA_SYSFS is not set +-CONFIG_CMA_AREAS=7 ++# CONFIG_CMA is not set + CONFIG_MEM_SOFT_DIRTY=y + CONFIG_GENERIC_EARLY_IOREMAP=y + # CONFIG_DEFERRED_STRUCT_PAGE_INIT is not set +@@ -1107,6 +1151,7 @@ + CONFIG_ZONE_DEVICE=y + CONFIG_GET_FREE_REGION=y + CONFIG_DEVICE_PRIVATE=y ++CONFIG_VMAP_PFN=y + CONFIG_ARCH_USES_HIGH_VMA_FLAGS=y + CONFIG_ARCH_HAS_PKEYS=y + CONFIG_VM_EVENT_COUNTERS=y +@@ -1116,12 +1161,14 @@ + CONFIG_ARCH_HAS_PTE_SPECIAL=y + CONFIG_MEMFD_CREATE=y + CONFIG_SECRETMEM=y +-# CONFIG_ANON_VMA_NAME is not set ++CONFIG_ANON_VMA_NAME=y + CONFIG_USERFAULTFD=y + CONFIG_HAVE_ARCH_USERFAULTFD_WP=y + CONFIG_HAVE_ARCH_USERFAULTFD_MINOR=y + CONFIG_PTE_MARKER_UFFD_WP=y +-# CONFIG_LRU_GEN is not set ++CONFIG_LRU_GEN=y ++CONFIG_LRU_GEN_ENABLED=y ++# CONFIG_LRU_GEN_STATS is not set + CONFIG_ARCH_SUPPORTS_PER_VMA_LOCK=y + CONFIG_PER_VMA_LOCK=y + CONFIG_LOCK_MM_AND_FIND_VMA=y +@@ -1134,9 +1181,11 @@ + # end of Memory Management options + + CONFIG_NET=y ++CONFIG_COMPAT_NETLINK_MESSAGES=y + CONFIG_NET_INGRESS=y + CONFIG_NET_EGRESS=y + CONFIG_NET_XGRESS=y ++CONFIG_SKB_EXTENSIONS=y + + # + # Networking options +@@ -1150,7 +1199,8 @@ + # CONFIG_TLS is not set + # CONFIG_XFRM_USER is not set + # CONFIG_NET_KEY is not set +-# CONFIG_XDP_SOCKETS is not set ++CONFIG_XDP_SOCKETS=y ++# CONFIG_XDP_SOCKETS_DIAG is not set + CONFIG_INET=y + CONFIG_IP_MULTICAST=y + CONFIG_IP_ADVANCED_ROUTER=y +@@ -1163,7 +1213,7 @@ + # CONFIG_NET_IPGRE_DEMUX is not set + CONFIG_IP_MROUTE_COMMON=y + CONFIG_IP_MROUTE=y +-# CONFIG_IP_MROUTE_MULTIPLE_TABLES is not set ++CONFIG_IP_MROUTE_MULTIPLE_TABLES=y + CONFIG_IP_PIMSM_V1=y + CONFIG_IP_PIMSM_V2=y + CONFIG_SYN_COOKIES=y +@@ -1216,12 +1266,13 @@ + CONFIG_IPV6_SEG6_HMAC=y + CONFIG_IPV6_SEG6_BPF=y + # CONFIG_IPV6_RPL_LWTUNNEL is not set +-# CONFIG_IPV6_IOAM6_LWTUNNEL is not set ++CONFIG_IPV6_IOAM6_LWTUNNEL=y + CONFIG_NETLABEL=y +-# CONFIG_MPTCP is not set ++CONFIG_MPTCP=y ++CONFIG_MPTCP_IPV6=y + CONFIG_NETWORK_SECMARK=y + CONFIG_NET_PTP_CLASSIFY=y +-# CONFIG_NETWORK_PHY_TIMESTAMPING is not set ++CONFIG_NETWORK_PHY_TIMESTAMPING=y + CONFIG_NETFILTER=y + CONFIG_NETFILTER_ADVANCED=y + +@@ -1231,14 +1282,33 @@ + CONFIG_NETFILTER_INGRESS=y + CONFIG_NETFILTER_EGRESS=y + CONFIG_NETFILTER_SKIP_EGRESS=y ++CONFIG_NETFILTER_NETLINK=m ++CONFIG_NETFILTER_FAMILY_ARP=y + CONFIG_NETFILTER_BPF_LINK=y ++CONFIG_NETFILTER_NETLINK_HOOK=m + # CONFIG_NETFILTER_NETLINK_ACCT is not set + # CONFIG_NETFILTER_NETLINK_QUEUE is not set + # CONFIG_NETFILTER_NETLINK_LOG is not set + # CONFIG_NETFILTER_NETLINK_OSF is not set + # CONFIG_NF_CONNTRACK is not set + # CONFIG_NF_LOG_SYSLOG is not set +-# CONFIG_NF_TABLES is not set ++CONFIG_NF_TABLES=m ++CONFIG_NF_TABLES_INET=y ++CONFIG_NF_TABLES_NETDEV=y ++# CONFIG_NFT_NUMGEN is not set ++# CONFIG_NFT_LOG is not set ++# CONFIG_NFT_LIMIT is not set ++# CONFIG_NFT_TUNNEL is not set ++# CONFIG_NFT_QUOTA is not set ++# CONFIG_NFT_REJECT is not set ++# CONFIG_NFT_COMPAT is not set ++# CONFIG_NFT_HASH is not set ++# CONFIG_NFT_SOCKET is not set ++# CONFIG_NFT_OSF is not set ++# CONFIG_NFT_TPROXY is not set ++# CONFIG_NF_DUP_NETDEV is not set ++# CONFIG_NFT_DUP_NETDEV is not set ++# CONFIG_NFT_FWD_NETDEV is not set + CONFIG_NETFILTER_XTABLES=m + CONFIG_NETFILTER_XTABLES_COMPAT=y + +@@ -1312,6 +1382,10 @@ + # + # CONFIG_NF_SOCKET_IPV4 is not set + # CONFIG_NF_TPROXY_IPV4 is not set ++CONFIG_NF_TABLES_IPV4=y ++# CONFIG_NFT_DUP_IPV4 is not set ++# CONFIG_NFT_FIB_IPV4 is not set ++CONFIG_NF_TABLES_ARP=y + # CONFIG_NF_DUP_IPV4 is not set + # CONFIG_NF_LOG_ARP is not set + # CONFIG_NF_LOG_IPV4 is not set +@@ -1332,6 +1406,9 @@ + # + # CONFIG_NF_SOCKET_IPV6 is not set + # CONFIG_NF_TPROXY_IPV6 is not set ++CONFIG_NF_TABLES_IPV6=y ++# CONFIG_NFT_DUP_IPV6 is not set ++# CONFIG_NFT_FIB_IPV6 is not set + # CONFIG_NF_DUP_IPV6 is not set + # CONFIG_NF_REJECT_IPV6 is not set + # CONFIG_NF_LOG_IPV6 is not set +@@ -1429,7 +1506,7 @@ + # CONFIG_NET_ACT_IFE is not set + # CONFIG_NET_ACT_TUNNEL_KEY is not set + # CONFIG_NET_ACT_GATE is not set +-# CONFIG_NET_TC_SKB_EXT is not set ++CONFIG_NET_TC_SKB_EXT=y + CONFIG_NET_SCH_FIFO=y + CONFIG_DCB=y + CONFIG_DNS_RESOLVER=y +@@ -1444,9 +1521,10 @@ + # CONFIG_HSR is not set + CONFIG_NET_SWITCHDEV=y + CONFIG_NET_L3_MASTER_DEV=y +-# CONFIG_QRTR is not set ++CONFIG_QRTR=m ++# CONFIG_QRTR_TUN is not set + CONFIG_NET_NCSI=y +-# CONFIG_NCSI_OEM_CMD_GET_MAC is not set ++CONFIG_NCSI_OEM_CMD_GET_MAC=y + # CONFIG_NCSI_OEM_CMD_KEEP_PHY is not set + CONFIG_PCPU_DEV_REFCNT=y + CONFIG_MAX_SKB_FRAGS=17 +@@ -1465,7 +1543,7 @@ + # Network testing + # + # CONFIG_NET_PKTGEN is not set +-# CONFIG_NET_DROP_MONITOR is not set ++CONFIG_NET_DROP_MONITOR=y + # end of Network testing + # end of Networking options + +@@ -1476,18 +1554,79 @@ + # + # CONFIG_AX25 is not set + # CONFIG_CAN is not set +-# CONFIG_BT is not set ++CONFIG_BT=m ++CONFIG_BT_BREDR=y ++CONFIG_BT_RFCOMM=m ++CONFIG_BT_RFCOMM_TTY=y ++CONFIG_BT_BNEP=m ++CONFIG_BT_BNEP_MC_FILTER=y ++CONFIG_BT_BNEP_PROTO_FILTER=y ++# CONFIG_BT_CMTP is not set ++# CONFIG_BT_HIDP is not set ++CONFIG_BT_LE=y ++CONFIG_BT_LE_L2CAP_ECRED=y ++CONFIG_BT_LEDS=y ++CONFIG_BT_MSFTEXT=y ++CONFIG_BT_AOSPEXT=y ++CONFIG_BT_DEBUGFS=y ++# CONFIG_BT_SELFTEST is not set ++ ++# ++# Bluetooth device drivers ++# ++CONFIG_BT_INTEL=m ++CONFIG_BT_BCM=m ++CONFIG_BT_RTL=m ++CONFIG_BT_MTK=m ++CONFIG_BT_HCIBTUSB=m ++CONFIG_BT_HCIBTUSB_AUTOSUSPEND=y ++CONFIG_BT_HCIBTUSB_POLL_SYNC=y ++CONFIG_BT_HCIBTUSB_BCM=y ++CONFIG_BT_HCIBTUSB_MTK=y ++CONFIG_BT_HCIBTUSB_RTL=y ++# CONFIG_BT_HCIBTSDIO is not set ++# CONFIG_BT_HCIUART is not set ++# CONFIG_BT_HCIBCM203X is not set ++# CONFIG_BT_HCIBCM4377 is not set ++# CONFIG_BT_HCIBPA10X is not set ++# CONFIG_BT_HCIBFUSB is not set ++# CONFIG_BT_HCIVHCI is not set ++# CONFIG_BT_MRVL is not set ++# CONFIG_BT_ATH3K is not set ++# CONFIG_BT_MTKSDIO is not set ++# CONFIG_BT_MTKUART is not set ++# CONFIG_BT_VIRTIO is not set ++# CONFIG_BT_NXPUART is not set ++# end of Bluetooth device drivers ++ + # CONFIG_AF_RXRPC is not set + # CONFIG_AF_KCM is not set + CONFIG_STREAM_PARSER=y +-# CONFIG_MCTP is not set ++CONFIG_MCTP=y + CONFIG_FIB_RULES=y + CONFIG_WIRELESS=y +-# CONFIG_CFG80211 is not set +- +-# +-# CFG80211 needs to be enabled for MAC80211 +-# ++CONFIG_WEXT_CORE=y ++CONFIG_WEXT_PROC=y ++CONFIG_CFG80211=m ++# CONFIG_NL80211_TESTMODE is not set ++# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set ++# CONFIG_CFG80211_CERTIFICATION_ONUS is not set ++CONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y ++CONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y ++CONFIG_CFG80211_DEFAULT_PS=y ++CONFIG_CFG80211_DEBUGFS=y ++CONFIG_CFG80211_CRDA_SUPPORT=y ++CONFIG_CFG80211_WEXT=y ++CONFIG_MAC80211=m ++CONFIG_MAC80211_HAS_RC=y ++CONFIG_MAC80211_RC_MINSTREL=y ++CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y ++CONFIG_MAC80211_RC_DEFAULT="minstrel_ht" ++CONFIG_MAC80211_MESH=y ++CONFIG_MAC80211_LEDS=y ++CONFIG_MAC80211_DEBUGFS=y ++CONFIG_MAC80211_MESSAGE_TRACING=y ++# CONFIG_MAC80211_DEBUG_MENU is not set + CONFIG_MAC80211_STA_HASH_MAX_SIZE=0 + CONFIG_RFKILL=y + CONFIG_RFKILL_LEDS=y +@@ -1505,15 +1644,19 @@ + CONFIG_NET_SELFTESTS=y + CONFIG_NET_SOCK_MSG=y + CONFIG_PAGE_POOL=y +-# CONFIG_PAGE_POOL_STATS is not set +-# CONFIG_FAILOVER is not set ++CONFIG_PAGE_POOL_STATS=y ++CONFIG_FAILOVER=y + CONFIG_ETHTOOL_NETLINK=y + + # + # Device Drivers + # + CONFIG_HAVE_EISA=y +-# CONFIG_EISA is not set ++CONFIG_EISA=y ++CONFIG_EISA_VLB_PRIMING=y ++CONFIG_EISA_PCI_EISA=y ++CONFIG_EISA_VIRTUAL_ROOT=y ++CONFIG_EISA_NAMES=y + CONFIG_HAVE_PCI=y + CONFIG_PCI=y + CONFIG_PCI_DOMAINS=y +@@ -1530,7 +1673,7 @@ + CONFIG_PCIE_PME=y + CONFIG_PCIE_DPC=y + CONFIG_PCIE_PTM=y +-# CONFIG_PCIE_EDR is not set ++CONFIG_PCIE_EDR=y + CONFIG_PCI_MSI=y + CONFIG_PCI_QUIRKS=y + # CONFIG_PCI_DEBUG is not set +@@ -1543,7 +1686,7 @@ + CONFIG_PCI_IOV=y + CONFIG_PCI_PRI=y + CONFIG_PCI_PASID=y +-# CONFIG_PCI_P2PDMA is not set ++CONFIG_PCI_P2PDMA=y + CONFIG_PCI_LABEL=y + # CONFIG_PCIE_BUS_TUNE_OFF is not set + CONFIG_PCIE_BUS_DEFAULT=y +@@ -1558,7 +1701,7 @@ + CONFIG_HOTPLUG_PCI_CPCI=y + # CONFIG_HOTPLUG_PCI_CPCI_ZT5550 is not set + # CONFIG_HOTPLUG_PCI_CPCI_GENERIC is not set +-# CONFIG_HOTPLUG_PCI_SHPC is not set ++CONFIG_HOTPLUG_PCI_SHPC=y + + # + # PCI controller drivers +@@ -1573,9 +1716,13 @@ + # + # DesignWare-based PCIe controllers + # ++CONFIG_PCIE_DW=y ++CONFIG_PCIE_DW_HOST=y ++CONFIG_PCIE_DW_EP=y + # CONFIG_PCI_MESON is not set +-# CONFIG_PCIE_DW_PLAT_HOST is not set +-# CONFIG_PCIE_DW_PLAT_EP is not set ++CONFIG_PCIE_DW_PLAT=y ++CONFIG_PCIE_DW_PLAT_HOST=y ++CONFIG_PCIE_DW_PLAT_EP=y + # end of DesignWare-based PCIe controllers + + # +@@ -1622,11 +1769,12 @@ + # + # Generic Driver Options + # ++CONFIG_AUXILIARY_BUS=y + CONFIG_UEVENT_HELPER=y + CONFIG_UEVENT_HELPER_PATH="" + CONFIG_DEVTMPFS=y + CONFIG_DEVTMPFS_MOUNT=y +-# CONFIG_DEVTMPFS_SAFE is not set ++CONFIG_DEVTMPFS_SAFE=y + # CONFIG_STANDALONE is not set + CONFIG_PREVENT_FIRMWARE_BUILD=y + +@@ -1640,15 +1788,20 @@ + CONFIG_EXTRA_FIRMWARE="" + CONFIG_FW_LOADER_USER_HELPER=y + # CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set +-# CONFIG_FW_LOADER_COMPRESS is not set ++CONFIG_FW_LOADER_COMPRESS=y ++CONFIG_FW_LOADER_COMPRESS_XZ=y ++CONFIG_FW_LOADER_COMPRESS_ZSTD=y + CONFIG_FW_CACHE=y +-# CONFIG_FW_UPLOAD is not set ++CONFIG_FW_UPLOAD=y + # end of Firmware loader + ++CONFIG_WANT_DEV_COREDUMP=y + CONFIG_ALLOW_DEV_COREDUMP=y ++CONFIG_DEV_COREDUMP=y + # CONFIG_DEBUG_DRIVER is not set + # CONFIG_DEBUG_DEVRES is not set + # CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set ++CONFIG_HMEM_REPORTING=y + # CONFIG_TEST_ASYNC_DRIVER_PROBE is not set + CONFIG_SYS_HYPERVISOR=y + CONFIG_GENERIC_CPU_AUTOPROBE=y +@@ -1691,19 +1844,21 @@ + CONFIG_EDD_OFF=y + CONFIG_FIRMWARE_MEMMAP=y + CONFIG_DMIID=y +-# CONFIG_DMI_SYSFS is not set ++CONFIG_DMI_SYSFS=m + CONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y + # CONFIG_ISCSI_IBFT is not set + # CONFIG_FW_CFG_SYSFS is not set + CONFIG_SYSFB=y +-# CONFIG_SYSFB_SIMPLEFB is not set ++CONFIG_SYSFB_SIMPLEFB=y + # CONFIG_GOOGLE_FIRMWARE is not set + + # + # EFI (Extensible Firmware Interface) Support + # + CONFIG_EFI_ESRT=y +-# CONFIG_EFI_VARS_PSTORE is not set ++CONFIG_EFI_VARS_PSTORE=m ++# CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE is not set ++CONFIG_EFI_SOFT_RESERVE=y + CONFIG_EFI_DXE_MEM_ATTRIBUTES=y + CONFIG_EFI_RUNTIME_WRAPPERS=y + # CONFIG_EFI_BOOTLOADER_CONTROL is not set +@@ -1712,12 +1867,12 @@ + CONFIG_EFI_DEV_PATH_PARSER=y + CONFIG_APPLE_PROPERTIES=y + CONFIG_RESET_ATTACK_MITIGATION=y +-# CONFIG_EFI_RCI2_TABLE is not set ++CONFIG_EFI_RCI2_TABLE=y + # CONFIG_EFI_DISABLE_PCI_DMA is not set + CONFIG_EFI_EARLYCON=y + CONFIG_EFI_CUSTOM_SSDT_OVERLAYS=y + # CONFIG_EFI_DISABLE_RUNTIME is not set +-# CONFIG_EFI_COCO_SECRET is not set ++CONFIG_EFI_COCO_SECRET=y + CONFIG_UNACCEPTED_MEMORY=y + # end of EFI (Extensible Firmware Interface) Support + +@@ -1762,21 +1917,16 @@ + # CONFIG_ATA_OVER_ETH is not set + CONFIG_XEN_BLKDEV_FRONTEND=y + # CONFIG_XEN_BLKDEV_BACKEND is not set +-# CONFIG_VIRTIO_BLK is not set ++CONFIG_VIRTIO_BLK=y + # CONFIG_BLK_DEV_RBD is not set + # CONFIG_BLK_DEV_UBLK is not set + + # + # NVME Support + # +-CONFIG_NVME_CORE=y +-CONFIG_BLK_DEV_NVME=y +-CONFIG_NVME_MULTIPATH=y +-# CONFIG_NVME_VERBOSE_ERRORS is not set +-# CONFIG_NVME_HWMON is not set ++# CONFIG_BLK_DEV_NVME is not set + # CONFIG_NVME_FC is not set + # CONFIG_NVME_TCP is not set +-# CONFIG_NVME_AUTH is not set + # CONFIG_NVME_TARGET is not set + # end of NVME Support + +@@ -1790,7 +1940,9 @@ + # CONFIG_TIFM_CORE is not set + # CONFIG_ICS932S401 is not set + # CONFIG_ENCLOSURE_SERVICES is not set ++# CONFIG_SGI_XP is not set + # CONFIG_HP_ILO is not set ++# CONFIG_SGI_GRU is not set + # CONFIG_APDS9802ALS is not set + # CONFIG_ISL29003 is not set + # CONFIG_ISL29020 is not set +@@ -1804,6 +1956,7 @@ + # CONFIG_DW_XDATA_PCIE is not set + # CONFIG_PCI_ENDPOINT_TEST is not set + # CONFIG_XILINX_SDFEC is not set ++CONFIG_MISC_RTSX=m + # CONFIG_C2PORT is not set + + # +@@ -1816,7 +1969,7 @@ + # CONFIG_EEPROM_93CX6 is not set + # CONFIG_EEPROM_93XX46 is not set + # CONFIG_EEPROM_IDT_89HPESX is not set +-# CONFIG_EEPROM_EE1004 is not set ++CONFIG_EEPROM_EE1004=m + # end of EEPROM support + + # CONFIG_CB710_CORE is not set +@@ -1829,18 +1982,24 @@ + + # CONFIG_SENSORS_LIS3_I2C is not set + # CONFIG_ALTERA_STAPL is not set +-# CONFIG_INTEL_MEI is not set +-# CONFIG_INTEL_MEI_ME is not set ++CONFIG_INTEL_MEI=m ++CONFIG_INTEL_MEI_ME=m + # CONFIG_INTEL_MEI_TXE is not set ++# CONFIG_INTEL_MEI_GSC is not set ++CONFIG_INTEL_MEI_HDCP=m ++CONFIG_INTEL_MEI_PXP=m ++# CONFIG_INTEL_MEI_GSC_PROXY is not set + # CONFIG_VMWARE_VMCI is not set + # CONFIG_GENWQE is not set + # CONFIG_ECHO is not set + # CONFIG_BCM_VK is not set + # CONFIG_MISC_ALCOR_PCI is not set +-# CONFIG_MISC_RTSX_PCI is not set ++CONFIG_MISC_RTSX_PCI=m + # CONFIG_MISC_RTSX_USB is not set + # CONFIG_UACCE is not set +-# CONFIG_PVPANIC is not set ++CONFIG_PVPANIC=y ++# CONFIG_PVPANIC_MMIO is not set ++# CONFIG_PVPANIC_PCI is not set + # CONFIG_GP_PCI1XXXX is not set + # end of Misc devices + +@@ -1890,6 +2049,7 @@ + # CONFIG_SCSI_3W_9XXX is not set + # CONFIG_SCSI_3W_SAS is not set + # CONFIG_SCSI_ACARD is not set ++# CONFIG_SCSI_AHA1740 is not set + # CONFIG_SCSI_AACRAID is not set + # CONFIG_SCSI_AIC7XXX is not set + # CONFIG_SCSI_AIC79XX is not set +@@ -1927,13 +2087,14 @@ + # CONFIG_SCSI_IPR is not set + # CONFIG_SCSI_QLOGIC_1280 is not set + # CONFIG_SCSI_QLA_ISCSI is not set ++# CONFIG_SCSI_SIM710 is not set + # CONFIG_SCSI_DC395x is not set + # CONFIG_SCSI_AM53C974 is not set + # CONFIG_SCSI_WD719X is not set + # CONFIG_SCSI_DEBUG is not set + # CONFIG_SCSI_PMCRAID is not set + # CONFIG_SCSI_PM8001 is not set +-# CONFIG_SCSI_VIRTIO is not set ++CONFIG_SCSI_VIRTIO=y + CONFIG_SCSI_DH=y + # CONFIG_SCSI_DH_RDAC is not set + # CONFIG_SCSI_DH_HP_SW is not set +@@ -1954,9 +2115,9 @@ + # Controllers with non-SFF native interface + # + CONFIG_SATA_AHCI=m +-CONFIG_SATA_MOBILE_LPM_POLICY=0 ++CONFIG_SATA_MOBILE_LPM_POLICY=3 + CONFIG_SATA_AHCI_PLATFORM=m +-# CONFIG_AHCI_DWC is not set ++CONFIG_AHCI_DWC=m + # CONFIG_SATA_INIC162X is not set + CONFIG_SATA_ACARD_AHCI=m + # CONFIG_SATA_SIL24 is not set +@@ -2068,7 +2229,7 @@ + # CONFIG_DM_MULTIPATH is not set + # CONFIG_DM_DELAY is not set + # CONFIG_DM_DUST is not set +-# CONFIG_DM_INIT is not set ++CONFIG_DM_INIT=y + CONFIG_DM_UEVENT=y + # CONFIG_DM_FLAKEY is not set + # CONFIG_DM_VERITY is not set +@@ -2076,7 +2237,7 @@ + # CONFIG_DM_LOG_WRITES is not set + # CONFIG_DM_INTEGRITY is not set + # CONFIG_DM_ZONED is not set +-# CONFIG_DM_AUDIT is not set ++CONFIG_DM_AUDIT=y + # CONFIG_TARGET_CORE is not set + CONFIG_FUSION=y + # CONFIG_FUSION_SPI is not set +@@ -2114,12 +2275,13 @@ + CONFIG_TUN=y + # CONFIG_TUN_VNET_CROSS_LE is not set + # CONFIG_VETH is not set +-# CONFIG_VIRTIO_NET is not set ++CONFIG_VIRTIO_NET=y + # CONFIG_NLMON is not set + # CONFIG_NET_VRF is not set + # CONFIG_ARCNET is not set + CONFIG_ETHERNET=y + CONFIG_NET_VENDOR_3COM=y ++# CONFIG_EL3 is not set + # CONFIG_VORTEX is not set + # CONFIG_TYPHOON is not set + CONFIG_NET_VENDOR_ADAPTEC=y +@@ -2166,7 +2328,7 @@ + # CONFIG_THUNDER_NIC_VF is not set + # CONFIG_THUNDER_NIC_BGX is not set + # CONFIG_THUNDER_NIC_RGX is not set +-CONFIG_CAVIUM_PTP=y ++# CONFIG_CAVIUM_PTP is not set + # CONFIG_LIQUIDIO is not set + # CONFIG_LIQUIDIO_VF is not set + CONFIG_NET_VENDOR_CHELSIO=y +@@ -2174,6 +2336,7 @@ + # CONFIG_CHELSIO_T3 is not set + # CONFIG_CHELSIO_T4 is not set + # CONFIG_CHELSIO_T4VF is not set ++CONFIG_NET_VENDOR_CIRRUS=y + CONFIG_NET_VENDOR_CISCO=y + # CONFIG_ENIC is not set + CONFIG_NET_VENDOR_CORTINA=y +@@ -2238,7 +2401,7 @@ + # CONFIG_ENC28J60 is not set + # CONFIG_ENCX24J600 is not set + # CONFIG_LAN743X is not set +-# CONFIG_VCAP is not set ++CONFIG_VCAP=y + CONFIG_NET_VENDOR_MICROSEMI=y + CONFIG_NET_VENDOR_MICROSOFT=y + CONFIG_NET_VENDOR_MYRI=y +@@ -2350,7 +2513,7 @@ + # CONFIG_BROADCOM_PHY is not set + # CONFIG_BCM54140_PHY is not set + # CONFIG_BCM7XXX_PHY is not set +-# CONFIG_BCM84881_PHY is not set ++CONFIG_BCM84881_PHY=y + # CONFIG_BCM87XX_PHY is not set + # CONFIG_CICADA_PHY is not set + # CONFIG_CORTINA_PHY is not set +@@ -2393,7 +2556,15 @@ + # CONFIG_VITESSE_PHY is not set + # CONFIG_XILINX_GMII2RGMII is not set + # CONFIG_MICREL_KS8995MA is not set +-# CONFIG_PSE_CONTROLLER is not set ++CONFIG_PSE_CONTROLLER=y ++# CONFIG_PSE_REGULATOR is not set ++ ++# ++# MCTP Device Drivers ++# ++# CONFIG_MCTP_SERIAL is not set ++# end of MCTP Device Drivers ++ + CONFIG_MDIO_DEVICE=y + CONFIG_MDIO_BUS=y + CONFIG_FWNODE_MDIO=y +@@ -2430,27 +2601,105 @@ + # CONFIG_USB_NET_DRIVERS is not set + CONFIG_WLAN=y + CONFIG_WLAN_VENDOR_ADMTEK=y ++# CONFIG_ADM8211 is not set + CONFIG_WLAN_VENDOR_ATH=y + # CONFIG_ATH_DEBUG is not set ++# CONFIG_ATH5K is not set + CONFIG_ATH5K_PCI=y ++# CONFIG_ATH9K is not set ++# CONFIG_ATH9K_HTC is not set ++# CONFIG_CARL9170 is not set ++# CONFIG_ATH6KL is not set ++# CONFIG_AR5523 is not set ++# CONFIG_WIL6210 is not set ++# CONFIG_ATH10K is not set ++# CONFIG_WCN36XX is not set + CONFIG_WLAN_VENDOR_ATMEL=y ++# CONFIG_ATMEL is not set ++# CONFIG_AT76C50X_USB is not set + CONFIG_WLAN_VENDOR_BROADCOM=y ++# CONFIG_B43 is not set ++# CONFIG_B43LEGACY is not set ++# CONFIG_BRCMSMAC is not set ++# CONFIG_BRCMFMAC is not set + CONFIG_WLAN_VENDOR_CISCO=y ++# CONFIG_AIRO is not set + CONFIG_WLAN_VENDOR_INTEL=y ++# CONFIG_IPW2100 is not set ++# CONFIG_IPW2200 is not set ++# CONFIG_IWL4965 is not set ++# CONFIG_IWL3945 is not set ++CONFIG_IWLWIFI=m ++CONFIG_IWLWIFI_LEDS=y ++# CONFIG_IWLDVM is not set ++CONFIG_IWLMVM=m ++CONFIG_IWLWIFI_OPMODE_MODULAR=y ++ ++# ++# Debugging Options ++# ++# CONFIG_IWLWIFI_DEBUG is not set ++CONFIG_IWLWIFI_DEBUGFS=y ++CONFIG_IWLWIFI_DEVICE_TRACING=y ++# end of Debugging Options ++ + CONFIG_WLAN_VENDOR_INTERSIL=y + # CONFIG_HOSTAP is not set ++# CONFIG_HERMES is not set ++# CONFIG_P54_COMMON is not set + CONFIG_WLAN_VENDOR_MARVELL=y ++# CONFIG_LIBERTAS is not set ++# CONFIG_LIBERTAS_THINFIRM is not set ++# CONFIG_MWIFIEX is not set ++# CONFIG_MWL8K is not set + CONFIG_WLAN_VENDOR_MEDIATEK=y ++# CONFIG_MT7601U is not set ++# CONFIG_MT76x0U is not set ++# CONFIG_MT76x0E is not set ++# CONFIG_MT76x2E is not set ++# CONFIG_MT76x2U is not set ++# CONFIG_MT7603E is not set ++# CONFIG_MT7615E is not set ++# CONFIG_MT7663U is not set ++# CONFIG_MT7663S is not set ++# CONFIG_MT7915E is not set ++# CONFIG_MT7921E is not set ++# CONFIG_MT7921S is not set ++# CONFIG_MT7921U is not set ++# CONFIG_MT7996E is not set + CONFIG_WLAN_VENDOR_MICROCHIP=y ++# CONFIG_WILC1000_SDIO is not set ++# CONFIG_WILC1000_SPI is not set + CONFIG_WLAN_VENDOR_PURELIFI=y ++# CONFIG_PLFXLC is not set + CONFIG_WLAN_VENDOR_RALINK=y ++# CONFIG_RT2X00 is not set + CONFIG_WLAN_VENDOR_REALTEK=y ++# CONFIG_RTL8180 is not set ++# CONFIG_RTL8187 is not set ++# CONFIG_RTL_CARDS is not set ++# CONFIG_RTL8XXXU is not set ++# CONFIG_RTW88 is not set ++# CONFIG_RTW89 is not set + CONFIG_WLAN_VENDOR_RSI=y ++# CONFIG_RSI_91X is not set + CONFIG_WLAN_VENDOR_SILABS=y ++# CONFIG_WFX is not set + CONFIG_WLAN_VENDOR_ST=y ++# CONFIG_CW1200 is not set + CONFIG_WLAN_VENDOR_TI=y ++# CONFIG_WL1251 is not set ++# CONFIG_WL12XX is not set ++# CONFIG_WL18XX is not set ++# CONFIG_WLCORE is not set + CONFIG_WLAN_VENDOR_ZYDAS=y ++# CONFIG_USB_ZD1201 is not set ++# CONFIG_ZD1211RW is not set + CONFIG_WLAN_VENDOR_QUANTENNA=y ++# CONFIG_QTNFMAC_PCIE is not set ++# CONFIG_USB_NET_RNDIS_WLAN is not set ++# CONFIG_MAC80211_HWSIM is not set ++# CONFIG_VIRT_WIFI is not set + CONFIG_WAN=y + # CONFIG_HDLC is not set + +@@ -2465,8 +2714,9 @@ + # CONFIG_VMXNET3 is not set + # CONFIG_FUJITSU_ES is not set + # CONFIG_NETDEVSIM is not set +-# CONFIG_NET_FAILOVER is not set ++CONFIG_NET_FAILOVER=y + CONFIG_ISDN=y ++CONFIG_ISDN_CAPI=y + # CONFIG_MISDN is not set + + # +@@ -2486,7 +2736,7 @@ + CONFIG_INPUT_MOUSEDEV_PSAUX=y + CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 + CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +-# CONFIG_INPUT_JOYDEV is not set ++CONFIG_INPUT_JOYDEV=m + CONFIG_INPUT_EVDEV=y + # CONFIG_INPUT_EVBUG is not set + +@@ -2525,7 +2775,22 @@ + # CONFIG_KEYBOARD_XTKBD is not set + # CONFIG_KEYBOARD_CYPRESS_SF is not set + CONFIG_INPUT_MOUSE=y +-# CONFIG_MOUSE_PS2 is not set ++CONFIG_MOUSE_PS2=m ++CONFIG_MOUSE_PS2_ALPS=y ++CONFIG_MOUSE_PS2_BYD=y ++CONFIG_MOUSE_PS2_LOGIPS2PP=y ++CONFIG_MOUSE_PS2_SYNAPTICS=y ++CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS=y ++CONFIG_MOUSE_PS2_CYPRESS=y ++CONFIG_MOUSE_PS2_LIFEBOOK=y ++CONFIG_MOUSE_PS2_TRACKPOINT=y ++CONFIG_MOUSE_PS2_ELANTECH=y ++CONFIG_MOUSE_PS2_ELANTECH_SMBUS=y ++CONFIG_MOUSE_PS2_SENTELIC=y ++CONFIG_MOUSE_PS2_TOUCHKIT=y ++CONFIG_MOUSE_PS2_FOCALTECH=y ++CONFIG_MOUSE_PS2_VMMOUSE=y ++CONFIG_MOUSE_PS2_SMBUS=y + # CONFIG_MOUSE_SERIAL is not set + # CONFIG_MOUSE_APPLETOUCH is not set + # CONFIG_MOUSE_BCM5974 is not set +@@ -2709,7 +2974,7 @@ + # CONFIG_SERIO_PARKBD is not set + # CONFIG_SERIO_PCIPS2 is not set + CONFIG_SERIO_LIBPS2=y +-# CONFIG_SERIO_RAW is not set ++CONFIG_SERIO_RAW=m + # CONFIG_SERIO_ALTERA_PS2 is not set + # CONFIG_SERIO_PS2MULT is not set + # CONFIG_SERIO_ARC_PS2 is not set +@@ -2732,7 +2997,7 @@ + CONFIG_UNIX98_PTYS=y + CONFIG_LEGACY_PTYS=y + CONFIG_LEGACY_PTY_COUNT=0 +-CONFIG_LEGACY_TIOCSTI=y ++# CONFIG_LEGACY_TIOCSTI is not set + CONFIG_LDISC_AUTOLOAD=y + + # +@@ -2742,7 +3007,7 @@ + CONFIG_SERIAL_8250=y + # CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set + CONFIG_SERIAL_8250_PNP=y +-# CONFIG_SERIAL_8250_16550A_VARIANTS is not set ++CONFIG_SERIAL_8250_16550A_VARIANTS=y + CONFIG_SERIAL_8250_FINTEK=y + CONFIG_SERIAL_8250_CONSOLE=y + CONFIG_SERIAL_8250_DMA=y +@@ -2760,8 +3025,8 @@ + # CONFIG_SERIAL_8250_DW is not set + CONFIG_SERIAL_8250_RT288X=y + # CONFIG_SERIAL_8250_LPSS is not set +-# CONFIG_SERIAL_8250_MID is not set +-CONFIG_SERIAL_8250_PERICOM=y ++CONFIG_SERIAL_8250_MID=y ++# CONFIG_SERIAL_8250_PERICOM is not set + + # + # Non-8250 serial port support +@@ -2825,6 +3090,7 @@ + CONFIG_HPET_MMAP=y + CONFIG_HPET_MMAP_DEFAULT=y + # CONFIG_HANGCHECK_TIMER is not set ++# CONFIG_UV_MMTIMER is not set + CONFIG_TCG_TPM=y + CONFIG_HW_RANDOM_TPM=y + CONFIG_TCG_TIS_CORE=y +@@ -2858,6 +3124,8 @@ + CONFIG_I2C_CHARDEV=y + # CONFIG_I2C_MUX is not set + CONFIG_I2C_HELPER_AUTO=y ++CONFIG_I2C_SMBUS=m ++CONFIG_I2C_ALGOBIT=m + + # + # I2C Hardware Bus support +@@ -2872,7 +3140,7 @@ + # CONFIG_I2C_AMD756 is not set + # CONFIG_I2C_AMD8111 is not set + # CONFIG_I2C_AMD_MP2 is not set +-# CONFIG_I2C_I801 is not set ++CONFIG_I2C_I801=m + # CONFIG_I2C_ISCH is not set + # CONFIG_I2C_ISMT is not set + # CONFIG_I2C_PIIX4 is not set +@@ -3001,10 +3269,8 @@ + # + CONFIG_PTP_1588_CLOCK=y + CONFIG_PTP_1588_CLOCK_OPTIONAL=y +- +-# +-# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. +-# ++# CONFIG_DP83640_PHY is not set ++# CONFIG_PTP_1588_CLOCK_INES is not set + # CONFIG_PTP_1588_CLOCK_KVM is not set + # CONFIG_PTP_1588_CLOCK_IDT82P33 is not set + # CONFIG_PTP_1588_CLOCK_IDTCM is not set +@@ -3031,12 +3297,12 @@ + CONFIG_PINCTRL_INTEL=y + # CONFIG_PINCTRL_ALDERLAKE is not set + # CONFIG_PINCTRL_BROXTON is not set +-CONFIG_PINCTRL_CANNONLAKE=y ++# CONFIG_PINCTRL_CANNONLAKE is not set + # CONFIG_PINCTRL_CEDARFORK is not set + # CONFIG_PINCTRL_DENVERTON is not set + # CONFIG_PINCTRL_ELKHARTLAKE is not set + # CONFIG_PINCTRL_EMMITSBURG is not set +-# CONFIG_PINCTRL_GEMINILAKE is not set ++CONFIG_PINCTRL_GEMINILAKE=m + # CONFIG_PINCTRL_ICELAKE is not set + # CONFIG_PINCTRL_JASPERLAKE is not set + # CONFIG_PINCTRL_LAKEFIELD is not set +@@ -3059,13 +3325,14 @@ + CONFIG_GPIO_SYSFS=y + CONFIG_GPIO_CDEV=y + CONFIG_GPIO_CDEV_V1=y ++CONFIG_GPIO_GENERIC=y + + # + # Memory mapped GPIO drivers + # + # CONFIG_GPIO_AMDPT is not set + # CONFIG_GPIO_DWAPB is not set +-# CONFIG_GPIO_GENERIC_PLATFORM is not set ++CONFIG_GPIO_GENERIC_PLATFORM=y + # CONFIG_GPIO_MB86S7X is not set + # CONFIG_GPIO_AMD_FCH is not set + # end of Memory mapped GPIO drivers +@@ -3102,7 +3369,7 @@ + # MFD GPIO expanders + # + # CONFIG_GPIO_ADP5520 is not set +-# CONFIG_GPIO_CRYSTAL_COVE is not set ++CONFIG_GPIO_CRYSTAL_COVE=y + # CONFIG_GPIO_DA9052 is not set + # CONFIG_GPIO_DA9055 is not set + # CONFIG_GPIO_ELKHARTLAKE is not set +@@ -3171,7 +3438,7 @@ + # CONFIG_BATTERY_DS2780 is not set + # CONFIG_BATTERY_DS2781 is not set + # CONFIG_BATTERY_DS2782 is not set +-# CONFIG_BATTERY_SAMSUNG_SDI is not set ++CONFIG_BATTERY_SAMSUNG_SDI=y + # CONFIG_BATTERY_SBS is not set + # CONFIG_CHARGER_SBS is not set + # CONFIG_BATTERY_BQ27XXX is not set +@@ -3262,7 +3529,7 @@ + # CONFIG_SENSORS_HIH6130 is not set + # CONFIG_SENSORS_HS3001 is not set + # CONFIG_SENSORS_I5500 is not set +-# CONFIG_SENSORS_CORETEMP is not set ++CONFIG_SENSORS_CORETEMP=m + # CONFIG_SENSORS_IT87 is not set + # CONFIG_SENSORS_JC42 is not set + # CONFIG_SENSORS_POWR1220 is not set +@@ -3297,6 +3564,7 @@ + # CONFIG_SENSORS_MAX31790 is not set + # CONFIG_SENSORS_MC34VR500 is not set + # CONFIG_SENSORS_MCP3021 is not set ++# CONFIG_SENSORS_MLXREG_FAN is not set + # CONFIG_SENSORS_TC654 is not set + # CONFIG_SENSORS_TPS23861 is not set + # CONFIG_SENSORS_MR75203 is not set +@@ -3394,28 +3662,31 @@ + # CONFIG_SENSORS_ASUS_EC is not set + # CONFIG_SENSORS_HP_WMI is not set + CONFIG_THERMAL=y +-# CONFIG_THERMAL_NETLINK is not set +-# CONFIG_THERMAL_STATISTICS is not set ++CONFIG_THERMAL_NETLINK=y ++CONFIG_THERMAL_STATISTICS=y + CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0 + CONFIG_THERMAL_HWMON=y + CONFIG_THERMAL_WRITABLE_TRIPS=y + CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y + # CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set + # CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set ++# CONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR is not set + # CONFIG_THERMAL_DEFAULT_GOV_BANG_BANG is not set + CONFIG_THERMAL_GOV_FAIR_SHARE=y + CONFIG_THERMAL_GOV_STEP_WISE=y + CONFIG_THERMAL_GOV_BANG_BANG=y + CONFIG_THERMAL_GOV_USER_SPACE=y ++CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y + CONFIG_DEVFREQ_THERMAL=y + CONFIG_THERMAL_EMULATION=y + + # + # Intel thermal drivers + # +-# CONFIG_INTEL_POWERCLAMP is not set ++CONFIG_INTEL_POWERCLAMP=m + CONFIG_X86_THERMAL_VECTOR=y +-# CONFIG_X86_PKG_TEMP_THERMAL is not set ++CONFIG_INTEL_TCC=y ++CONFIG_X86_PKG_TEMP_THERMAL=m + # CONFIG_INTEL_SOC_DTS_THERMAL is not set + + # +@@ -3426,7 +3697,7 @@ + + # CONFIG_INTEL_PCH_THERMAL is not set + # CONFIG_INTEL_TCC_COOLING is not set +-# CONFIG_INTEL_HFI_THERMAL is not set ++CONFIG_INTEL_HFI_THERMAL=y + # end of Intel thermal drivers + + CONFIG_WATCHDOG=y +@@ -3458,6 +3729,7 @@ + # CONFIG_WM8350_WATCHDOG is not set + # CONFIG_XILINX_WATCHDOG is not set + # CONFIG_ZIIRAVE_WATCHDOG is not set ++# CONFIG_MLX_WDT is not set + # CONFIG_CADENCE_WATCHDOG is not set + # CONFIG_DW_WATCHDOG is not set + # CONFIG_TWL4030_WATCHDOG is not set +@@ -3496,6 +3768,7 @@ + # CONFIG_W83977F_WDT is not set + # CONFIG_MACHZ_WDT is not set + # CONFIG_SBC_EPX_C3_WATCHDOG is not set ++# CONFIG_INTEL_MEI_WDT is not set + # CONFIG_NI903X_WDT is not set + # CONFIG_NIC7018_WDT is not set + # CONFIG_MEN_A21_WDT is not set +@@ -3528,6 +3801,7 @@ + # CONFIG_MFD_BD9571MWV is not set + # CONFIG_MFD_AXP20X_I2C is not set + # CONFIG_MFD_CS42L43_I2C is not set ++# CONFIG_MFD_CS42L43_SDW is not set + # CONFIG_MFD_MADERA is not set + CONFIG_PMIC_DA903X=y + CONFIG_PMIC_DA9052=y +@@ -3545,11 +3819,13 @@ + # CONFIG_LPC_ICH is not set + # CONFIG_LPC_SCH is not set + CONFIG_INTEL_SOC_PMIC=y ++# CONFIG_INTEL_SOC_PMIC_BXTWC is not set + CONFIG_INTEL_SOC_PMIC_CHTWC=y + # CONFIG_INTEL_SOC_PMIC_CHTDC_TI is not set ++# CONFIG_INTEL_SOC_PMIC_MRFLD is not set + # CONFIG_MFD_INTEL_LPSS_ACPI is not set + # CONFIG_MFD_INTEL_LPSS_PCI is not set +-# CONFIG_MFD_INTEL_PMC_BXT is not set ++CONFIG_MFD_INTEL_PMC_BXT=m + # CONFIG_MFD_IQS62X is not set + # CONFIG_MFD_JANZ_CMODIO is not set + # CONFIG_MFD_KEMPLD is not set +@@ -3701,12 +3977,52 @@ + # CONFIG_REGULATOR_WM831X is not set + # CONFIG_REGULATOR_WM8350 is not set + # CONFIG_REGULATOR_WM8400 is not set +-# CONFIG_RC_CORE is not set ++CONFIG_RC_CORE=m ++CONFIG_LIRC=y ++CONFIG_RC_MAP=m ++CONFIG_RC_DECODERS=y ++# CONFIG_IR_IMON_DECODER is not set ++# CONFIG_IR_JVC_DECODER is not set ++# CONFIG_IR_MCE_KBD_DECODER is not set ++# CONFIG_IR_NEC_DECODER is not set ++# CONFIG_IR_RC5_DECODER is not set ++CONFIG_IR_RC6_DECODER=m ++# CONFIG_IR_RCMM_DECODER is not set ++# CONFIG_IR_SANYO_DECODER is not set ++# CONFIG_IR_SHARP_DECODER is not set ++# CONFIG_IR_SONY_DECODER is not set ++# CONFIG_IR_XMP_DECODER is not set ++CONFIG_RC_DEVICES=y ++# CONFIG_IR_ENE is not set ++# CONFIG_IR_FINTEK is not set ++# CONFIG_IR_IGORPLUGUSB is not set ++# CONFIG_IR_IGUANA is not set ++# CONFIG_IR_IMON is not set ++# CONFIG_IR_IMON_RAW is not set ++CONFIG_IR_ITE_CIR=m ++# CONFIG_IR_MCEUSB is not set ++# CONFIG_IR_NUVOTON is not set ++# CONFIG_IR_REDRAT3 is not set ++# CONFIG_IR_SERIAL is not set ++# CONFIG_IR_STREAMZAP is not set ++# CONFIG_IR_TOY is not set ++# CONFIG_IR_TTUSBIR is not set ++# CONFIG_IR_WINBOND_CIR is not set ++# CONFIG_RC_ATI_REMOTE is not set ++# CONFIG_RC_LOOPBACK is not set ++# CONFIG_RC_XBOX_DVD is not set ++CONFIG_CEC_CORE=m + + # + # CEC support + # +-# CONFIG_MEDIA_CEC_SUPPORT is not set ++CONFIG_MEDIA_CEC_RC=y ++CONFIG_MEDIA_CEC_SUPPORT=y ++# CONFIG_CEC_CH7322 is not set ++# CONFIG_CEC_GPIO is not set ++# CONFIG_CEC_SECO is not set ++# CONFIG_USB_PULSE8_CEC is not set ++# CONFIG_USB_RAINSHADOW_CEC is not set + # end of CEC support + + # CONFIG_MEDIA_SUPPORT is not set +@@ -3735,14 +4051,25 @@ + CONFIG_AGP_VIA=y + CONFIG_INTEL_GTT=y + CONFIG_VGA_SWITCHEROO=y +-CONFIG_DRM=m +-CONFIG_DRM_KMS_HELPER=m ++CONFIG_DRM=y ++CONFIG_DRM_MIPI_DSI=y ++# CONFIG_DRM_DEBUG_MM is not set ++CONFIG_DRM_KMS_HELPER=y + # CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS is not set + # CONFIG_DRM_DEBUG_MODESET_LOCK is not set + CONFIG_DRM_FBDEV_EMULATION=y + CONFIG_DRM_FBDEV_OVERALLOC=100 + # CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM is not set + CONFIG_DRM_LOAD_EDID_FIRMWARE=y ++CONFIG_DRM_DISPLAY_HELPER=m ++CONFIG_DRM_DISPLAY_DP_HELPER=y ++CONFIG_DRM_DISPLAY_HDCP_HELPER=y ++CONFIG_DRM_DISPLAY_HDMI_HELPER=y ++CONFIG_DRM_DP_AUX_CHARDEV=y ++CONFIG_DRM_DP_CEC=y ++CONFIG_DRM_TTM=m ++CONFIG_DRM_BUDDY=m ++CONFIG_DRM_GEM_SHMEM_HELPER=y + + # + # I2C encoder or helper chips +@@ -3761,7 +4088,42 @@ + # CONFIG_DRM_RADEON is not set + # CONFIG_DRM_AMDGPU is not set + # CONFIG_DRM_NOUVEAU is not set +-# CONFIG_DRM_I915 is not set ++CONFIG_DRM_I915=m ++CONFIG_DRM_I915_FORCE_PROBE="" ++CONFIG_DRM_I915_CAPTURE_ERROR=y ++CONFIG_DRM_I915_COMPRESS_ERROR=y ++CONFIG_DRM_I915_USERPTR=y ++CONFIG_DRM_I915_PXP=y ++ ++# ++# drm/i915 Debugging ++# ++# CONFIG_DRM_I915_WERROR is not set ++# CONFIG_DRM_I915_DEBUG is not set ++# CONFIG_DRM_I915_DEBUG_MMIO is not set ++# CONFIG_DRM_I915_SW_FENCE_DEBUG_OBJECTS is not set ++# CONFIG_DRM_I915_SW_FENCE_CHECK_DAG is not set ++# CONFIG_DRM_I915_DEBUG_GUC is not set ++# CONFIG_DRM_I915_SELFTEST is not set ++# CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS is not set ++# CONFIG_DRM_I915_DEBUG_VBLANK_EVADE is not set ++# CONFIG_DRM_I915_DEBUG_RUNTIME_PM is not set ++# end of drm/i915 Debugging ++ ++# ++# drm/i915 Profile Guided Optimisation ++# ++CONFIG_DRM_I915_REQUEST_TIMEOUT=20000 ++CONFIG_DRM_I915_FENCE_TIMEOUT=10000 ++CONFIG_DRM_I915_USERFAULT_AUTOSUSPEND=250 ++CONFIG_DRM_I915_HEARTBEAT_INTERVAL=2500 ++CONFIG_DRM_I915_PREEMPT_TIMEOUT=640 ++CONFIG_DRM_I915_PREEMPT_TIMEOUT_COMPUTE=7500 ++CONFIG_DRM_I915_MAX_REQUEST_BUSYWAIT=8000 ++CONFIG_DRM_I915_STOP_TIMEOUT=100 ++CONFIG_DRM_I915_TIMESLICE_DURATION=1 ++# end of drm/i915 Profile Guided Optimisation ++ + # CONFIG_DRM_VGEM is not set + # CONFIG_DRM_VKMS is not set + # CONFIG_DRM_VMWGFX is not set +@@ -3779,6 +4141,7 @@ + # CONFIG_DRM_PANEL_AUO_A030JTN01 is not set + # CONFIG_DRM_PANEL_ILITEK_ILI9341 is not set + # CONFIG_DRM_PANEL_ORISETECH_OTA5601A is not set ++# CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN is not set + # CONFIG_DRM_PANEL_WIDECHIPS_WS2401 is not set + # end of Display Panels + +@@ -3797,7 +4160,7 @@ + # CONFIG_DRM_CIRRUS_QEMU is not set + # CONFIG_DRM_GM12U320 is not set + # CONFIG_DRM_PANEL_MIPI_DBI is not set +-# CONFIG_DRM_SIMPLEDRM is not set ++CONFIG_DRM_SIMPLEDRM=y + # CONFIG_TINYDRM_HX8357D is not set + # CONFIG_TINYDRM_ILI9163 is not set + # CONFIG_TINYDRM_ILI9225 is not set +@@ -3826,8 +4189,8 @@ + CONFIG_FB_IMSTT=y + # CONFIG_FB_VGA16 is not set + # CONFIG_FB_UVESA is not set +-CONFIG_FB_VESA=y +-CONFIG_FB_EFI=y ++# CONFIG_FB_VESA is not set ++# CONFIG_FB_EFI is not set + # CONFIG_FB_N411 is not set + # CONFIG_FB_HGA is not set + # CONFIG_FB_OPENCORES is not set +@@ -3861,7 +4224,6 @@ + # CONFIG_XEN_FBDEV_FRONTEND is not set + # CONFIG_FB_METRONOME is not set + # CONFIG_FB_MB862XX is not set +-CONFIG_FB_SIMPLE=y + # CONFIG_FB_SSD1307 is not set + # CONFIG_FB_SM712 is not set + CONFIG_FB_CORE=y +@@ -3930,13 +4292,15 @@ + # CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set + CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y + CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y +-# CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set ++CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER=y + # end of Console display driver support + + # CONFIG_LOGO is not set + # end of Graphics support + +-# CONFIG_DRM_ACCEL is not set ++CONFIG_DRM_ACCEL=y ++# CONFIG_DRM_ACCEL_HABANALABS is not set ++# CONFIG_DRM_ACCEL_IVPU is not set + CONFIG_SOUND=m + CONFIG_SOUND_OSS_CORE=y + # CONFIG_SOUND_OSS_CORE_PRECLAIM is not set +@@ -3945,29 +4309,31 @@ + CONFIG_SND_PCM=m + CONFIG_SND_HWDEP=m + CONFIG_SND_SEQ_DEVICE=m ++CONFIG_SND_COMPRESS_OFFLOAD=m + CONFIG_SND_JACK=y + CONFIG_SND_JACK_INPUT_DEV=y + CONFIG_SND_OSSEMUL=y + # CONFIG_SND_MIXER_OSS is not set + # CONFIG_SND_PCM_OSS is not set + CONFIG_SND_PCM_TIMER=y +-# CONFIG_SND_HRTIMER is not set ++CONFIG_SND_HRTIMER=m + CONFIG_SND_DYNAMIC_MINORS=y + CONFIG_SND_MAX_CARDS=32 + CONFIG_SND_SUPPORT_OLD_API=y + CONFIG_SND_PROC_FS=y + CONFIG_SND_VERBOSE_PROCFS=y + # CONFIG_SND_VERBOSE_PRINTK is not set +-CONFIG_SND_CTL_FAST_LOOKUP=y ++# CONFIG_SND_CTL_FAST_LOOKUP is not set + # CONFIG_SND_DEBUG is not set + # CONFIG_SND_CTL_INPUT_VALIDATION is not set + CONFIG_SND_VMASTER=y + CONFIG_SND_DMA_SGBUF=y + CONFIG_SND_CTL_LED=m + CONFIG_SND_SEQUENCER=m +-# CONFIG_SND_SEQ_DUMMY is not set ++CONFIG_SND_SEQ_DUMMY=m + # CONFIG_SND_SEQUENCER_OSS is not set +-# CONFIG_SND_SEQ_UMP is not set ++CONFIG_SND_SEQ_HRTIMER_DEFAULT=y ++CONFIG_SND_SEQ_UMP=y + CONFIG_SND_DRIVERS=y + # CONFIG_SND_PCSP is not set + # CONFIG_SND_DUMMY is not set +@@ -4057,6 +4423,11 @@ + CONFIG_SND_HDA_INPUT_BEEP=y + CONFIG_SND_HDA_INPUT_BEEP_MODE=0 + CONFIG_SND_HDA_PATCH_LOADER=y ++# CONFIG_SND_HDA_SCODEC_CS35L41_I2C is not set ++# CONFIG_SND_HDA_SCODEC_CS35L41_SPI is not set ++# CONFIG_SND_HDA_SCODEC_CS35L56_I2C is not set ++# CONFIG_SND_HDA_SCODEC_CS35L56_SPI is not set ++# CONFIG_SND_HDA_SCODEC_TAS2781_I2C is not set + CONFIG_SND_HDA_CODEC_REALTEK=m + # CONFIG_SND_HDA_CODEC_ANALOG is not set + # CONFIG_SND_HDA_CODEC_SIGMATEL is not set +@@ -4070,12 +4441,16 @@ + # CONFIG_SND_HDA_CODEC_CMEDIA is not set + # CONFIG_SND_HDA_CODEC_SI3054 is not set + CONFIG_SND_HDA_GENERIC=m +-CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0 +-# CONFIG_SND_HDA_INTEL_HDMI_SILENT_STREAM is not set ++CONFIG_SND_HDA_POWER_SAVE_DEFAULT=1 ++CONFIG_SND_HDA_INTEL_HDMI_SILENT_STREAM=y + # CONFIG_SND_HDA_CTL_DEV_ID is not set + # end of HD-Audio + + CONFIG_SND_HDA_CORE=m ++CONFIG_SND_HDA_DSP_LOADER=y ++CONFIG_SND_HDA_COMPONENT=y ++CONFIG_SND_HDA_I915=y ++CONFIG_SND_HDA_EXT_CORE=m + CONFIG_SND_HDA_PREALLOC_SIZE=0 + CONFIG_SND_INTEL_NHLT=y + CONFIG_SND_INTEL_DSP_CONFIG=m +@@ -4094,8 +4469,356 @@ + # CONFIG_SND_USB_PODHD is not set + # CONFIG_SND_USB_TONEPORT is not set + # CONFIG_SND_USB_VARIAX is not set +-# CONFIG_SND_SOC is not set ++CONFIG_SND_SOC=m ++CONFIG_SND_SOC_COMPRESS=y ++CONFIG_SND_SOC_TOPOLOGY=y ++CONFIG_SND_SOC_ACPI=m ++# CONFIG_SND_SOC_ADI is not set ++# CONFIG_SND_SOC_AMD_ACP is not set ++# CONFIG_SND_SOC_AMD_ACP3x is not set ++# CONFIG_SND_SOC_AMD_RENOIR is not set ++# CONFIG_SND_SOC_AMD_ACP5x is not set ++# CONFIG_SND_SOC_AMD_ACP6x is not set ++CONFIG_SND_AMD_ACP_CONFIG=m ++# CONFIG_SND_SOC_AMD_ACP_COMMON is not set ++# CONFIG_SND_SOC_AMD_RPL_ACP6x is not set ++# CONFIG_SND_SOC_AMD_PS is not set ++# CONFIG_SND_ATMEL_SOC is not set ++# CONFIG_SND_BCM63XX_I2S_WHISTLER is not set ++# CONFIG_SND_DESIGNWARE_I2S is not set ++ ++# ++# SoC Audio for Freescale CPUs ++# ++ ++# ++# Common SoC Audio options for Freescale CPUs: ++# ++# CONFIG_SND_SOC_FSL_ASRC is not set ++# CONFIG_SND_SOC_FSL_SAI is not set ++# CONFIG_SND_SOC_FSL_AUDMIX is not set ++# CONFIG_SND_SOC_FSL_SSI is not set ++# CONFIG_SND_SOC_FSL_SPDIF is not set ++# CONFIG_SND_SOC_FSL_ESAI is not set ++# CONFIG_SND_SOC_FSL_MICFIL is not set ++# CONFIG_SND_SOC_FSL_XCVR is not set ++# CONFIG_SND_SOC_IMX_AUDMUX is not set ++# end of SoC Audio for Freescale CPUs ++ ++# CONFIG_SND_SOC_CHV3_I2S is not set ++# CONFIG_SND_I2S_HI6210_I2S is not set ++CONFIG_SND_SOC_IMG=y ++# CONFIG_SND_SOC_IMG_I2S_IN is not set ++# CONFIG_SND_SOC_IMG_I2S_OUT is not set ++# CONFIG_SND_SOC_IMG_PARALLEL_OUT is not set ++# CONFIG_SND_SOC_IMG_SPDIF_IN is not set ++# CONFIG_SND_SOC_IMG_SPDIF_OUT is not set ++# CONFIG_SND_SOC_IMG_PISTACHIO_INTERNAL_DAC is not set ++CONFIG_SND_SOC_INTEL_SST_TOPLEVEL=y ++CONFIG_SND_SOC_INTEL_SST=m ++# CONFIG_SND_SOC_INTEL_CATPT is not set ++# CONFIG_SND_SST_ATOM_HIFI2_PLATFORM_PCI is not set ++# CONFIG_SND_SST_ATOM_HIFI2_PLATFORM_ACPI is not set ++# CONFIG_SND_SOC_INTEL_SKYLAKE is not set ++CONFIG_SND_SOC_INTEL_SKL=m ++# CONFIG_SND_SOC_INTEL_APL is not set ++# CONFIG_SND_SOC_INTEL_KBL is not set ++# CONFIG_SND_SOC_INTEL_GLK is not set ++# CONFIG_SND_SOC_INTEL_CNL is not set ++# CONFIG_SND_SOC_INTEL_CFL is not set ++# CONFIG_SND_SOC_INTEL_CML_H is not set ++# CONFIG_SND_SOC_INTEL_CML_LP is not set ++CONFIG_SND_SOC_INTEL_SKYLAKE_FAMILY=m ++CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC=y ++CONFIG_SND_SOC_INTEL_SKYLAKE_COMMON=m ++CONFIG_SND_SOC_ACPI_INTEL_MATCH=m ++CONFIG_SND_SOC_INTEL_AVS=m ++ ++# ++# Intel AVS Machine drivers ++# ++ ++# ++# Available DSP configurations ++# ++# CONFIG_SND_SOC_INTEL_AVS_MACH_DMIC is not set ++# CONFIG_SND_SOC_INTEL_AVS_MACH_HDAUDIO is not set ++# CONFIG_SND_SOC_INTEL_AVS_MACH_I2S_TEST is not set ++# CONFIG_SND_SOC_INTEL_AVS_MACH_PROBE is not set ++# end of Intel AVS Machine drivers ++ ++CONFIG_SND_SOC_INTEL_MACH=y ++CONFIG_SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES=y ++# CONFIG_SND_SOC_INTEL_SKL_HDA_DSP_GENERIC_MACH is not set ++# CONFIG_SND_SOC_MTK_BTCVSD is not set ++CONFIG_SND_SOC_SOF_TOPLEVEL=y ++CONFIG_SND_SOC_SOF_PCI_DEV=m ++CONFIG_SND_SOC_SOF_PCI=m ++# CONFIG_SND_SOC_SOF_ACPI is not set ++CONFIG_SND_SOC_SOF_DEBUG_PROBES=m ++CONFIG_SND_SOC_SOF_CLIENT=m ++# CONFIG_SND_SOC_SOF_DEVELOPER_SUPPORT is not set ++CONFIG_SND_SOC_SOF=m ++CONFIG_SND_SOC_SOF_PROBE_WORK_QUEUE=y ++CONFIG_SND_SOC_SOF_IPC3=y ++CONFIG_SND_SOC_SOF_INTEL_IPC4=y ++CONFIG_SND_SOC_SOF_AMD_TOPLEVEL=m ++CONFIG_SND_SOC_SOF_AMD_COMMON=m ++CONFIG_SND_SOC_SOF_AMD_RENOIR=m ++# CONFIG_SND_SOC_SOF_AMD_VANGOGH is not set ++# CONFIG_SND_SOC_SOF_AMD_REMBRANDT is not set ++CONFIG_SND_SOC_SOF_ACP_PROBES=m ++CONFIG_SND_SOC_SOF_INTEL_TOPLEVEL=y ++CONFIG_SND_SOC_SOF_INTEL_COMMON=m ++# CONFIG_SND_SOC_SOF_MERRIFIELD is not set ++# CONFIG_SND_SOC_SOF_SKYLAKE is not set ++# CONFIG_SND_SOC_SOF_KABYLAKE is not set ++CONFIG_SND_SOC_SOF_INTEL_APL=m ++CONFIG_SND_SOC_SOF_APOLLOLAKE=m ++# CONFIG_SND_SOC_SOF_GEMINILAKE is not set ++# CONFIG_SND_SOC_SOF_CANNONLAKE is not set ++# CONFIG_SND_SOC_SOF_COFFEELAKE is not set ++# CONFIG_SND_SOC_SOF_COMETLAKE is not set ++# CONFIG_SND_SOC_SOF_ICELAKE is not set ++# CONFIG_SND_SOC_SOF_JASPERLAKE is not set ++# CONFIG_SND_SOC_SOF_TIGERLAKE is not set ++# CONFIG_SND_SOC_SOF_ELKHARTLAKE is not set ++# CONFIG_SND_SOC_SOF_ALDERLAKE is not set ++# CONFIG_SND_SOC_SOF_METEORLAKE is not set ++# CONFIG_SND_SOC_SOF_LUNARLAKE is not set ++CONFIG_SND_SOC_SOF_HDA_COMMON=m ++CONFIG_SND_SOC_SOF_HDA_MLINK=m ++CONFIG_SND_SOC_SOF_HDA_LINK=y ++CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC=y ++CONFIG_SND_SOC_SOF_HDA_LINK_BASELINE=m ++CONFIG_SND_SOC_SOF_HDA=m ++CONFIG_SND_SOC_SOF_HDA_PROBES=m ++CONFIG_SND_SOC_SOF_XTENSA=m ++ ++# ++# STMicroelectronics STM32 SOC audio support ++# ++# end of STMicroelectronics STM32 SOC audio support ++ ++# CONFIG_SND_SOC_XILINX_I2S is not set ++# CONFIG_SND_SOC_XILINX_AUDIO_FORMATTER is not set ++# CONFIG_SND_SOC_XILINX_SPDIF is not set ++# CONFIG_SND_SOC_XTFPGA_I2S is not set ++CONFIG_SND_SOC_I2C_AND_SPI=m ++ ++# ++# CODEC drivers ++# ++# CONFIG_SND_SOC_AC97_CODEC is not set ++# CONFIG_SND_SOC_ADAU1372_I2C is not set ++# CONFIG_SND_SOC_ADAU1372_SPI is not set ++# CONFIG_SND_SOC_ADAU1701 is not set ++# CONFIG_SND_SOC_ADAU1761_I2C is not set ++# CONFIG_SND_SOC_ADAU1761_SPI is not set ++# CONFIG_SND_SOC_ADAU7002 is not set ++# CONFIG_SND_SOC_ADAU7118_HW is not set ++# CONFIG_SND_SOC_ADAU7118_I2C is not set ++# CONFIG_SND_SOC_AK4104 is not set ++# CONFIG_SND_SOC_AK4118 is not set ++# CONFIG_SND_SOC_AK4375 is not set ++# CONFIG_SND_SOC_AK4458 is not set ++# CONFIG_SND_SOC_AK4554 is not set ++# CONFIG_SND_SOC_AK4613 is not set ++# CONFIG_SND_SOC_AK4642 is not set ++# CONFIG_SND_SOC_AK5386 is not set ++# CONFIG_SND_SOC_AK5558 is not set ++# CONFIG_SND_SOC_ALC5623 is not set ++# CONFIG_SND_SOC_AW8738 is not set ++# CONFIG_SND_SOC_AW88395 is not set ++# CONFIG_SND_SOC_AW88261 is not set ++# CONFIG_SND_SOC_BD28623 is not set ++# CONFIG_SND_SOC_BT_SCO is not set ++# CONFIG_SND_SOC_CHV3_CODEC is not set ++# CONFIG_SND_SOC_CS35L32 is not set ++# CONFIG_SND_SOC_CS35L33 is not set ++# CONFIG_SND_SOC_CS35L34 is not set ++# CONFIG_SND_SOC_CS35L35 is not set ++# CONFIG_SND_SOC_CS35L36 is not set ++# CONFIG_SND_SOC_CS35L41_SPI is not set ++# CONFIG_SND_SOC_CS35L41_I2C is not set ++# CONFIG_SND_SOC_CS35L45_SPI is not set ++# CONFIG_SND_SOC_CS35L45_I2C is not set ++# CONFIG_SND_SOC_CS35L56_I2C is not set ++# CONFIG_SND_SOC_CS35L56_SPI is not set ++# CONFIG_SND_SOC_CS35L56_SDW is not set ++# CONFIG_SND_SOC_CS42L42 is not set ++# CONFIG_SND_SOC_CS42L42_SDW is not set ++# CONFIG_SND_SOC_CS42L51_I2C is not set ++# CONFIG_SND_SOC_CS42L52 is not set ++# CONFIG_SND_SOC_CS42L56 is not set ++# CONFIG_SND_SOC_CS42L73 is not set ++# CONFIG_SND_SOC_CS42L83 is not set ++# CONFIG_SND_SOC_CS4234 is not set ++# CONFIG_SND_SOC_CS4265 is not set ++# CONFIG_SND_SOC_CS4270 is not set ++# CONFIG_SND_SOC_CS4271_I2C is not set ++# CONFIG_SND_SOC_CS4271_SPI is not set ++# CONFIG_SND_SOC_CS42XX8_I2C is not set ++# CONFIG_SND_SOC_CS43130 is not set ++# CONFIG_SND_SOC_CS4341 is not set ++# CONFIG_SND_SOC_CS4349 is not set ++# CONFIG_SND_SOC_CS53L30 is not set ++# CONFIG_SND_SOC_CX2072X is not set ++# CONFIG_SND_SOC_DA7213 is not set ++# CONFIG_SND_SOC_DMIC is not set ++# CONFIG_SND_SOC_ES7134 is not set ++# CONFIG_SND_SOC_ES7241 is not set ++# CONFIG_SND_SOC_ES8316 is not set ++# CONFIG_SND_SOC_ES8326 is not set ++# CONFIG_SND_SOC_ES8328_I2C is not set ++# CONFIG_SND_SOC_ES8328_SPI is not set ++# CONFIG_SND_SOC_GTM601 is not set ++CONFIG_SND_SOC_HDAC_HDA=m ++CONFIG_SND_SOC_HDA=m ++# CONFIG_SND_SOC_ICS43432 is not set ++# CONFIG_SND_SOC_IDT821034 is not set ++# CONFIG_SND_SOC_INNO_RK3036 is not set ++# CONFIG_SND_SOC_MAX98088 is not set ++# CONFIG_SND_SOC_MAX98090 is not set ++# CONFIG_SND_SOC_MAX98357A is not set ++# CONFIG_SND_SOC_MAX98504 is not set ++# CONFIG_SND_SOC_MAX9867 is not set ++# CONFIG_SND_SOC_MAX98927 is not set ++# CONFIG_SND_SOC_MAX98520 is not set ++# CONFIG_SND_SOC_MAX98363 is not set ++# CONFIG_SND_SOC_MAX98373_I2C is not set ++# CONFIG_SND_SOC_MAX98373_SDW is not set ++# CONFIG_SND_SOC_MAX98388 is not set ++# CONFIG_SND_SOC_MAX98390 is not set ++# CONFIG_SND_SOC_MAX98396 is not set ++# CONFIG_SND_SOC_MAX9860 is not set ++# CONFIG_SND_SOC_MSM8916_WCD_DIGITAL is not set ++# CONFIG_SND_SOC_PCM1681 is not set ++# CONFIG_SND_SOC_PCM1789_I2C is not set ++# CONFIG_SND_SOC_PCM179X_I2C is not set ++# CONFIG_SND_SOC_PCM179X_SPI is not set ++# CONFIG_SND_SOC_PCM186X_I2C is not set ++# CONFIG_SND_SOC_PCM186X_SPI is not set ++# CONFIG_SND_SOC_PCM3060_I2C is not set ++# CONFIG_SND_SOC_PCM3060_SPI is not set ++# CONFIG_SND_SOC_PCM3168A_I2C is not set ++# CONFIG_SND_SOC_PCM3168A_SPI is not set ++# CONFIG_SND_SOC_PCM5102A is not set ++# CONFIG_SND_SOC_PCM512x_I2C is not set ++# CONFIG_SND_SOC_PCM512x_SPI is not set ++# CONFIG_SND_SOC_PEB2466 is not set ++# CONFIG_SND_SOC_RK3328 is not set ++# CONFIG_SND_SOC_RT1017_SDCA_SDW is not set ++# CONFIG_SND_SOC_RT1308_SDW is not set ++# CONFIG_SND_SOC_RT1316_SDW is not set ++# CONFIG_SND_SOC_RT1318_SDW is not set ++# CONFIG_SND_SOC_RT5616 is not set ++# CONFIG_SND_SOC_RT5631 is not set ++# CONFIG_SND_SOC_RT5640 is not set ++# CONFIG_SND_SOC_RT5659 is not set ++# CONFIG_SND_SOC_RT5682_SDW is not set ++# CONFIG_SND_SOC_RT700_SDW is not set ++# CONFIG_SND_SOC_RT711_SDW is not set ++# CONFIG_SND_SOC_RT711_SDCA_SDW is not set ++# CONFIG_SND_SOC_RT712_SDCA_SDW is not set ++# CONFIG_SND_SOC_RT712_SDCA_DMIC_SDW is not set ++# CONFIG_SND_SOC_RT722_SDCA_SDW is not set ++# CONFIG_SND_SOC_RT715_SDW is not set ++# CONFIG_SND_SOC_RT715_SDCA_SDW is not set ++# CONFIG_SND_SOC_RT9120 is not set ++# CONFIG_SND_SOC_SDW_MOCKUP is not set ++# CONFIG_SND_SOC_SGTL5000 is not set ++# CONFIG_SND_SOC_SIMPLE_AMPLIFIER is not set ++# CONFIG_SND_SOC_SIMPLE_MUX is not set ++# CONFIG_SND_SOC_SMA1303 is not set ++# CONFIG_SND_SOC_SPDIF is not set ++# CONFIG_SND_SOC_SRC4XXX_I2C is not set ++# CONFIG_SND_SOC_SSM2305 is not set ++# CONFIG_SND_SOC_SSM2518 is not set ++# CONFIG_SND_SOC_SSM2602_SPI is not set ++# CONFIG_SND_SOC_SSM2602_I2C is not set ++# CONFIG_SND_SOC_SSM4567 is not set ++# CONFIG_SND_SOC_STA32X is not set ++# CONFIG_SND_SOC_STA350 is not set ++# CONFIG_SND_SOC_STI_SAS is not set ++# CONFIG_SND_SOC_TAS2552 is not set ++# CONFIG_SND_SOC_TAS2562 is not set ++# CONFIG_SND_SOC_TAS2764 is not set ++# CONFIG_SND_SOC_TAS2770 is not set ++# CONFIG_SND_SOC_TAS2780 is not set ++# CONFIG_SND_SOC_TAS2781_I2C is not set ++# CONFIG_SND_SOC_TAS5086 is not set ++# CONFIG_SND_SOC_TAS571X is not set ++# CONFIG_SND_SOC_TAS5720 is not set ++# CONFIG_SND_SOC_TAS5805M is not set ++# CONFIG_SND_SOC_TAS6424 is not set ++# CONFIG_SND_SOC_TDA7419 is not set ++# CONFIG_SND_SOC_TFA9879 is not set ++# CONFIG_SND_SOC_TFA989X is not set ++# CONFIG_SND_SOC_TLV320ADC3XXX is not set ++# CONFIG_SND_SOC_TLV320AIC23_I2C is not set ++# CONFIG_SND_SOC_TLV320AIC23_SPI is not set ++# CONFIG_SND_SOC_TLV320AIC31XX is not set ++# CONFIG_SND_SOC_TLV320AIC32X4_I2C is not set ++# CONFIG_SND_SOC_TLV320AIC32X4_SPI is not set ++# CONFIG_SND_SOC_TLV320AIC3X_I2C is not set ++# CONFIG_SND_SOC_TLV320AIC3X_SPI is not set ++# CONFIG_SND_SOC_TLV320ADCX140 is not set ++# CONFIG_SND_SOC_TS3A227E is not set ++# CONFIG_SND_SOC_TSCS42XX is not set ++# CONFIG_SND_SOC_TSCS454 is not set ++# CONFIG_SND_SOC_UDA1334 is not set ++# CONFIG_SND_SOC_WCD938X_SDW is not set ++# CONFIG_SND_SOC_WM8510 is not set ++# CONFIG_SND_SOC_WM8523 is not set ++# CONFIG_SND_SOC_WM8524 is not set ++# CONFIG_SND_SOC_WM8580 is not set ++# CONFIG_SND_SOC_WM8711 is not set ++# CONFIG_SND_SOC_WM8728 is not set ++# CONFIG_SND_SOC_WM8731_I2C is not set ++# CONFIG_SND_SOC_WM8731_SPI is not set ++# CONFIG_SND_SOC_WM8737 is not set ++# CONFIG_SND_SOC_WM8741 is not set ++# CONFIG_SND_SOC_WM8750 is not set ++# CONFIG_SND_SOC_WM8753 is not set ++# CONFIG_SND_SOC_WM8770 is not set ++# CONFIG_SND_SOC_WM8776 is not set ++# CONFIG_SND_SOC_WM8782 is not set ++# CONFIG_SND_SOC_WM8804_I2C is not set ++# CONFIG_SND_SOC_WM8804_SPI is not set ++# CONFIG_SND_SOC_WM8903 is not set ++# CONFIG_SND_SOC_WM8904 is not set ++# CONFIG_SND_SOC_WM8940 is not set ++# CONFIG_SND_SOC_WM8960 is not set ++# CONFIG_SND_SOC_WM8961 is not set ++# CONFIG_SND_SOC_WM8962 is not set ++# CONFIG_SND_SOC_WM8974 is not set ++# CONFIG_SND_SOC_WM8978 is not set ++# CONFIG_SND_SOC_WM8985 is not set ++# CONFIG_SND_SOC_WSA881X is not set ++# CONFIG_SND_SOC_WSA883X is not set ++# CONFIG_SND_SOC_WSA884X is not set ++# CONFIG_SND_SOC_ZL38060 is not set ++# CONFIG_SND_SOC_MAX9759 is not set ++# CONFIG_SND_SOC_MT6351 is not set ++# CONFIG_SND_SOC_MT6358 is not set ++# CONFIG_SND_SOC_MT6660 is not set ++# CONFIG_SND_SOC_NAU8315 is not set ++# CONFIG_SND_SOC_NAU8540 is not set ++# CONFIG_SND_SOC_NAU8810 is not set ++# CONFIG_SND_SOC_NAU8821 is not set ++# CONFIG_SND_SOC_NAU8822 is not set ++# CONFIG_SND_SOC_NAU8824 is not set ++# CONFIG_SND_SOC_TPA6130A2 is not set ++# CONFIG_SND_SOC_LPASS_WSA_MACRO is not set ++# CONFIG_SND_SOC_LPASS_VA_MACRO is not set ++# CONFIG_SND_SOC_LPASS_RX_MACRO is not set ++# CONFIG_SND_SOC_LPASS_TX_MACRO is not set ++# end of CODEC drivers ++ ++# CONFIG_SND_SIMPLE_CARD is not set + CONFIG_SND_X86=y ++# CONFIG_HDMI_LPE_AUDIO is not set + # CONFIG_SND_XEN_FRONTEND is not set + # CONFIG_SND_VIRTIO is not set + CONFIG_HID_SUPPORT=y +@@ -4215,7 +4938,7 @@ + # + # HID-BPF support + # +-# CONFIG_HID_BPF is not set ++CONFIG_HID_BPF=y + # end of HID-BPF support + + # +@@ -4233,7 +4956,10 @@ + # end of USB HID Boot Protocol drivers + # end of USB HID support + +-# CONFIG_I2C_HID is not set ++CONFIG_I2C_HID=m ++CONFIG_I2C_HID_ACPI=m ++# CONFIG_I2C_HID_OF is not set ++CONFIG_I2C_HID_CORE=m + + # + # Intel ISH HID support +@@ -4277,8 +5003,8 @@ + # CONFIG_USB_C67X00_HCD is not set + CONFIG_USB_XHCI_HCD=y + CONFIG_USB_XHCI_DBGCAP=y +-CONFIG_USB_XHCI_PCI=y +-# CONFIG_USB_XHCI_PCI_RENESAS is not set ++CONFIG_USB_XHCI_PCI=m ++CONFIG_USB_XHCI_PCI_RENESAS=m + # CONFIG_USB_XHCI_PLATFORM is not set + CONFIG_USB_EHCI_HCD=y + CONFIG_USB_EHCI_ROOT_HUB_TT=y +@@ -4406,12 +5132,18 @@ + # CONFIG_MMC_BLOCK is not set + # CONFIG_SDIO_UART is not set + # CONFIG_MMC_TEST is not set ++CONFIG_MMC_CRYPTO=y + + # + # MMC/SD/SDIO Host Controller Drivers + # + # CONFIG_MMC_DEBUG is not set +-# CONFIG_MMC_SDHCI is not set ++CONFIG_MMC_SDHCI=m ++CONFIG_MMC_SDHCI_IO_ACCESSORS=y ++CONFIG_MMC_SDHCI_PCI=m ++CONFIG_MMC_RICOH_MMC=y ++# CONFIG_MMC_SDHCI_ACPI is not set ++# CONFIG_MMC_SDHCI_PLTFM is not set + # CONFIG_MMC_WBSD is not set + # CONFIG_MMC_TIFM_SD is not set + # CONFIG_MMC_SPI is not set +@@ -4420,7 +5152,8 @@ + # CONFIG_MMC_VUB300 is not set + # CONFIG_MMC_USHC is not set + # CONFIG_MMC_USDHI6ROL0 is not set +-# CONFIG_MMC_CQHCI is not set ++CONFIG_MMC_REALTEK_PCI=m ++CONFIG_MMC_CQHCI=m + # CONFIG_MMC_HSQ is not set + # CONFIG_MMC_TOSHIBA_PCI is not set + # CONFIG_MMC_MTK is not set +@@ -4513,7 +5246,15 @@ + # + # Simple LED drivers + # +-# CONFIG_ACCESSIBILITY is not set ++CONFIG_ACCESSIBILITY=y ++# CONFIG_A11Y_BRAILLE_CONSOLE is not set ++ ++# ++# Speakup console speech ++# ++# CONFIG_SPEAKUP is not set ++# end of Speakup console speech ++ + # CONFIG_INFINIBAND is not set + CONFIG_EDAC_ATOMIC_SCRUB=y + CONFIG_EDAC_SUPPORT=y +@@ -4663,6 +5404,7 @@ + # DMA Devices + # + CONFIG_DMA_ENGINE=y ++CONFIG_DMA_VIRTUAL_CHANNELS=y + CONFIG_DMA_ACPI=y + # CONFIG_ALTERA_MSGDMA is not set + # CONFIG_INTEL_IDMA64 is not set +@@ -4678,8 +5420,9 @@ + # CONFIG_DW_DMAC is not set + # CONFIG_DW_DMAC_PCI is not set + # CONFIG_DW_EDMA is not set ++CONFIG_HSU_DMA=y + # CONFIG_SF_PDMA is not set +-# CONFIG_INTEL_LDMA is not set ++CONFIG_INTEL_LDMA=y + + # + # DMA Clients +@@ -4692,22 +5435,26 @@ + # + CONFIG_SYNC_FILE=y + CONFIG_SW_SYNC=y +-# CONFIG_UDMABUF is not set +-# CONFIG_DMABUF_MOVE_NOTIFY is not set ++CONFIG_UDMABUF=y ++CONFIG_DMABUF_MOVE_NOTIFY=y + # CONFIG_DMABUF_DEBUG is not set + # CONFIG_DMABUF_SELFTESTS is not set +-# CONFIG_DMABUF_HEAPS is not set ++CONFIG_DMABUF_HEAPS=y + # CONFIG_DMABUF_SYSFS_STATS is not set ++CONFIG_DMABUF_HEAPS_SYSTEM=y + # end of DMABUF options + + # CONFIG_UIO is not set + # CONFIG_VFIO is not set ++CONFIG_IRQ_BYPASS_MANAGER=m + CONFIG_VIRT_DRIVERS=y +-CONFIG_VMGENID=y ++# CONFIG_VMGENID is not set + # CONFIG_VBOXGUEST is not set + # CONFIG_NITRO_ENCLAVES is not set ++# CONFIG_ACRN_HSM is not set + # CONFIG_EFI_SECRET is not set + # CONFIG_SEV_GUEST is not set ++# CONFIG_TDX_GUEST_DRIVER is not set + CONFIG_VIRTIO_ANCHOR=y + CONFIG_VIRTIO=y + CONFIG_VIRTIO_PCI_LIB=y +@@ -4746,7 +5493,7 @@ + CONFIG_XEN_XENBUS_FRONTEND=y + # CONFIG_XEN_GNTDEV is not set + # CONFIG_XEN_GRANT_DEV_ALLOC is not set +-# CONFIG_XEN_GRANT_DMA_ALLOC is not set ++CONFIG_XEN_GRANT_DMA_ALLOC=y + CONFIG_SWIOTLB_XEN=y + # CONFIG_XEN_PCIDEV_BACKEND is not set + # CONFIG_XEN_PVCALLS_FRONTEND is not set +@@ -4760,15 +5507,22 @@ + CONFIG_XEN_ACPI=y + CONFIG_XEN_HAVE_VPMU=y + CONFIG_XEN_UNPOPULATED_ALLOC=y +-# CONFIG_XEN_VIRTIO is not set ++CONFIG_XEN_GRANT_DMA_OPS=y ++CONFIG_XEN_VIRTIO=y ++# CONFIG_XEN_VIRTIO_FORCE_GRANT is not set + # end of Xen driver support + + # CONFIG_GREYBUS is not set + # CONFIG_COMEDI is not set + CONFIG_STAGING=y ++# CONFIG_PRISM2_USB is not set + # CONFIG_RTL8192U is not set + # CONFIG_RTLLIB is not set ++# CONFIG_RTL8723BS is not set ++# CONFIG_R8712U is not set + # CONFIG_RTS5208 is not set ++# CONFIG_VT6655 is not set ++# CONFIG_VT6656 is not set + # CONFIG_FB_SM750 is not set + CONFIG_STAGING_MEDIA=y + # CONFIG_LTE_GDM724X is not set +@@ -4798,7 +5552,11 @@ + # CONFIG_CROS_KBD_LED_BACKLIGHT is not set + # CONFIG_CROS_HPS_I2C is not set + # CONFIG_CHROMEOS_PRIVACY_SCREEN is not set +-# CONFIG_MELLANOX_PLATFORM is not set ++CONFIG_MELLANOX_PLATFORM=y ++# CONFIG_MLXREG_HOTPLUG is not set ++# CONFIG_MLXREG_IO is not set ++# CONFIG_MLXREG_LC is not set ++# CONFIG_NVSW_SN2201 is not set + CONFIG_SURFACE_PLATFORMS=y + # CONFIG_SURFACE3_WMI is not set + # CONFIG_SURFACE_3_POWER_OPREGION is not set +@@ -4808,8 +5566,9 @@ + # CONFIG_SURFACE_AGGREGATOR is not set + CONFIG_X86_PLATFORM_DEVICES=y + CONFIG_ACPI_WMI=m +-# CONFIG_WMI_BMOF is not set ++CONFIG_WMI_BMOF=m + # CONFIG_HUAWEI_WMI is not set ++# CONFIG_UV_SYSFS is not set + # CONFIG_MXM_WMI is not set + # CONFIG_NVIDIA_WMI_EC_BACKLIGHT is not set + # CONFIG_XIAOMI_WMI is not set +@@ -4828,12 +5587,25 @@ + # CONFIG_ASUS_WMI is not set + # CONFIG_ASUS_TF103C_DOCK is not set + # CONFIG_EEEPC_LAPTOP is not set +-# CONFIG_X86_PLATFORM_DRIVERS_DELL is not set ++CONFIG_X86_PLATFORM_DRIVERS_DELL=y ++# CONFIG_ALIENWARE_WMI is not set ++# CONFIG_DCDBAS is not set ++# CONFIG_DELL_RBU is not set ++# CONFIG_DELL_RBTN is not set ++# CONFIG_DELL_SMBIOS is not set ++# CONFIG_DELL_SMO8800 is not set ++# CONFIG_DELL_WMI_AIO is not set ++# CONFIG_DELL_WMI_DDV is not set ++# CONFIG_DELL_WMI_LED is not set ++# CONFIG_DELL_WMI_SYSMAN is not set + # CONFIG_AMILO_RFKILL is not set + # CONFIG_FUJITSU_LAPTOP is not set + # CONFIG_FUJITSU_TABLET is not set + # CONFIG_GPD_POCKET_FAN is not set +-# CONFIG_X86_PLATFORM_DRIVERS_HP is not set ++CONFIG_X86_PLATFORM_DRIVERS_HP=y ++# CONFIG_HP_ACCEL is not set ++# CONFIG_HP_WMI is not set ++# CONFIG_HP_BIOSCFG is not set + # CONFIG_WIRELESS_HOTKEY is not set + # CONFIG_IBM_RTL is not set + # CONFIG_IDEAPAD_LAPTOP is not set +@@ -4845,7 +5617,10 @@ + # CONFIG_INTEL_IFS is not set + # CONFIG_INTEL_SAR_INT1092 is not set + # CONFIG_INTEL_SKL_INT3472 is not set +-CONFIG_INTEL_PMC_CORE=y ++CONFIG_INTEL_PMC_CORE=m ++CONFIG_INTEL_PMT_CLASS=m ++CONFIG_INTEL_PMT_TELEMETRY=m ++# CONFIG_INTEL_PMT_CRASHLOG is not set + + # + # Intel Speed Select Technology interface support +@@ -4853,6 +5628,7 @@ + # CONFIG_INTEL_SPEED_SELECT_INTERFACE is not set + # end of Intel Speed Select Technology interface support + ++CONFIG_INTEL_TELEMETRY=m + # CONFIG_INTEL_WMI_SBL_FW_UPDATE is not set + # CONFIG_INTEL_WMI_THUNDERBOLT is not set + +@@ -4867,11 +5643,13 @@ + # CONFIG_INTEL_INT0002_VGPIO is not set + # CONFIG_INTEL_OAKTRAIL is not set + # CONFIG_INTEL_BYTCRC_PWRSRC is not set +-# CONFIG_INTEL_PUNIT_IPC is not set ++CONFIG_INTEL_PUNIT_IPC=m + # CONFIG_INTEL_RST is not set ++# CONFIG_INTEL_SDSI is not set + # CONFIG_INTEL_SMARTCONNECT is not set ++# CONFIG_INTEL_TPMI is not set + CONFIG_INTEL_TURBO_MAX_3=y +-# CONFIG_INTEL_VSEC is not set ++CONFIG_INTEL_VSEC=m + # CONFIG_MSI_EC is not set + # CONFIG_MSI_LAPTOP is not set + # CONFIG_MSI_WMI is not set +@@ -4891,11 +5669,16 @@ + # CONFIG_TOPSTAR_LAPTOP is not set + # CONFIG_SERIAL_MULTI_INSTANTIATE is not set + # CONFIG_MLX_PLATFORM is not set ++# CONFIG_X86_ANDROID_TABLETS is not set + # CONFIG_INTEL_IPS is not set +-# CONFIG_INTEL_SCU_PCI is not set ++CONFIG_INTEL_SCU_IPC=y ++CONFIG_INTEL_SCU=y ++CONFIG_INTEL_SCU_PCI=y + # CONFIG_INTEL_SCU_PLATFORM is not set ++# CONFIG_INTEL_SCU_IPC_UTIL is not set + # CONFIG_SIEMENS_SIMATIC_IPC is not set + # CONFIG_WINMATE_FM07_KEYS is not set ++CONFIG_P2SB=y + CONFIG_HAVE_CLK=y + CONFIG_HAVE_CLK_PREPARE=y + CONFIG_COMMON_CLK=y +@@ -4945,18 +5728,19 @@ + CONFIG_DMAR_TABLE=y + CONFIG_INTEL_IOMMU=y + CONFIG_INTEL_IOMMU_SVM=y +-# CONFIG_INTEL_IOMMU_DEFAULT_ON is not set ++CONFIG_INTEL_IOMMU_DEFAULT_ON=y + CONFIG_INTEL_IOMMU_FLOPPY_WA=y +-# CONFIG_INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON is not set ++CONFIG_INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON=y + CONFIG_INTEL_IOMMU_PERF_EVENTS=y + # CONFIG_IOMMUFD is not set + CONFIG_IRQ_REMAP=y +-# CONFIG_VIRTIO_IOMMU is not set ++CONFIG_VIRTIO_IOMMU=y + + # + # Remoteproc drivers + # +-# CONFIG_REMOTEPROC is not set ++CONFIG_REMOTEPROC=y ++CONFIG_REMOTEPROC_CDEV=y + # end of Remoteproc drivers + + # +@@ -4966,7 +5750,16 @@ + # CONFIG_RPMSG_VIRTIO is not set + # end of Rpmsg drivers + +-# CONFIG_SOUNDWIRE is not set ++CONFIG_SOUNDWIRE=m ++ ++# ++# SoundWire Devices ++# ++# CONFIG_SOUNDWIRE_AMD is not set ++CONFIG_SOUNDWIRE_CADENCE=m ++CONFIG_SOUNDWIRE_INTEL=m ++# CONFIG_SOUNDWIRE_QCOM is not set ++CONFIG_SOUNDWIRE_GENERIC_ALLOCATION=m + + # + # SOC (System On Chip) specific Drivers +@@ -5060,8 +5853,9 @@ + # CONFIG_PWM_CLK is not set + CONFIG_PWM_CRC=y + # CONFIG_PWM_DWC is not set +-# CONFIG_PWM_LPSS_PCI is not set +-# CONFIG_PWM_LPSS_PLATFORM is not set ++CONFIG_PWM_LPSS=y ++CONFIG_PWM_LPSS_PCI=y ++CONFIG_PWM_LPSS_PLATFORM=y + # CONFIG_PWM_PCA9685 is not set + # CONFIG_PWM_TWL is not set + # CONFIG_PWM_TWL_LED is not set +@@ -5073,7 +5867,7 @@ + + # CONFIG_IPACK_BUS is not set + CONFIG_RESET_CONTROLLER=y +-# CONFIG_RESET_SIMPLE is not set ++CONFIG_RESET_SIMPLE=y + # CONFIG_RESET_TI_SYSCON is not set + # CONFIG_RESET_TI_TPS380X is not set + +@@ -5097,8 +5891,9 @@ + # end of PHY Subsystem + + CONFIG_POWERCAP=y +-# CONFIG_INTEL_RAPL is not set +-# CONFIG_IDLE_INJECT is not set ++CONFIG_INTEL_RAPL_CORE=m ++CONFIG_INTEL_RAPL=m ++CONFIG_IDLE_INJECT=y + # CONFIG_MCB is not set + + # +@@ -5127,6 +5922,7 @@ + # CONFIG_NVDIMM_SECURITY_TEST is not set + CONFIG_DAX=y + # CONFIG_DEV_DAX is not set ++# CONFIG_DEV_DAX_HMEM is not set + CONFIG_NVMEM=y + CONFIG_NVMEM_SYSFS=y + +@@ -5151,18 +5947,18 @@ + CONFIG_PM_OPP=y + # CONFIG_SIOX is not set + # CONFIG_SLIMBUS is not set +-# CONFIG_INTERCONNECT is not set ++CONFIG_INTERCONNECT=y + # CONFIG_COUNTER is not set + # CONFIG_MOST is not set + # CONFIG_PECI is not set +-# CONFIG_HTE is not set ++CONFIG_HTE=y + # end of Device Drivers + + # + # File systems + # + CONFIG_DCACHE_WORD_ACCESS=y +-# CONFIG_VALIDATE_FS_PARSER is not set ++CONFIG_VALIDATE_FS_PARSER=y + CONFIG_FS_IOMAP=y + CONFIG_BUFFER_HEAD=y + CONFIG_LEGACY_DIRECT_IO=y +@@ -5193,7 +5989,9 @@ + CONFIG_FILE_LOCKING=y + CONFIG_FS_ENCRYPTION=y + CONFIG_FS_ENCRYPTION_ALGS=y +-# CONFIG_FS_VERITY is not set ++CONFIG_FS_ENCRYPTION_INLINE_CRYPT=y ++CONFIG_FS_VERITY=y ++CONFIG_FS_VERITY_BUILTIN_SIGNATURES=y + CONFIG_FSNOTIFY=y + CONFIG_DNOTIFY=y + CONFIG_INOTIFY_USER=y +@@ -5214,13 +6012,20 @@ + # + # Caches + # +-# CONFIG_FSCACHE is not set ++CONFIG_NETFS_SUPPORT=y ++CONFIG_NETFS_STATS=y ++CONFIG_FSCACHE=y ++CONFIG_FSCACHE_STATS=y ++# CONFIG_FSCACHE_DEBUG is not set ++# CONFIG_CACHEFILES is not set + # end of Caches + + # + # CD-ROM/DVD Filesystems + # +-# CONFIG_ISO9660_FS is not set ++CONFIG_ISO9660_FS=m ++CONFIG_JOLIET=y ++CONFIG_ZISOFS=y + # CONFIG_UDF_FS is not set + # end of CD-ROM/DVD Filesystems + +@@ -5244,18 +6049,19 @@ + CONFIG_PROC_FS=y + CONFIG_PROC_KCORE=y + CONFIG_PROC_VMCORE=y +-# CONFIG_PROC_VMCORE_DEVICE_DUMP is not set ++CONFIG_PROC_VMCORE_DEVICE_DUMP=y + CONFIG_PROC_SYSCTL=y + CONFIG_PROC_PAGE_MONITOR=y + CONFIG_PROC_CHILDREN=y + CONFIG_PROC_PID_ARCH_STATUS=y ++CONFIG_PROC_CPU_RESCTRL=y + CONFIG_KERNFS=y + CONFIG_SYSFS=y + CONFIG_TMPFS=y + CONFIG_TMPFS_POSIX_ACL=y + CONFIG_TMPFS_XATTR=y +-# CONFIG_TMPFS_INODE64 is not set +-# CONFIG_TMPFS_QUOTA is not set ++CONFIG_TMPFS_INODE64=y ++CONFIG_TMPFS_QUOTA=y + CONFIG_HUGETLBFS=y + CONFIG_HUGETLB_PAGE=y + CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP=y +@@ -5281,10 +6087,10 @@ + # CONFIG_SQUASHFS_FILE_CACHE is not set + CONFIG_SQUASHFS_FILE_DIRECT=y + CONFIG_SQUASHFS_DECOMP_SINGLE=y +-# CONFIG_SQUASHFS_CHOICE_DECOMP_BY_MOUNT is not set +-CONFIG_SQUASHFS_COMPILE_DECOMP_SINGLE=y +-# CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI is not set +-# CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU is not set ++CONFIG_SQUASHFS_DECOMP_MULTI=y ++CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y ++CONFIG_SQUASHFS_CHOICE_DECOMP_BY_MOUNT=y ++CONFIG_SQUASHFS_MOUNT_DECOMP_THREADS=y + CONFIG_SQUASHFS_XATTR=y + CONFIG_SQUASHFS_ZLIB=y + CONFIG_SQUASHFS_LZ4=y +@@ -5372,7 +6178,8 @@ + # CONFIG_NLS_MAC_TURKISH is not set + # CONFIG_NLS_UTF8 is not set + # CONFIG_DLM is not set +-# CONFIG_UNICODE is not set ++CONFIG_UNICODE=y ++# CONFIG_UNICODE_NORMALIZATION_SELFTEST is not set + CONFIG_IO_WQ=y + # end of File systems + +@@ -5380,14 +6187,15 @@ + # Security options + # + CONFIG_KEYS=y +-# CONFIG_KEYS_REQUEST_CACHE is not set ++CONFIG_KEYS_REQUEST_CACHE=y + CONFIG_PERSISTENT_KEYRINGS=y + CONFIG_TRUSTED_KEYS=y + CONFIG_TRUSTED_KEYS_TPM=y + CONFIG_ENCRYPTED_KEYS=y +-# CONFIG_USER_DECRYPTED_DATA is not set ++CONFIG_USER_DECRYPTED_DATA=y + CONFIG_KEY_DH_OPERATIONS=y +-# CONFIG_SECURITY_DMESG_RESTRICT is not set ++CONFIG_KEY_NOTIFICATIONS=y ++CONFIG_SECURITY_DMESG_RESTRICT=y + CONFIG_SECURITY=y + CONFIG_SECURITYFS=y + CONFIG_SECURITY_NETWORK=y +@@ -5424,51 +6232,58 @@ + CONFIG_SECURITY_APPARMOR_PARANOID_LOAD=y + # CONFIG_SECURITY_LOADPIN is not set + CONFIG_SECURITY_YAMA=y +-# CONFIG_SECURITY_SAFESETID is not set +-# CONFIG_SECURITY_LOCKDOWN_LSM is not set +-# CONFIG_SECURITY_LANDLOCK is not set ++CONFIG_SECURITY_SAFESETID=y ++CONFIG_SECURITY_LOCKDOWN_LSM=y ++CONFIG_SECURITY_LOCKDOWN_LSM_EARLY=y ++CONFIG_LOCK_DOWN_KERNEL_FORCE_NONE=y ++# CONFIG_LOCK_DOWN_KERNEL_FORCE_INTEGRITY is not set ++# CONFIG_LOCK_DOWN_KERNEL_FORCE_CONFIDENTIALITY is not set ++CONFIG_SECURITY_LANDLOCK=y + CONFIG_INTEGRITY=y + CONFIG_INTEGRITY_SIGNATURE=y + CONFIG_INTEGRITY_ASYMMETRIC_KEYS=y + CONFIG_INTEGRITY_TRUSTED_KEYRING=y +-# CONFIG_INTEGRITY_PLATFORM_KEYRING is not set ++CONFIG_INTEGRITY_PLATFORM_KEYRING=y ++CONFIG_INTEGRITY_MACHINE_KEYRING=y ++# CONFIG_INTEGRITY_CA_MACHINE_KEYRING is not set ++CONFIG_LOAD_UEFI_KEYS=y + CONFIG_INTEGRITY_AUDIT=y + CONFIG_IMA=y +-# CONFIG_IMA_KEXEC is not set ++CONFIG_IMA_KEXEC=y + CONFIG_IMA_MEASURE_PCR_IDX=10 + CONFIG_IMA_LSM_RULES=y + CONFIG_IMA_NG_TEMPLATE=y + # CONFIG_IMA_SIG_TEMPLATE is not set + CONFIG_IMA_DEFAULT_TEMPLATE="ima-ng" +-CONFIG_IMA_DEFAULT_HASH_SHA1=y +-# CONFIG_IMA_DEFAULT_HASH_SHA256 is not set ++# CONFIG_IMA_DEFAULT_HASH_SHA1 is not set ++CONFIG_IMA_DEFAULT_HASH_SHA256=y + # CONFIG_IMA_DEFAULT_HASH_SHA512 is not set +-CONFIG_IMA_DEFAULT_HASH="sha1" ++CONFIG_IMA_DEFAULT_HASH="sha256" + # CONFIG_IMA_WRITE_POLICY is not set + # CONFIG_IMA_READ_POLICY is not set + CONFIG_IMA_APPRAISE=y +-# CONFIG_IMA_ARCH_POLICY is not set ++CONFIG_IMA_ARCH_POLICY=y + # CONFIG_IMA_APPRAISE_BUILD_POLICY is not set + CONFIG_IMA_APPRAISE_BOOTPARAM=y +-# CONFIG_IMA_APPRAISE_MODSIG is not set ++CONFIG_IMA_APPRAISE_MODSIG=y + # CONFIG_IMA_KEYRINGS_PERMIT_SIGNED_BY_BUILTIN_OR_SECONDARY is not set + # CONFIG_IMA_BLACKLIST_KEYRING is not set + # CONFIG_IMA_LOAD_X509 is not set + CONFIG_IMA_MEASURE_ASYMMETRIC_KEYS=y + CONFIG_IMA_QUEUE_EARLY_BOOT_KEYS=y +-# CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT is not set ++CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT=y + # CONFIG_IMA_DISABLE_HTABLE is not set + CONFIG_EVM=y + CONFIG_EVM_ATTR_FSUUID=y + CONFIG_EVM_EXTRA_SMACK_XATTRS=y +-# CONFIG_EVM_ADD_XATTRS is not set ++CONFIG_EVM_ADD_XATTRS=y + # CONFIG_EVM_LOAD_X509 is not set + # CONFIG_DEFAULT_SECURITY_SELINUX is not set + # CONFIG_DEFAULT_SECURITY_SMACK is not set + # CONFIG_DEFAULT_SECURITY_TOMOYO is not set + CONFIG_DEFAULT_SECURITY_APPARMOR=y + # CONFIG_DEFAULT_SECURITY_DAC is not set +-CONFIG_LSM="lockdown,yama,loadpin,safesetid,integrity,apparmor,selinux,smack,tomoyo,bpf" ++CONFIG_LSM="landlock,lockdown,yama,integrity,apparmor" + + # + # Kernel hardening options +@@ -5480,13 +6295,13 @@ + CONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y + CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO_BARE=y + CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y +-CONFIG_INIT_STACK_NONE=y ++# CONFIG_INIT_STACK_NONE is not set + # CONFIG_INIT_STACK_ALL_PATTERN is not set +-# CONFIG_INIT_STACK_ALL_ZERO is not set +-# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set ++CONFIG_INIT_STACK_ALL_ZERO=y ++CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y + # CONFIG_INIT_ON_FREE_DEFAULT_ON is not set + CONFIG_CC_HAS_ZERO_CALL_USED_REGS=y +-# CONFIG_ZERO_CALL_USED_REGS is not set ++CONFIG_ZERO_CALL_USED_REGS=y + # end of Memory initialization + + # +@@ -5541,8 +6356,9 @@ + # + CONFIG_CRYPTO_RSA=y + CONFIG_CRYPTO_DH=y +-# CONFIG_CRYPTO_DH_RFC7919_GROUPS is not set +-# CONFIG_CRYPTO_ECDH is not set ++CONFIG_CRYPTO_DH_RFC7919_GROUPS=y ++CONFIG_CRYPTO_ECC=m ++CONFIG_CRYPTO_ECDH=m + # CONFIG_CRYPTO_ECDSA is not set + # CONFIG_CRYPTO_ECRDSA is not set + # CONFIG_CRYPTO_SM2 is not set +@@ -5576,11 +6392,12 @@ + CONFIG_CRYPTO_CTR=y + CONFIG_CRYPTO_CTS=y + CONFIG_CRYPTO_ECB=y +-# CONFIG_CRYPTO_HCTR2 is not set ++CONFIG_CRYPTO_HCTR2=m + # CONFIG_CRYPTO_KEYWRAP is not set + # CONFIG_CRYPTO_LRW is not set + # CONFIG_CRYPTO_OFB is not set + # CONFIG_CRYPTO_PCBC is not set ++CONFIG_CRYPTO_XCTR=m + CONFIG_CRYPTO_XTS=y + # end of Length-preserving ciphers and modes + +@@ -5589,7 +6406,7 @@ + # + # CONFIG_CRYPTO_AEGIS128 is not set + # CONFIG_CRYPTO_CHACHA20POLY1305 is not set +-# CONFIG_CRYPTO_CCM is not set ++CONFIG_CRYPTO_CCM=m + CONFIG_CRYPTO_GCM=y + CONFIG_CRYPTO_GENIV=y + CONFIG_CRYPTO_SEQIV=y +@@ -5601,12 +6418,13 @@ + # Hashes, digests, and MACs + # + # CONFIG_CRYPTO_BLAKE2B is not set +-# CONFIG_CRYPTO_CMAC is not set ++CONFIG_CRYPTO_CMAC=m + CONFIG_CRYPTO_GHASH=y + CONFIG_CRYPTO_HMAC=y + # CONFIG_CRYPTO_MD4 is not set + CONFIG_CRYPTO_MD5=y + # CONFIG_CRYPTO_MICHAEL_MIC is not set ++CONFIG_CRYPTO_POLYVAL=m + # CONFIG_CRYPTO_POLY1305 is not set + # CONFIG_CRYPTO_RMD160 is not set + CONFIG_CRYPTO_SHA1=y +@@ -5658,10 +6476,12 @@ + # + # Userspace interface + # +-# CONFIG_CRYPTO_USER_API_HASH is not set +-# CONFIG_CRYPTO_USER_API_SKCIPHER is not set ++CONFIG_CRYPTO_USER_API=m ++CONFIG_CRYPTO_USER_API_HASH=m ++CONFIG_CRYPTO_USER_API_SKCIPHER=m + # CONFIG_CRYPTO_USER_API_RNG is not set + # CONFIG_CRYPTO_USER_API_AEAD is not set ++# CONFIG_CRYPTO_USER_API_ENABLE_OBSOLETE is not set + # end of Userspace interface + + CONFIG_CRYPTO_HASH_INFO=y +@@ -5693,12 +6513,12 @@ + # CONFIG_CRYPTO_AEGIS128_AESNI_SSE2 is not set + # CONFIG_CRYPTO_NHPOLY1305_SSE2 is not set + # CONFIG_CRYPTO_NHPOLY1305_AVX2 is not set +-# CONFIG_CRYPTO_BLAKE2S_X86 is not set ++CONFIG_CRYPTO_BLAKE2S_X86=y + # CONFIG_CRYPTO_POLYVAL_CLMUL_NI is not set + # CONFIG_CRYPTO_POLY1305_X86_64 is not set +-# CONFIG_CRYPTO_SHA1_SSSE3 is not set +-# CONFIG_CRYPTO_SHA256_SSSE3 is not set +-# CONFIG_CRYPTO_SHA512_SSSE3 is not set ++CONFIG_CRYPTO_SHA1_SSSE3=m ++CONFIG_CRYPTO_SHA256_SSSE3=m ++CONFIG_CRYPTO_SHA512_SSSE3=y + # CONFIG_CRYPTO_SM3_AVX_X86_64 is not set + CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL=m + CONFIG_CRYPTO_CRC32C_INTEL=y +@@ -5747,7 +6567,8 @@ + CONFIG_SECONDARY_TRUSTED_KEYRING=y + CONFIG_SYSTEM_BLACKLIST_KEYRING=y + CONFIG_SYSTEM_BLACKLIST_HASH_LIST="" +-# CONFIG_SYSTEM_REVOCATION_LIST is not set ++CONFIG_SYSTEM_REVOCATION_LIST=y ++CONFIG_SYSTEM_REVOCATION_KEYS="" + # CONFIG_SYSTEM_BLACKLIST_AUTH_UPDATE is not set + # end of Certificates for signature checking + +@@ -5757,7 +6578,7 @@ + # Library routines + # + CONFIG_LINEAR_RANGES=y +-# CONFIG_PACKING is not set ++CONFIG_PACKING=y + CONFIG_BITREVERSE=y + CONFIG_GENERIC_STRNCPY_FROM_USER=y + CONFIG_GENERIC_STRNLEN_USER=y +@@ -5776,7 +6597,9 @@ + # + CONFIG_CRYPTO_LIB_UTILS=y + CONFIG_CRYPTO_LIB_AES=y ++CONFIG_CRYPTO_LIB_ARC4=m + CONFIG_CRYPTO_LIB_GF128MUL=y ++CONFIG_CRYPTO_ARCH_HAVE_LIB_BLAKE2S=y + CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y + # CONFIG_CRYPTO_LIB_CHACHA is not set + # CONFIG_CRYPTO_LIB_CURVE25519 is not set +@@ -5801,7 +6624,7 @@ + CONFIG_CRC64=y + # CONFIG_CRC4 is not set + # CONFIG_CRC7 is not set +-# CONFIG_LIBCRC32C is not set ++CONFIG_LIBCRC32C=m + # CONFIG_CRC8 is not set + CONFIG_XXHASH=y + # CONFIG_RANDOM32_SELFTEST is not set +@@ -5820,7 +6643,7 @@ + CONFIG_XZ_DEC_ARM=y + CONFIG_XZ_DEC_ARMTHUMB=y + CONFIG_XZ_DEC_SPARC=y +-# CONFIG_XZ_DEC_MICROLZMA is not set ++CONFIG_XZ_DEC_MICROLZMA=y + CONFIG_XZ_DEC_BCJ=y + # CONFIG_XZ_DEC_TEST is not set + CONFIG_DECOMPRESS_GZIP=y +@@ -5845,13 +6668,13 @@ + CONFIG_ARCH_DMA_ADDR_T_64BIT=y + CONFIG_ARCH_HAS_FORCE_DMA_UNENCRYPTED=y + CONFIG_SWIOTLB=y +-# CONFIG_SWIOTLB_DYNAMIC is not set ++CONFIG_SWIOTLB_DYNAMIC=y + CONFIG_DMA_COHERENT_POOL=y +-# CONFIG_DMA_CMA is not set + # CONFIG_DMA_API_DEBUG is not set + # CONFIG_DMA_MAP_BENCHMARK is not set + CONFIG_SGL_ALLOC=y + CONFIG_IOMMU_HELPER=y ++CONFIG_CHECK_SIGNATURE=y + CONFIG_CPUMASK_OFFSTACK=y + # CONFIG_FORCE_NR_CPUS is not set + CONFIG_CPU_RMAP=y +@@ -5869,9 +6692,20 @@ + CONFIG_GENERIC_GETTIMEOFDAY=y + CONFIG_GENERIC_VDSO_TIME_NS=y + CONFIG_FONT_SUPPORT=y +-# CONFIG_FONTS is not set ++CONFIG_FONTS=y + CONFIG_FONT_8x8=y + CONFIG_FONT_8x16=y ++# CONFIG_FONT_6x11 is not set ++# CONFIG_FONT_7x14 is not set ++# CONFIG_FONT_PEARL_8x8 is not set ++CONFIG_FONT_ACORN_8x8=y ++# CONFIG_FONT_MINI_4x6 is not set ++CONFIG_FONT_6x10=y ++# CONFIG_FONT_10x18 is not set ++# CONFIG_FONT_SUN8x16 is not set ++# CONFIG_FONT_SUN12x22 is not set ++CONFIG_FONT_TER16x32=y ++# CONFIG_FONT_6x8 is not set + CONFIG_SG_POOL=y + CONFIG_ARCH_HAS_PMEM_API=y + CONFIG_MEMREGION=y +@@ -5896,7 +6730,7 @@ + # CONFIG_PRINTK_CALLER is not set + # CONFIG_STACKTRACE_BUILD_ID is not set + CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 +-CONFIG_CONSOLE_LOGLEVEL_QUIET=4 ++CONFIG_CONSOLE_LOGLEVEL_QUIET=3 + CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4 + CONFIG_BOOT_PRINTK_DELAY=y + CONFIG_DYNAMIC_DEBUG=y +@@ -5915,8 +6749,8 @@ + CONFIG_AS_HAS_NON_CONST_LEB128=y + # CONFIG_DEBUG_INFO_NONE is not set + # CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT is not set +-CONFIG_DEBUG_INFO_DWARF4=y +-# CONFIG_DEBUG_INFO_DWARF5 is not set ++# CONFIG_DEBUG_INFO_DWARF4 is not set ++CONFIG_DEBUG_INFO_DWARF5=y + # CONFIG_DEBUG_INFO_REDUCED is not set + CONFIG_DEBUG_INFO_COMPRESSED_NONE=y + # CONFIG_DEBUG_INFO_COMPRESSED_ZLIB is not set +@@ -5937,7 +6771,7 @@ + CONFIG_FRAME_POINTER=y + CONFIG_OBJTOOL=y + CONFIG_STACK_VALIDATION=y +-# CONFIG_VMLINUX_MAP is not set ++CONFIG_VMLINUX_MAP=y + # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set + # end of Compile-time checks and compiler options + +@@ -5964,7 +6798,18 @@ + CONFIG_KDB_CONTINUE_CATASTROPHIC=0 + CONFIG_ARCH_HAS_EARLY_DEBUG=y + CONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y +-# CONFIG_UBSAN is not set ++CONFIG_UBSAN=y ++# CONFIG_UBSAN_TRAP is not set ++CONFIG_CC_HAS_UBSAN_BOUNDS_STRICT=y ++CONFIG_UBSAN_BOUNDS=y ++CONFIG_UBSAN_BOUNDS_STRICT=y ++CONFIG_UBSAN_SHIFT=y ++# CONFIG_UBSAN_DIV_ZERO is not set ++CONFIG_UBSAN_BOOL=y ++CONFIG_UBSAN_ENUM=y ++# CONFIG_UBSAN_ALIGNMENT is not set ++CONFIG_UBSAN_SANITIZE_ALL=y ++# CONFIG_TEST_UBSAN is not set + CONFIG_HAVE_ARCH_KCSAN=y + CONFIG_HAVE_KCSAN_COMPILER=y + # CONFIG_KCSAN is not set +@@ -5987,7 +6832,7 @@ + # CONFIG_SLUB_DEBUG_ON is not set + # CONFIG_PAGE_OWNER is not set + # CONFIG_PAGE_TABLE_CHECK is not set +-# CONFIG_PAGE_POISONING is not set ++CONFIG_PAGE_POISONING=y + # CONFIG_DEBUG_PAGE_REF is not set + # CONFIG_DEBUG_RODATA_TEST is not set + CONFIG_ARCH_HAS_DEBUG_WX=y +@@ -6015,7 +6860,12 @@ + CONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y + # CONFIG_KASAN is not set + CONFIG_HAVE_ARCH_KFENCE=y +-# CONFIG_KFENCE is not set ++CONFIG_KFENCE=y ++CONFIG_KFENCE_SAMPLE_INTERVAL=0 ++CONFIG_KFENCE_NUM_OBJECTS=255 ++# CONFIG_KFENCE_DEFERRABLE is not set ++# CONFIG_KFENCE_STATIC_KEYS is not set ++CONFIG_KFENCE_STRESS_TEST_FAULTS=0 + CONFIG_HAVE_ARCH_KMSAN=y + # end of Memory Debugging + +@@ -6043,7 +6893,7 @@ + CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 + # CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set + # CONFIG_WQ_WATCHDOG is not set +-# CONFIG_WQ_CPU_INTENSIVE_REPORT is not set ++CONFIG_WQ_CPU_INTENSIVE_REPORT=y + # CONFIG_TEST_LOCKUP is not set + # end of Debug Oops, Lockups and Hangs + +@@ -6056,7 +6906,7 @@ + # end of Scheduler Debugging + + # CONFIG_DEBUG_TIMEKEEPING is not set +-CONFIG_DEBUG_PREEMPT=y ++# CONFIG_DEBUG_PREEMPT is not set + + # + # Lock Debugging (spinlocks, mutexes, etc...) +@@ -6078,7 +6928,7 @@ + # CONFIG_CSD_LOCK_WAIT_DEBUG is not set + # end of Lock Debugging (spinlocks, mutexes, etc...) + +-# CONFIG_NMI_CHECK_CPU is not set ++CONFIG_NMI_CHECK_CPU=y + # CONFIG_DEBUG_IRQFLAGS is not set + CONFIG_STACKTRACE=y + # CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set +@@ -6102,14 +6952,14 @@ + # CONFIG_RCU_REF_SCALE_TEST is not set + CONFIG_RCU_CPU_STALL_TIMEOUT=60 + CONFIG_RCU_EXP_CPU_STALL_TIMEOUT=0 +-# CONFIG_RCU_CPU_STALL_CPUTIME is not set ++CONFIG_RCU_CPU_STALL_CPUTIME=y + # CONFIG_RCU_TRACE is not set + # CONFIG_RCU_EQS_DEBUG is not set + # end of RCU Debugging + + # CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set + # CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set +-# CONFIG_LATENCYTOP is not set ++CONFIG_LATENCYTOP=y + # CONFIG_DEBUG_CGROUP_REF is not set + CONFIG_USER_STACKTRACE_SUPPORT=y + CONFIG_NOP_TRACER=y +@@ -6140,23 +6990,23 @@ + CONFIG_GENERIC_TRACER=y + CONFIG_TRACING_SUPPORT=y + CONFIG_FTRACE=y +-# CONFIG_BOOTTIME_TRACING is not set ++CONFIG_BOOTTIME_TRACING=y + CONFIG_FUNCTION_TRACER=y + CONFIG_FUNCTION_GRAPH_TRACER=y +-# CONFIG_FUNCTION_GRAPH_RETVAL is not set ++CONFIG_FUNCTION_GRAPH_RETVAL=y + CONFIG_DYNAMIC_FTRACE=y + CONFIG_DYNAMIC_FTRACE_WITH_REGS=y + CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS=y + CONFIG_DYNAMIC_FTRACE_WITH_ARGS=y +-# CONFIG_FPROBE is not set ++CONFIG_FPROBE=y + CONFIG_FUNCTION_PROFILER=y + CONFIG_STACK_TRACER=y + # CONFIG_IRQSOFF_TRACER is not set + # CONFIG_PREEMPT_TRACER is not set + CONFIG_SCHED_TRACER=y + CONFIG_HWLAT_TRACER=y +-# CONFIG_OSNOISE_TRACER is not set +-# CONFIG_TIMERLAT_TRACER is not set ++CONFIG_OSNOISE_TRACER=y ++CONFIG_TIMERLAT_TRACER=y + CONFIG_MMIOTRACE=y + CONFIG_FTRACE_SYSCALLS=y + CONFIG_TRACER_SNAPSHOT=y +@@ -6164,20 +7014,21 @@ + CONFIG_BRANCH_PROFILE_NONE=y + # CONFIG_PROFILE_ANNOTATED_BRANCHES is not set + CONFIG_BLK_DEV_IO_TRACE=y ++CONFIG_FPROBE_EVENTS=y + CONFIG_KPROBE_EVENTS=y + # CONFIG_KPROBE_EVENTS_ON_NOTRACE is not set + CONFIG_UPROBE_EVENTS=y + CONFIG_BPF_EVENTS=y + CONFIG_DYNAMIC_EVENTS=y + CONFIG_PROBE_EVENTS=y +-# CONFIG_BPF_KPROBE_OVERRIDE is not set ++CONFIG_BPF_KPROBE_OVERRIDE=y + CONFIG_FTRACE_MCOUNT_RECORD=y + CONFIG_FTRACE_MCOUNT_USE_CC=y + CONFIG_TRACING_MAP=y + CONFIG_SYNTH_EVENTS=y +-# CONFIG_USER_EVENTS is not set ++CONFIG_USER_EVENTS=y + CONFIG_HIST_TRIGGERS=y +-# CONFIG_TRACE_EVENT_INJECT is not set ++CONFIG_TRACE_EVENT_INJECT=y + # CONFIG_TRACEPOINT_BENCHMARK is not set + # CONFIG_RING_BUFFER_BENCHMARK is not set + # CONFIG_TRACE_EVAL_MAP_FILE is not set +@@ -6191,9 +7042,33 @@ + # CONFIG_SYNTH_EVENT_GEN_TEST is not set + # CONFIG_KPROBE_EVENT_GEN_TEST is not set + # CONFIG_HIST_TRIGGERS_DEBUG is not set +-# CONFIG_RV is not set ++CONFIG_DA_MON_EVENTS=y ++CONFIG_DA_MON_EVENTS_ID=y ++CONFIG_RV=y ++CONFIG_RV_MON_WWNR=y ++CONFIG_RV_REACTORS=y ++CONFIG_RV_REACT_PRINTK=y ++CONFIG_RV_REACT_PANIC=y + # CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set +-# CONFIG_SAMPLES is not set ++CONFIG_SAMPLES=y ++# CONFIG_SAMPLE_AUXDISPLAY is not set ++# CONFIG_SAMPLE_TRACE_EVENTS is not set ++# CONFIG_SAMPLE_TRACE_CUSTOM_EVENTS is not set ++# CONFIG_SAMPLE_TRACE_PRINTK is not set ++# CONFIG_SAMPLE_FTRACE_DIRECT is not set ++# CONFIG_SAMPLE_FTRACE_DIRECT_MULTI is not set ++# CONFIG_SAMPLE_FTRACE_OPS is not set ++# CONFIG_SAMPLE_TRACE_ARRAY is not set ++# CONFIG_SAMPLE_KOBJECT is not set ++# CONFIG_SAMPLE_KPROBES is not set ++# CONFIG_SAMPLE_HW_BREAKPOINT is not set ++# CONFIG_SAMPLE_FPROBE is not set ++# CONFIG_SAMPLE_KFIFO is not set ++# CONFIG_SAMPLE_KDB is not set ++# CONFIG_SAMPLE_LIVEPATCH is not set ++# CONFIG_SAMPLE_CONFIGFS is not set ++# CONFIG_SAMPLE_VFIO_MDEV_MDPY_FB is not set ++# CONFIG_SAMPLE_WATCHDOG is not set + CONFIG_HAVE_SAMPLE_FTRACE_DIRECT=y + CONFIG_HAVE_SAMPLE_FTRACE_DIRECT_MULTI=y + CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y +@@ -6207,7 +7082,7 @@ + # CONFIG_X86_VERBOSE_BOOTUP is not set + CONFIG_EARLY_PRINTK=y + CONFIG_EARLY_PRINTK_DBGP=y +-# CONFIG_EARLY_PRINTK_USB_XDBC is not set ++CONFIG_EARLY_PRINTK_USB_XDBC=y + # CONFIG_EFI_PGT_DUMP is not set + # CONFIG_DEBUG_TLBFLUSH is not set + # CONFIG_IOMMU_DEBUG is not set +diff -Naur original/drivers/acpi/acpi_pad.c patched/drivers/acpi/acpi_pad.c +--- original/drivers/acpi/acpi_pad.c 2024-07-15 09:10:38.771859555 -0700 ++++ patched/drivers/acpi/acpi_pad.c 2024-07-15 09:11:08.056275279 -0700 +@@ -21,6 +21,8 @@ + #include + #include + ++#include ++ + #define ACPI_PROCESSOR_AGGREGATOR_CLASS "acpi_pad" + #define ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME "Processor Aggregator" + #define ACPI_PROCESSOR_AGGREGATOR_NOTIFY 0x80 +@@ -173,7 +175,9 @@ + tick_broadcast_enter(); + stop_critical_timings(); + ++ kutrace1(KUTRACE_MWAIT, power_saving_mwait_eax); + mwait_idle_with_hints(power_saving_mwait_eax, 1); ++ /*kutrace1(0x20C, 4);*/ /* d */ + + start_critical_timings(); + tick_broadcast_exit(); +@@ -204,8 +208,10 @@ + * we need to deal with it, or this loop will continue to + * spin without calling __mwait(). + */ +- if (unlikely(need_resched())) ++ if (unlikely(need_resched())) { ++ /*kutrace1(0x20C, 5);*/ /* e */ + schedule(); ++ } + } + + exit_round_robin(tsk_index); +diff -Naur original/drivers/acpi/processor_idle.c patched/drivers/acpi/processor_idle.c +--- original/drivers/acpi/processor_idle.c 2024-07-15 09:10:38.771859555 -0700 ++++ patched/drivers/acpi/processor_idle.c 2024-07-15 09:11:08.056275279 -0700 +@@ -25,6 +25,8 @@ + #include + #include + ++#include ++ + /* + * Include the apic definitions for x86 to have the APIC timer related defines + * available also for UP (on SMP it gets magically included via linux/smp.h). +@@ -526,6 +528,7 @@ + static __cpuidle void io_idle(unsigned long addr) + { + /* IO port based C-state */ ++ kutrace1(KUTRACE_MWAIT, 255); /* Flag to make this patch distinctive */ + inb(addr); + + #ifdef CONFIG_X86 +diff -Naur original/drivers/idle/intel_idle.c patched/drivers/idle/intel_idle.c +--- original/drivers/idle/intel_idle.c 2024-07-15 09:10:38.771859555 -0700 ++++ patched/drivers/idle/intel_idle.c 2024-07-15 09:11:08.056275279 -0700 +@@ -58,6 +58,8 @@ + #include + #include + ++#include ++ + #define INTEL_IDLE_VERSION "0.5.1" + + static struct cpuidle_driver intel_idle_driver = { +@@ -138,7 +140,9 @@ + unsigned long eax = flg2MWAIT(state->flags); + unsigned long ecx = 1*irqoff; /* break on interrupt flag */ + ++ kutrace1(KUTRACE_MWAIT, eax); + mwait_idle_with_hints(eax, ecx); ++ /*kutrace1(0x20C, 2);*/ /* b */ + + return index; + } +@@ -216,7 +220,9 @@ + if (state->flags & CPUIDLE_FLAG_INIT_XSTATE) + fpu_idle_fpregs(); + ++ kutrace1(KUTRACE_MWAIT, eax); + mwait_idle_with_hints(eax, ecx); ++ /*kutrace1(0x20C, 3);*/ /* c */ + + return 0; + } +diff -Naur original/fs/exec.c patched/fs/exec.c +--- original/fs/exec.c 2024-07-15 09:10:38.771859555 -0700 ++++ patched/fs/exec.c 2024-07-15 09:11:08.056275279 -0700 +@@ -76,6 +76,8 @@ + + #include + ++#include ++ + static int bprm_creds_from_file(struct linux_binprm *bprm); + + int suid_dumpable = 0; +@@ -1966,6 +1968,9 @@ + } + + retval = bprm_execve(bprm, fd, filename, flags); ++ /* Unconditionally put new pid name into trace */ ++ kutrace_pidrename(current); ++ + out_free: + free_bprm(bprm); + +diff -Naur original/include/linux/kutrace.h patched/include/linux/kutrace.h +--- original/include/linux/kutrace.h 1969-12-31 16:00:00.000000000 -0800 ++++ patched/include/linux/kutrace.h 2024-07-15 09:11:08.056275279 -0700 +@@ -0,0 +1,185 @@ ++// SPDX-License-Identifier: BSD-3-Clause ++/* ++ * include/linux/kutrace.h ++ * ++ * Author: Richard Sites ++ * Signed-off-by: Richard Sites ++ */ ++ ++#ifndef _LINUX_KUTRACE_H ++#define _LINUX_KUTRACE_H ++ ++#include ++ ++/* Take over last syscall number for controlling kutrace */ ++#define __NR_kutrace_control 1023 ++ ++/* Take over last syscall number for tracing scheduler call/return */ ++#define KUTRACE_SCHEDSYSCALL 1023 ++ ++/* kutrace_control() commands */ ++#define KUTRACE_CMD_OFF 0 ++#define KUTRACE_CMD_ON 1 ++#define KUTRACE_CMD_FLUSH 2 ++#define KUTRACE_CMD_RESET 3 ++#define KUTRACE_CMD_STAT 4 ++#define KUTRACE_CMD_GETCOUNT 5 ++#define KUTRACE_CMD_GETWORD 6 ++#define KUTRACE_CMD_INSERT1 7 ++#define KUTRACE_CMD_INSERTN 8 ++#define KUTRACE_CMD_GETIPCWORD 9 ++#define KUTRACE_CMD_TEST 10 ++#define KUTRACE_CMD_VERSION 11 ++ ++ ++/* This is a *shortened* list of kernel-mode raw trace 12-bit event numbers */ ++/* See user-mode kutrace_lib.h for the full set */ ++ ++/* Entry to provide names for PIDs */ ++#define KUTRACE_PIDNAME 0x002 ++ ++ ++// Specials are point events ++#define KUTRACE_USERPID 0x200 /* Context switch: new PID */ ++#define KUTRACE_RPCIDREQ 0x201 ++#define KUTRACE_RPCIDRESP 0x202 ++#define KUTRACE_RPCIDMID 0x203 ++#define KUTRACE_RPCIDRXPKT 0x204 ++#define KUTRACE_RPCIDTXPKT 0x205 ++#define KUTRACE_RUNNABLE 0x206 /* Set process runnable: PID */ ++#define KUTRACE_IPI 0x207 /* Send IPI; receive is an interrupt */ ++#define KUTRACE_MWAIT 0x208 /* C-states */ ++#define KUTRACE_PSTATE 0x209 /* P-states */ ++#define KUTRACE_RX_PKT 0x214 /* Raw packet received w/payload hash */ ++#define KUTRACE_TX_PKT 0x215 /* Raw packet sent w/payload hash */ ++#define KUTRACE_TSDELTA 0x21D /* Delta to advance timestamp */ ++#define KUTRACE_MONITORSTORE 0x21E /* Store into a monitored location; does wakeup */ ++#define KUTRACE_MONITOREXIT 0x21F /* Mwait exits due to store */ ++ ++ ++/* Entry to provide a PC sample at timer interrupts (profiling) */ ++#define KUTRACE_PC 0x280 ++ ++ ++/* These are in blocks of 256 numbers */ ++#define KUTRACE_TRAP 0x0400 /* AKA fault */ ++#define KUTRACE_IRQ 0x0500 ++#define KUTRACE_TRAPRET 0x0600 ++#define KUTRACE_IRQRET 0x0700 ++ ++ ++/* These are in blocks of 512 numbers */ ++#define KUTRACE_SYSCALL64 0x0800 ++#define KUTRACE_SYSRET64 0x0A00 ++#define KUTRACE_SYSCALL32 0x0C00 ++#define KUTRACE_SYSRET32 0x0E00 ++ ++/* Specific trap number for page fault */ ++#define KUTRACE_PAGEFAULT 14 ++ ++/* Reuse the spurious_apic vector to show bottom halves exeuting */ ++#define KUTRACE_BOTTOM_HALF 255 ++ ++/* Procedure interface to loadable module or compiled-in kutrace.c */ ++struct kutrace_ops { ++ void (*kutrace_trace_1)(u64 num, u64 arg); ++ void (*kutrace_trace_2)(u64 num, u64 arg1, u64 arg2); ++ void (*kutrace_trace_many)(u64 num, u64 len, const char *arg); ++ u64 (*kutrace_trace_control)(u64 command, u64 arg); ++}; ++ ++/* Packet filter parameters */ ++struct kutrace_nf { ++ u64 hash_init; ++ u64 hash_mask[3]; ++}; ++ ++/* Per-cpu struct */ ++struct kutrace_traceblock { ++ atomic64_t next; /* Next u64 in current per-cpu trace block */ ++ u64 *limit; /* Off-the-end u64 in current per-cpu block */ ++ u64 prior_cycles; /* Cycle tracking */ ++ u64 prior_inst_retired; /* IPC tracking */ ++ u64 prior_llc_misses; /* LLC tracking */ ++}; ++ ++ ++#ifdef CONFIG_KUTRACE ++/* Global variables used by kutrace. Defined in kernel/kutrace/kutrace.c */ ++extern bool kutrace_tracing; ++extern struct kutrace_ops kutrace_global_ops; ++extern u64 *kutrace_pid_filter; ++extern struct kutrace_nf kutrace_net_filter; ++ ++/* Insert pid name if first time seen. Races don't matter here. */ ++#define kutrace_pidname(next) \ ++ if (kutrace_tracing) { \ ++ pid_t pid16 = next->pid & 0xffff; \ ++ pid_t pid_hi = pid16 >> 6; \ ++ u64 pid_bit = 1ul << (pid16 & 0x3f); \ ++ if ((kutrace_pid_filter[pid_hi] & pid_bit) == 0) { \ ++ u64 name_entry[3]; \ ++ name_entry[0] = pid16; \ ++ memcpy(&name_entry[1], next->comm, 16); \ ++ (*kutrace_global_ops.kutrace_trace_many)( \ ++ KUTRACE_PIDNAME, 3l, (const char*)&name_entry[0]); \ ++ kutrace_pid_filter[pid_hi] |= pid_bit; \ ++ } \ ++ } ++ ++/* Unconditionally insert or reset pid name. Races don't matter here. */ ++#define kutrace_pidrename(next) \ ++ if (kutrace_tracing) { \ ++ pid_t pid16 = next->pid & 0xffff; \ ++ pid_t pid_hi = pid16 >> 6; \ ++ u64 pid_bit = 1ul << (pid16 & 0x3f); \ ++ if (true) { \ ++ u64 name_entry[3]; \ ++ name_entry[0] = pid16; \ ++ memcpy(&name_entry[1], next->comm, 16); \ ++ (*kutrace_global_ops.kutrace_trace_many)( \ ++ KUTRACE_PIDNAME, 3l, (const char*)&name_entry[0]); \ ++ kutrace_pid_filter[pid_hi] |= pid_bit; \ ++ } \ ++ } ++ ++/* Filter packet payload and if passes insert 32-byte hash into trace */ ++/* Mask first payload 24 bytes, XOR, and check for expected value */ ++/* ku_payload may well not be 8-byte aligned, but only 4-byte */ ++#define kutrace_pkttrace(rx_tx, ku_payload) \ ++do { \ ++ u64 hash = kutrace_net_filter.hash_init; \ ++ hash ^= (ku_payload[0] & kutrace_net_filter.hash_mask[0]); \ ++ hash ^= (ku_payload[1] & kutrace_net_filter.hash_mask[1]); \ ++ hash ^= (ku_payload[2] & kutrace_net_filter.hash_mask[2]); \ ++ hash ^= (hash >> 32); \ ++ hash &= 0x00000000ffffffffLLU; /* The filter hash */ \ ++ if (hash == 0) { \ ++ /* We passed the filter; now hash first 32 bytes and record */ \ ++ hash = ku_payload[0] ^ ku_payload[1] ^ ku_payload[2] ^ ku_payload[3]; \ ++ hash ^= (hash >> 32); \ ++ hash &= 0x00000000ffffffffLLU; \ ++ kutrace1(rx_tx, hash); \ ++ } \ ++} while(0); ++ ++#define kutrace1(event, arg) \ ++ if (kutrace_tracing) { \ ++ (*kutrace_global_ops.kutrace_trace_1)(event, arg); \ ++ } ++ ++/* map_nr moves 32-bit syscalls 0x200..3FF to 0x400..5FF */ ++#define kutrace_map_nr(nr) (nr + (nr & 0x200)) ++ ++#else ++ ++#define kutrace_pidname(next) ++#define kutrace_pidrename(next) ++#define kutrace1(event, arg) ++#define kutrace_map_nr(nr) (nr) ++ ++#endif ++ ++ ++#endif /* _LINUX_KUTRACE_H */ ++ +diff -Naur original/kernel/kutrace/kutrace.c patched/kernel/kutrace/kutrace.c +--- original/kernel/kutrace/kutrace.c 1969-12-31 16:00:00.000000000 -0800 ++++ patched/kernel/kutrace/kutrace.c 2024-07-15 09:11:08.056275279 -0700 +@@ -0,0 +1,37 @@ ++// SPDX-License-Identifier: BSD-3-Clause ++/* ++ * kernel/kutrace/kutrace.c ++ * ++ * Author: Richard Sites ++ * Signed-off-by: Richard Sites ++ */ ++ ++/* ++ * Small hooks for a module that implements kernel/user tracing ++ * See include/linux/kutrace.h for struct definitions ++ * ++ * Most patches will be something like ++ * kutrace1(event, arg) ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++ ++bool kutrace_tracing = false; ++EXPORT_SYMBOL(kutrace_tracing); ++ ++struct kutrace_ops kutrace_global_ops = {NULL, NULL, NULL, NULL}; ++EXPORT_SYMBOL(kutrace_global_ops); ++ ++u64* kutrace_pid_filter = NULL; ++EXPORT_SYMBOL(kutrace_pid_filter); ++ ++struct kutrace_nf kutrace_net_filter = {0LLU, {0LLU, 0LLU, 0LLU}}; ++EXPORT_SYMBOL(kutrace_net_filter); ++ ++DEFINE_PER_CPU(struct kutrace_traceblock, kutrace_traceblock_per_cpu); ++EXPORT_PER_CPU_SYMBOL(kutrace_traceblock_per_cpu); ++ +diff -Naur original/kernel/kutrace/Makefile patched/kernel/kutrace/Makefile +--- original/kernel/kutrace/Makefile 1969-12-31 16:00:00.000000000 -0800 ++++ patched/kernel/kutrace/Makefile 2024-07-15 09:11:08.056275279 -0700 +@@ -0,0 +1,3 @@ ++# dssites 2024.07.02 ++obj-$(CONFIG_KUTRACE) += kutrace.o ++ +diff -Naur original/kernel/Makefile patched/kernel/Makefile +--- original/kernel/Makefile 2024-07-15 09:10:38.775859611 -0700 ++++ patched/kernel/Makefile 2024-07-15 09:11:08.056275279 -0700 +@@ -158,4 +158,6 @@ + $(obj)/kheaders_data.tar.xz: FORCE + $(call cmd,genikh) + ++obj-$(CONFIG_KUTRACE) += kutrace/ ++ + clean-files := kheaders_data.tar.xz kheaders.md5 +diff -Naur original/kernel/sched/core.c patched/kernel/sched/core.c +--- original/kernel/sched/core.c 2024-07-15 09:10:38.775859611 -0700 ++++ patched/kernel/sched/core.c 2024-07-15 09:11:08.056275279 -0700 +@@ -96,6 +96,8 @@ + #include "../../io_uring/io-wq.h" + #include "../smpboot.h" + ++#include ++ + EXPORT_TRACEPOINT_SYMBOL_GPL(ipi_send_cpu); + EXPORT_TRACEPOINT_SYMBOL_GPL(ipi_send_cpumask); + +@@ -1058,8 +1060,10 @@ + + if (set_nr_and_not_polling(curr)) + smp_send_reschedule(cpu); +- else ++ else { ++ kutrace1(KUTRACE_MONITORSTORE, cpu); + trace_sched_wake_idle_without_ipi(cpu); ++ } + } + + void resched_cpu(int cpu) +@@ -1134,8 +1138,10 @@ + + if (set_nr_and_not_polling(rq->idle)) + smp_send_reschedule(cpu); +- else ++ else { ++ kutrace1(KUTRACE_MONITORSTORE, cpu); + trace_sched_wake_idle_without_ipi(cpu); ++ } + } + + static bool wake_up_full_nohz_cpu(int cpu) +@@ -3763,6 +3769,7 @@ + */ + static inline void ttwu_do_wakeup(struct task_struct *p) + { ++ kutrace1(KUTRACE_RUNNABLE, p->pid); + WRITE_ONCE(p->__state, TASK_RUNNING); + trace_sched_wakeup(p); + } +@@ -3917,6 +3924,7 @@ + bool call_function_single_prep_ipi(int cpu) + { + if (set_nr_if_polling(cpu_rq(cpu)->idle)) { ++ kutrace1(KUTRACE_MONITORSTORE, cpu); + trace_sched_wake_idle_without_ipi(cpu); + return false; + } +@@ -4855,6 +4863,8 @@ + struct rq *rq; + + raw_spin_lock_irqsave(&p->pi_lock, rf.flags); ++ ++ kutrace1(KUTRACE_RUNNABLE, p->pid); + WRITE_ONCE(p->__state, TASK_RUNNING); + #ifdef CONFIG_SMP + /* +@@ -6584,6 +6594,8 @@ + struct rq *rq; + int cpu; + ++ kutrace1(KUTRACE_SYSCALL64 + kutrace_map_nr(KUTRACE_SCHEDSYSCALL), 0); ++ + cpu = smp_processor_id(); + rq = cpu_rq(cpu); + prev = rq->curr; +@@ -6628,6 +6640,7 @@ + prev_state = READ_ONCE(prev->__state); + if (!(sched_mode & SM_MASK_PREEMPT) && prev_state) { + if (signal_pending_state(prev_state, prev)) { ++ /* No kutrace here; just gives bogus arc */ + WRITE_ONCE(prev->__state, TASK_RUNNING); + } else { + prev->sched_contributes_to_load = +@@ -6694,6 +6707,10 @@ + + trace_sched_switch(sched_mode & SM_MASK_PREEMPT, prev, next, prev_state); + ++ /* Put pid name into trace first time */ ++ kutrace_pidname(next); ++ kutrace1(KUTRACE_USERPID, next->pid); ++ + /* Also unlocks the rq: */ + rq = context_switch(rq, prev, next, &rf); + } else { +@@ -6701,6 +6718,7 @@ + __balance_callbacks(rq); + raw_spin_rq_unlock_irq(rq); + } ++ kutrace1(KUTRACE_SYSRET64 + kutrace_map_nr(KUTRACE_SCHEDSYSCALL), 0); + } + + void __noreturn do_task_dead(void) +diff -Naur original/kernel/softirq.c patched/kernel/softirq.c +--- original/kernel/softirq.c 2024-07-15 09:10:38.775859611 -0700 ++++ patched/kernel/softirq.c 2024-07-15 09:11:08.056275279 -0700 +@@ -33,6 +33,8 @@ + #define CREATE_TRACE_POINTS + #include + ++#include ++ + /* + - No shared variables, all the data are CPU local. + - If a softirq needs serialization, let it serialize itself +@@ -549,9 +551,12 @@ + + kstat_incr_softirqs_this_cpu(vec_nr); + ++ kutrace1(KUTRACE_IRQ + KUTRACE_BOTTOM_HALF, vec_nr); + trace_softirq_entry(vec_nr); + h->action(h); + trace_softirq_exit(vec_nr); ++ kutrace1(KUTRACE_IRQRET + KUTRACE_BOTTOM_HALF, 0); ++ + if (unlikely(prev_count != preempt_count())) { + pr_err("huh, entered softirq %u %s %p with preempt_count %08x, exited with %08x?\n", + vec_nr, softirq_to_name[vec_nr], h->action, +diff -Naur original/net/ipv4/tcp_input.c patched/net/ipv4/tcp_input.c +--- original/net/ipv4/tcp_input.c 2024-07-15 09:10:38.775859611 -0700 ++++ patched/net/ipv4/tcp_input.c 2024-07-15 09:11:08.056275279 -0700 +@@ -81,6 +81,8 @@ + #include + #include + ++#include ++ + int sysctl_tcp_max_orphans __read_mostly = NR_FILE; + + #define FLAG_DATA 0x01 /* Incoming frame contained data. */ +@@ -5890,6 +5892,19 @@ + struct tcp_sock *tp = tcp_sk(sk); + unsigned int len = skb->len; + ++/* Apply quick filter and if it passes, make a KUtrace entry for */ ++/* rx packet. Use XOR of first 32 bytes as the recorded argument value */ ++#ifdef CONFIG_KUTRACE ++ if (kutrace_tracing && ((20 + 32) <= len)) { ++ int ku_hdr_len = th->doff << 2; ++ const u64 *ku_payload = (u64*)(skb->data + ku_hdr_len); ++ int ku_payloadlen = len - ku_hdr_len; ++ if (32 <= ku_payloadlen) { ++ kutrace_pkttrace(KUTRACE_RX_PKT, ku_payload); ++ } ++ } ++#endif ++ + /* TCP congestion window tracking */ + trace_tcp_probe(sk, skb); + +diff -Naur original/net/ipv4/tcp_output.c patched/net/ipv4/tcp_output.c +--- original/net/ipv4/tcp_output.c 2024-07-15 09:10:38.775859611 -0700 ++++ patched/net/ipv4/tcp_output.c 2024-07-15 09:11:08.056275279 -0700 +@@ -47,6 +47,8 @@ + + #include + ++#include ++ + /* Refresh clocks of a TCP socket, + * ensuring monotically increasing values. + */ +@@ -1412,6 +1414,15 @@ + + tcp_add_tx_delay(skb, tp); + ++/* Apply quick filter and if it passes, make a KUtrace entry for tx packet. */ ++/* Use XOR of first 32 bytes as the recorded argument value */ ++#ifdef CONFIG_KUTRACE ++ if (kutrace_tracing && ((tcp_header_size + 32) <= skb->len)) { ++ const u64 *ku_payload = (u64*)(skb->data + tcp_header_size); ++ kutrace_pkttrace(KUTRACE_TX_PKT, ku_payload); ++ } ++#endif ++ + err = INDIRECT_CALL_INET(icsk->icsk_af_ops->queue_xmit, + inet6_csk_xmit, ip_queue_xmit, + sk, skb, &inet->cork.fl); +diff -Naur original/net/ipv4/udp.c patched/net/ipv4/udp.c +--- original/net/ipv4/udp.c 2024-07-15 09:10:38.775859611 -0700 ++++ patched/net/ipv4/udp.c 2024-07-15 09:11:08.056275279 -0700 +@@ -119,6 +119,8 @@ + #include + #endif + ++#include ++ + struct udp_table udp_table __read_mostly; + EXPORT_SYMBOL(udp_table); + +@@ -979,6 +981,14 @@ + uh->check = CSUM_MANGLED_0; + + send: ++/* Use XOR of first 32 bytes as the recorded argument value */ ++#ifdef CONFIG_KUTRACE ++ if (kutrace_tracing && ((8 + 32) <= len)) { ++ int ku_hdr_len = 8; ++ const u64 *ku_payload = (u64*)((u8*)(uh) + ku_hdr_len); ++ kutrace_pkttrace(KUTRACE_TX_PKT, ku_payload); ++ } ++#endif + err = ip_send_skb(sock_net(sk), skb); + if (err) { + if (err == -ENOBUFS && +@@ -2418,6 +2428,17 @@ + if (udp4_csum_init(skb, uh, proto)) + goto csum_error; + ++/* Apply quick filter and if it passes, make a KUtrace entry for rx packet. */ ++/* Use XOR of first 32 bytes as the recorded argument value */ ++#ifdef CONFIG_KUTRACE ++ if (kutrace_tracing && ((8 + 32) <= ulen)) { ++ int ku_hdr_len = 8; ++ const u64 *ku_payload = (u64*)((u8*)(uh) + ku_hdr_len); ++ kutrace_pkttrace(KUTRACE_RX_PKT, ku_payload); ++ } ++ ++#endif ++ + sk = inet_steal_sock(net, skb, sizeof(struct udphdr), saddr, uh->source, daddr, uh->dest, + &refcounted, udp_ehashfn); + if (IS_ERR(sk)) diff --git a/linux/loadable-module/Use_module_instead b/linux/loadable-module/Use_module_instead deleted file mode 100644 index a2e8704d26d2..000000000000 --- a/linux/loadable-module/Use_module_instead +++ /dev/null @@ -1 +0,0 @@ -Use the code in the module folder, not here in the loadable-module folder. diff --git a/linux/module/kutrace_mod.c b/linux/module/kutrace_mod.c index b3262e6c96bf..5f01db71301c 100644 --- a/linux/module/kutrace_mod.c +++ b/linux/module/kutrace_mod.c @@ -1,16 +1,26 @@ /* - * kutrace_mod.c + * kutrace_mod_llc.c * * Author: Richard Sites * - * SPDX-License-Identifier: GPL-2.0 + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . * * Signed-off-by: Richard Sites */ /* * A module that implements kernel/user tracing - * dsites 2023.02.18 + * dsites 2024.05.29 * * See include/linux/kutrace.h for struct definitions * @@ -34,11 +44,16 @@ * dsites 2023.02.13 Change module version number to 4 * dsites 2023.02.16 Merge in TSDELTA code from FreeBSD version * + * dsites 2023.06.22 Trace LLC misses instead of IPC per timespan + * dsites 2023.06.25 Extend LLC range by 4x + * dsites 2024.05.29 Combine to do either/both IPC and LLC + * */ #include #include +#include /* for unlikely() */ #include #include #include @@ -76,7 +91,7 @@ MODULE_AUTHOR("Richard L Sites"); #define KUTRACE_TSDELTA 0x21D /* Delta to advance timestamp */ #endif - +/* int hack_count = 0; */ // GCC compiler options to distinguish build targets // Use to get these: @@ -137,6 +152,7 @@ MODULE_AUTHOR("Richard L Sites"); /* Volume 4: Model-Specific Registers */ /* rdtsc counts cycles, no setup needed */ + /* IA32_FIXED_CTR0 counts instructions retired, once set up */ #define IA32_FIXED_CTR0 0x309 #define IA32_FIXED_CTR_CTRL 0x38D @@ -148,6 +164,37 @@ MODULE_AUTHOR("Richard L Sites"); #define IA32_PERF_GLOBAL_CTRL 0x38F #define EN_FIXED_CTR0 (1L << 32) +/* IA32_PMC1 counts LLC misses (L3 cache), once set up */ +/* Constants for reading LLC_MISS */ +#define IA32_PERFEVTSEL0 0x186 +#define IA32_PERFEVTSEL1 0x187 +#define IA32_PERFEVTSEL2 0x188 +#define IA32_PERFEVTSEL3 0x189 +#define PMC_USR_EN (1 << 16) +#define PMC_OS_EN (1 << 17) +#define PMC_EDGE (1 << 18) +#define PMC_PINCTRL (1 << 19) +#define PMC_INT_EN (1 << 20) +#define PMC_EN (1 << 22) +#define PMC_INV (1 << 23) +#define PMC_BITS (0xFF << 16) + +#define C_LLC_MISS (0x00 << 24) +#define U_LLC_MISS (0x41 << 8) +#define E_LLC_MISS (0x2E << 0) + +#define C_INST_RET (0x00 << 24) +#define U_INST_RET (0x00 << 8) +#define E_INST_RET (0xC0 << 0) + +#define IA32_PMC0 0x0C1 +#define IA32_PMC1 0x0C2 + + +/* #define IA32_PERF_GLOBAL_CTRL 0x38F */ +#define PMC0_EN (1L << 0) +#define PMC1_EN (1L << 1) + /* MSR_IA32_PERF_STATUS<15:8> gives current CPU frequency in increments of 100 MHz */ #define MSR_PERF_STATUS 0x198 #define FID_SHIFT 8 @@ -206,13 +253,15 @@ typedef long unsigned int uint64; static u64 kutrace_control(u64 command, u64 arg); static int __init kutrace_mod_init(void); -/* For the flags byte in traceblock[1] */ -#define IPC_Flag CLU(0x80) -#define WRAP_Flag CLU(0x40) - -/* Incoming arg to do_reset */ +/* Incoming arg to do_reset from kutrace_control */ #define DO_IPC 1 #define DO_WRAP 2 +#define DO_LLC 4 + +/*Outgoing flags byte in each traceblock[1] */ +#define IPC_Flag CLU(0x80) +#define WRAP_Flag CLU(0x40) +#define LLC_Flag CLU(0x20) /* Module parameter: default how many MB of kernel trace memory to reserve */ /* This is for the standalone, non-module version */ @@ -228,6 +277,13 @@ static const u64 kModuleVersionNumber = 4; /* IPC Instructions per cycle flag */ static bool do_ipc; /* Initially false */ +/* LLC cache misses flag */ +static bool do_llc; /* Initially false */ + +static bool do_neither; /* !do_ipc and !do_llc */ +static bool do_both; /* do_ipc and do_llc */ +static bool do_ipc_only; /* do_ipc and !do_llc */ + /* Wraparound tracing vs. stop when buffer is full */ static bool do_wrap; /* Initially false */ @@ -237,7 +293,7 @@ static u64 get4kb_subscr; /* Initially zero */ /* Module parameter: default how many MB of kernel trace memory to reserve */ static long int tracemb = 2; -static long int check = 1; +static long int check = 1; /* require PTRACE permission by default */ /* Module parameters: packet filtering. Initially match just dclab RPC markers */ static long int pktmask = 0x0000000f; @@ -338,7 +394,6 @@ DECLARE_PER_CPU(struct kutrace_traceblock, kutrace_traceblock_per_cpu); /* with backward time. */ static const u64 kLateStoreThresh = 0x00000000000e0000LLU; - /* * Trace memory is consumed backward, high to low * This allows valid test for full block even if an interrupt routine @@ -356,7 +411,7 @@ u64 *traceblock_next; /* starts at high, moves down to limit */ bool did_wrap_around; /* - * Trace memory layout without IPC tracing. + * Trace memory layout without IPC/LLC tracing. * tracebase * traceblock_limit traceblock_next traceblock_high * | | | @@ -367,7 +422,7 @@ bool did_wrap_around; * <==== allocated blocks grow down * * - * Trace memory layout with IPC tracing. IPC bytes go into lower 1/8. + * Trace memory layout with IPC/LLCtracing. IPC/LLC bytes go into lower 1/8. * tracebase * | traceblock_limit traceblock_next traceblock_high * | | | | @@ -376,7 +431,7 @@ bool did_wrap_around; * |////| | / / / / / / / / / / / | | * +-------+-------+------+--------+-------+-------+-------+-------+ * <== <==== allocated blocks grow down - * IPC bytes + * IPC/LLC bytes */ DEFINE_RAW_SPINLOCK(kutrace_lock); @@ -389,7 +444,7 @@ DEFINE_RAW_SPINLOCK(kutrace_lock); #define KUTRACEBLOCKSHIFTU64 (KUTRACEBLOCKSHIFT - 3) #define KUTRACEBLOCKSIZEU64 (1 << KUTRACEBLOCKSHIFTU64) -/* IPC block size in u8 bytes */ +/* IPC/LLC block size in u8 bytes */ #define KUIPCBLOCKSHIFTU8 (KUTRACEBLOCKSHIFTU64 - 3) #define KUIPCBLOCKSIZEU8 (1 << KUIPCBLOCKSHIFTU8) @@ -402,13 +457,16 @@ static const u64 kIpcMapping[64] = { 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15 }; - +/* Just pick off 0, 8, 64, 1024 misses (0,512,4K,32K+) for 2 bits */ +static const u64 kLlcSmall[16] = { + 0,0,1,1, 1,2,2,2, 3,3,3,3, 3,3,3,3 +}; /* Map IPC= inst_retired / cycles to sorta-log four bits */ /* NOTE: delta_cycles is in increments of cycles/64. The arithmetic */ /* below compensates for this. */ /* 0, 1/8, 1/4, 3/8, 1/2, 5/8, 3/4, 7/8, 1, 5/4, 3/2, 7/4, 2, 5/2, 3, 7/2 */ -inline u64 get_granular(u64 delta_inst, u64 delta_cycles) { +inline u64 get_granular_ipc(u64 delta_inst, u64 delta_cycles) { u32 del_inst, del_cycles, ipc; if ((delta_cycles & ~1) == 0) return 0; /* Too small to matter; avoid zdiv */ /* Do 32-bit divide to save ~10 CPU cycles vs. 64-bit */ @@ -416,8 +474,9 @@ inline u64 get_granular(u64 delta_inst, u64 delta_cycles) { del_inst = (u32)delta_inst; #if IsRPi4_64 - /* "cycle" counter is 54MHz, cycles are 1500 MHz, so one count = 1500/54 = 27.778 cycles */ - /* Call it 28 (less than 1% error). To get 8*inst/cycles for the divide below, we mul by 8/28 = 2/7 */ + /* "cycle" counter is 54MHz, cycles are 1500 MHz, */ + /* so one count = 1500/54 = 27.778 cycles. Call it 28 (less than 1% error). */ + /* To get 8*inst/cycles for the divide below, we mul by 8/28 = 2/7 */ del_inst *= 2; del_cycles = (u32)(delta_cycles * 7); /* cycles/28 to cycles/4 */ #else @@ -428,6 +487,38 @@ inline u64 get_granular(u64 delta_inst, u64 delta_cycles) { return kIpcMapping[ipc & 0x3F]; /* Truncate unexpected IPC >= 8.0 */ } +/* + * Convert delta LLC miss count into floor(log2(delta))-1 for 8 <= delta < 64K + * i.e. 0=>0 1..7=>1, 8..15=>2, 16..31=>3 ... 32K..64K-1=>14 64K+=>15 + * Note that we map 2**0, 2**1, and 2**2 all to the same result, using the + * missing two code points instead to extend our range to 64K+ misses + * (i.e. 4MB with 64-byte cache lines) + */ +inline u64 get_granular_llc(u64 delta_llc) { + u64 retval; + if (delta_llc == 0) return 0; /* common case, we hope */ + if ((delta_llc & ~CLU(0x7)) == 0) return 1; /* 1..7 */ + if ((delta_llc & ~CLU(0xFFFF)) != 0) return 15; /* 64K+ */ + /* 1 + floor(log2(delta)) */ + retval = 0; + if ((delta_llc & CLU(0xFF00)) != 0) { + delta_llc >>= 8; + retval += 8; + } + if ((delta_llc & CLU(0x00F0)) != 0) { + delta_llc >>= 4; + retval += 4; + } + if ((delta_llc & CLU(0x000C)) != 0) { + delta_llc >>= 2; + retval += 2; + } + if ((delta_llc & CLU(0x0002)) != 0) { + retval += 1; + } + return retval - 1; +} + /* Machine-specific register Access utilities */ /*----------------------------------------------------------------------------*/ @@ -519,6 +610,31 @@ void ku_setup_inst_retired(void) #endif } +/* Set up global state for reading instructions retired */ +/* This needs to run once on each CPU core */ +void ku_setup_llc_miss(void) +{ +#if IsIntel_64 + u64 llc_miss_sel; + u64 llc_miss_enable; + /* Count LLC_MISS, both user and os; enable counting */ + /* llc_miss_sel = rdMSR(IA32_PERFEVTSEL1); */ + llc_miss_sel = (PMC_USR_EN | PMC_OS_EN | PMC_EN) | + (C_LLC_MISS | U_LLC_MISS | E_LLC_MISS); + wrMSR(IA32_PERFEVTSEL1, llc_miss_sel); + + /* Enable fixed llc_miss counter in IA32_PERF_GLOBAL_CTRL */ + llc_miss_enable = rdMSR(IA32_PERF_GLOBAL_CTRL); + llc_miss_enable |= PMC1_EN; + wrMSR(IA32_PERF_GLOBAL_CTRL, llc_miss_enable); +#else + /* Not implemented for AMD, RPi */ +#error Define ku_setup_llc_miss for your architecture + +#endif +} + + /* Set up global state for reading CPU frequency */ /* This needs to run once on each CPU core */ void ku_setup_cpu_freq(void) @@ -585,6 +701,23 @@ inline u64 ku_get_inst_retired(void) } +/* Read LLC misses counter */ +/* This is performance critical -- every trace entry if tracking LLC */ +/*----------------------------------------------------------------------------*/ +inline u64 ku_get_llc_miss(void) +{ +#if IsIntel_64 + u32 a = 0, d = 0; + int ecx = IA32_PMC1; /* What counter it selects, Intel */ + __asm __volatile("rdmsr" : "=a"(a), "=d"(d) : "c"(ecx)); + return ((u64)a) | (((u64)d) << 32); +#else + /* Not implemented for AMD, RPi */ +#error Define llc_miss for your architecture + return 0; +#endif +} + /* Read current CPU frequency */ /* Not performance critical -- once every timer interrupt */ /*----------------------------------------------------------------------------*/ @@ -619,7 +752,6 @@ inline bool LateStoreOrLarge(u64 delta_cycles) { return delta_cycles > kLateStoreThresh; } - /* Make sure name length fits in 1..8 u64's */ //* Return true if out of range */ inline bool is_bad_len(int len) @@ -877,10 +1009,13 @@ static u64 *initialize_trace_block(u64 *init_me, bool very_first_block, /* Second word is going to be corresponding gettimeofday(), */ /* filled in via postprocessing */ - /* We put some flags in the top byte, though. x080 = do_ipc bit */ + /* We put some flags in the top byte, though. 0x80 = do_ipc bit, etc. */ + /* NOTE: This could all be pre-calculated in do_reset() */ init_me[1] = 0; if (do_ipc) init_me[1] |= (IPC_Flag << FLAGS_SHIFT); + if (do_llc) + init_me[1] |= (LLC_Flag << FLAGS_SHIFT); if (do_wrap) init_me[1] |= (WRAP_Flag << FLAGS_SHIFT); /* We don't know if we actually wrapped until the end. */ @@ -888,7 +1023,7 @@ static u64 *initialize_trace_block(u64 *init_me, bool very_first_block, /* For very first trace block, also insert six NOPs at [2..7]. */ /* The dump to disk code will overwrite the first pair with */ - /* start timepair and the next with stop timepair. [6..7] unused */ + /* start timepair and the next with stop timepair. [6..7] currently unused */ if (very_first_block) { init_me[2] = CLU(0); init_me[3] = CLU(0); @@ -929,6 +1064,7 @@ static u64 *initialize_trace_block(u64 *init_me, bool very_first_block, if (first_block_per_cpu) { ku_setup_timecount(); ku_setup_inst_retired(); + ku_setup_llc_miss(); ku_setup_cpu_freq(); tb->prior_cycles = 1; /* mark it as initialized */ #if IsRPi4_64 @@ -1002,7 +1138,7 @@ static u64 *get_slow_claim(int len, struct kutrace_traceblock *tb) u64 *limit_item; u64 *myclaim = NULL; - if (is_bad_len(len)) { + if (unlikely(is_bad_len(len))) { kutrace_tracing = false; printk(KERN_INFO "is_bad_len 1\n"); return NULL; @@ -1042,7 +1178,7 @@ static u64 *get_claim(int len, struct kutrace_traceblock* tb) u64 *limit_item_again = NULL; u64 *myclaim = NULL; - if (is_bad_len_plus(len)) { + if (unlikely(is_bad_len_plus(len))) { kutrace_tracing = false; return NULL; } @@ -1059,7 +1195,7 @@ static u64 *get_claim(int len, struct kutrace_traceblock* tb) /* If they are, take the slow path without accessing. */ do { limit_item = tb->limit; - if (limit_item == NULL) + if (unlikely(limit_item == NULL)) break; /* add_return returns the updated pointer; we want the */ @@ -1079,7 +1215,7 @@ static u64 *get_claim(int len, struct kutrace_traceblock* tb) } while (true); /* Make sure the entire allocation fits */ - if ((myclaim + len) >= limit_item_again) { + if (unlikely((myclaim + len) >= limit_item_again)) { /* Either this is the first claim for a CPU */ /* with limit_item, limit_item_again, and myclaim all null, or */ /* the claim we got doesn't fit in its block. Allocate a new block. */ @@ -1117,7 +1253,7 @@ inline u64* get_claim_with_tsdelta(u64 now, u64 delta_cycles, int len, struct kutrace_traceblock* tb) { u64 *claim; /* Check if time between events almost wraps above the 20-bit timestamp */ - if (LateStoreOrLarge(delta_cycles) && (tb->prior_cycles != 0)) { + if (unlikely(LateStoreOrLarge(delta_cycles) && (tb->prior_cycles != 0))) { /* Uncommon case. Add timestamp delta entry before original entry */ claim = get_claim(1 + len, tb); if (claim != NULL) { @@ -1143,35 +1279,60 @@ inline static u64 *get_prior(struct kutrace_traceblock *tb) /* Note that next and limit may both be NULL at initial use. */ /* If they are, or any other problem, return NULL */ /* get_cpu_var disables preempt */ - tb = &get_cpu_var(kutrace_traceblock_per_cpu); +//// tb = &get_cpu_var(kutrace_traceblock_per_cpu); next_item = (u64 *)ATOMIC_READ(&tb->next); limit_item = tb->limit; - put_cpu_var(kutrace_traceblock_per_cpu); +//// put_cpu_var(kutrace_traceblock_per_cpu); if (next_item < limit_item) return next_item - 1; /* ptr to prior entry */ return NULL; } -/* Calculate and insert four-bit IPC value. Shift puts in lo/hi part of a byte */ -inline void do_ipc_calc(u64 *claim, u64 delta_cycles, +/* Calculate and insert 4-bit IPC/LLC value. Shift packs in hi part of a byte */ +/* If either IPC or LLC is on, store its quantized 4-bit value */ +/* If both are on keep just high two bits of each. HTML wrapper displays both */ +/* Prioritize do_ipc */ +inline void do_ipcllc_calc(u64 *claim, u64 delta_cycles, struct kutrace_traceblock* tb, bool shift) { - u64 inst_ret; - u64 delta_inst; - u64 ipc; - u8* ipc_byte_addr; - if (!do_ipc) {return;} - /* There will be random large differences the first time; we don't care. */ + u64 inst_ret, delta_inst, ipc; + u64 llc_miss, delta_miss, llc; + u64 four_bits; /* To store into trace: ipc, llc, or two bits of each */ + u8* ipcllc_byte_addr; + + /* There will be random large differences the first time; we don't care. */ + if (do_ipc_only) { inst_ret = ku_get_inst_retired(); delta_inst = inst_ret - tb->prior_inst_retired; tb->prior_inst_retired = inst_ret; - /* NOTE: pointer arithmetic divides claim by 8, giving the byte offset we want */ - ipc_byte_addr = (u8*)(tracebase) + (claim - (u64*)(tracebase)); - ipc = get_granular(delta_inst, delta_cycles); - if (shift) - ipc_byte_addr[0] |= ipc << 4; - else - ipc_byte_addr[0] = ipc; + four_bits = get_granular_ipc(delta_inst, delta_cycles); + } + else if (do_neither) { + return; + } + else if (do_llc) { + llc_miss = ku_get_llc_miss(); + delta_miss = llc_miss - tb-> prior_llc_misses; + tb->prior_llc_misses = llc_miss; + four_bits = llc = get_granular_llc(delta_miss); + if (do_both) { + inst_ret = ku_get_inst_retired(); + delta_inst = inst_ret - tb->prior_inst_retired; + tb->prior_inst_retired = inst_ret; + ipc = get_granular_ipc(delta_inst, delta_cycles); + /* Pack upper two bits only of each counter */ + four_bits = (ipc & 0x0c) | kLlcSmall[llc]; + } + } + + /* NOTE: pointer arithmetic divides claim by 8, giving the byte offset */ + ipcllc_byte_addr = (u8*)(tracebase) + (claim - (u64*)(tracebase)); + /* Shift saves the value for optimized returns in high 4 bits of byte */ + if (shift) + ipcllc_byte_addr[0] |= four_bits << 4; + else + ipcllc_byte_addr[0] = four_bits; +/* if(++hack_count < 20) printk(KERN_INFO " byte %u\n", ipcllc_byte_addr[0]); */ } @@ -1200,10 +1361,10 @@ static u64 insert_1(u64 arg1) claim = get_claim_with_tsdelta(now, delta_cycles, 1, tb); /* This update must be after the first getclaim per CPU */ tb->prior_cycles = now; - if (claim != NULL) { + if (likely(claim != NULL)) { claim[0] = arg1 | (now << TIMESTAMP_SHIFT); - /* IPC option. Changes CPU overhead from ~1/4% to ~3/4% */ - do_ipc_calc(claim, delta_cycles, tb, false); + /* IPC/LLC option. Changes CPU overhead from ~1/4% to ~3/4% */ + do_ipcllc_calc(claim, delta_cycles, tb, false); retval = 1; } put_cpu_var(kutrace_traceblock_per_cpu); /* release preempt */ @@ -1226,7 +1387,7 @@ static u64 insert_1_retopt(u64 arg1) /* It doesn't matter if we get migrated because we are not allocating a new entry */ tb = &get_cpu_var(kutrace_traceblock_per_cpu); /* hold off preempt */ prior_entry = get_prior(tb); - if (prior_entry != NULL) { + if (likely(prior_entry != NULL)) { /* Want N=matching call, high bytes of return value = 0 */ u64 diff = (*prior_entry ^ arg1) & EVENT_DELTA_RETVAL_MASK; u64 prior_t = *prior_entry >> TIMESTAMP_SHIFT; @@ -1238,14 +1399,14 @@ static u64 insert_1_retopt(u64 arg1) /* This happens about 90-95% of the time */ u64 opt_ret; /* make sure delta_t is nonzero to flag there is an optimized ret */ - if (delta_t == 0) + if (unlikely(delta_t == 0)) delta_t = 1; opt_ret = (delta_t << DELTA_SHIFT) | ((arg1 & UNSHIFTED_RETVAL_MASK) << RETVAL_SHIFT); *prior_entry |= opt_ret; - /* IPC option. Changes CPU overhead from ~1/4% to ~3/4% */ - do_ipc_calc(prior_entry, delta_t, tb, true); + /* IPC/LLC option. Changes CPU overhead from ~1/4% to ~3/4% */ + do_ipcllc_calc(prior_entry, delta_t, tb, true); put_cpu_var(kutrace_traceblock_per_cpu); /* release preempt */ return 0; } @@ -1390,12 +1551,17 @@ static u64 insert_n_user(u64 word) static u64 do_reset(u64 flags) { int cpu; +/* hack_count = 0; */ /* printk(KERN_INFO " kutrace_trace reset(%016llx) called\n", flags); */ /* Turn off tracing -- should already be off */ kutrace_tracing = false; /* Should already be off */ do_ipc = ((flags & DO_IPC) != 0); + do_llc = ((flags & DO_LLC) != 0); do_wrap = ((flags & DO_WRAP) != 0); + do_neither = (!do_ipc) & (!do_llc); + do_both = (do_ipc & do_llc); + do_ipc_only = (do_ipc & !do_llc); /* Clear pid filter */ memset(kutrace_pid_filter, 0, 1024 * sizeof(u64)); @@ -1407,7 +1573,7 @@ static u64 do_reset(u64 flags) traceblock_next = traceblock_high; did_wrap_around = false; - if (do_ipc) { + if (do_ipc | do_llc) { /* Reserve lower 1/8 of trace buffer for IPC bytes */ /* Strictly speaking, this should be 1/9. We waste a little space. */ traceblock_limit = (u64*)(tracebase + (tracemb << (20 - 3))); @@ -1423,8 +1589,9 @@ static u64 do_reset(u64 flags) ATOMIC_SET(&tb->next, (uintptr_t)NULL); tb->limit = NULL; - tb->prior_cycles = 0; // IPC design - tb->prior_inst_retired = 0; // IPC design + tb->prior_cycles = 0; // Cycle tracking + tb->prior_inst_retired = 0; // IPC tracking + tb->prior_llc_misses = 0; // LLC tracking } return 0; @@ -1436,14 +1603,14 @@ static u64 do_reset(u64 flags) /* arg fits in 16 bits for syscall/ret and 32 bits otherwise */ static /*asmlinkage*/ void trace_1(u64 event, u64 arg) { - if (!kutrace_tracing) - return; +//// if (!kutrace_tracing) +//// return; /* Check for possible return optimization */ if (((event & UNSHIFTED_EVENT_RETURN_BIT) != 0) && ((event & UNSHIFTED_EVENT_HAS_RETURN_MASK) != 0)) { - /* We have a return entry 011x, 101x, 111x: 6/7, a/b, e/f */ + /* We have a return event 011x, 101x, 111x: 6/7, a/b, e/f */ if (((arg + 128l) & ~UNSHIFTED_RETVAL_MASK) == 0) { /* Signed retval fits into a byte, [-128..127] */ insert_1_retopt((event << EVENT_SHIFT) | arg); @@ -1636,9 +1803,10 @@ static int __init kutrace_mod_init(void) /* Set up global tracing data state */ /* Very first traceblock alloc per CPU will do this, but we need */ - /* the timecount set up before we write teh first trace entry */ + /* the timecount set up before we write the first trace entry */ ku_setup_timecount(); ku_setup_inst_retired(); + ku_setup_llc_miss(); ku_setup_cpu_freq(); do_reset(0); printk(KERN_INFO " kutrace_tracing = %d\n", kutrace_tracing); @@ -1676,8 +1844,9 @@ static void __exit kutrace_mod_exit(void) printk(KERN_INFO " kutrace_traceblock_per_cpu[%d] = NULL\n", cpu); ATOMIC_SET(&tb->next, (uintptr_t)NULL); tb->limit = NULL; - tb->prior_cycles = 0; // IPC design - tb->prior_inst_retired = 0; // IPC design + tb->prior_cycles = 0; // Cycle tracking + tb->prior_inst_retired = 0; // IPC tracking + tb->prior_llc_misses = 0; // LLC tracking } traceblock_high = NULL; diff --git a/postproc/Makefile b/postproc/Makefile new file mode 100644 index 000000000000..8062d649690e --- /dev/null +++ b/postproc/Makefile @@ -0,0 +1,14 @@ +ccflags-y := -march=native +CFLAGS_kutrace_mod.o = -march=native +#CFLAGS_kutrace_mod_llc.o = -march=native + +obj-m += kutrace_mod.o +# obj-m += kutrace_mod_llc.o + +all: + make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules + +clean: + make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean + + diff --git a/postproc/base40.cc b/postproc/base40.cc index 79da531319d1..72a568222d57 100644 --- a/postproc/base40.cc +++ b/postproc/base40.cc @@ -1,5 +1,5 @@ // Little program to turn input strings into base40 values -// Copyright 2021 Richard L. Sites +// dsites 2017.12.07 // // compile with g++ -O2 base40.cc -o base40 // @@ -13,7 +13,6 @@ #define BASE40__zero 39561079 // "/zero" -#include #include #include @@ -27,31 +26,31 @@ typedef unsigned long int u64; // 0123456789012345678901234567890123456789 // where the first is NUL. static const char kToBase40[256] = { - 0,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, - 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, - 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,37,38,39, - 27,28,29,30, 31,32,33,34, 35,36,38,38, 38,38,38,38, + 0,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, + 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, + 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,37,38,39, + 27,28,29,30, 31,32,33,34, 35,36,38,38, 38,38,38,38, 38, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11, 12,13,14,15, - 16,17,18,19, 20,21,22,23, 24,25,26,38, 38,38,38,38, + 16,17,18,19, 20,21,22,23, 24,25,26,38, 38,38,38,38, 38, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11, 12,13,14,15, - 16,17,18,19, 20,21,22,23, 24,25,26,38, 38,38,38,38, + 16,17,18,19, 20,21,22,23, 24,25,26,38, 38,38,38,38, - 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, - 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, - 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, - 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, + 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, + 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, + 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, + 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, - 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, - 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, - 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, - 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, + 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, + 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, + 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, + 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, }; static const char kFromBase40[40] = { '\0','a','b','c', 'd','e','f','g', 'h','i','j','k', 'l','m','n','o', 'p','q','r','s', 't','u','v','w', 'x','y','z','0', '1','2','3','4', - '5','6','7','8', '9','-','.','/', + '5','6','7','8', '9','-','.','/', }; // Unpack six characters from 32 bits. @@ -95,18 +94,19 @@ static const int kBuffersize = 128; static const char* kAllowed = "_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; int main (int argc, const char** argv) { + char buffer[kBuffersize]; char buffer2[kBuffersize]; - std::string label, closing_label; - while (std::cin >> label) { - closing_label = "/" + label; - for (int i = 0; i < label.length(); i++) { - buffer2[i] = (strchr(kAllowed, label[i]) != NULL) ? label[i] : '_'; + while (fgets(buffer, kBuffersize, stdin) != NULL) { + if (buffer[strlen(buffer) - 1] == '\n') {buffer[strlen(buffer) - 1] = '\0';} + if (buffer[strlen(buffer) - 1] == '\r') {buffer[strlen(buffer) - 1] = '\0';} + for (int i = 0; i < strlen(buffer); ++i) { + buffer2[i] = (strchr(kAllowed, buffer[i]) != NULL) ? buffer[i] : '_'; } - buffer2[label.length()] = '\0'; + buffer2[strlen(buffer)] = '\0'; //printf("%ld // %s\n", CharToBase40(buffer), buffer); - printf("#define BASE40_%s %ld // \"%s\"\n", buffer2, CharToBase40(label.c_str()), label.c_str()); - printf("#define BASE40__%s %ld // \"%s\"\n", buffer2, CharToBase40(closing_label.c_str()), closing_label.c_str()); + printf("#define BASE40_%s %ld\t// \"%s\"\n", buffer2, CharToBase40(buffer), buffer); } + return 0; } diff --git a/postproc/build.sh b/postproc/build.sh new file mode 100644 index 000000000000..527f3265e353 --- /dev/null +++ b/postproc/build.sh @@ -0,0 +1,16 @@ +g++ -O2 base40.cc -o base40 +g++ -O2 eventtospan3.cc -o eventtospan3 +g++ -O2 hello_world_trace.c kutrace_lib.cc -o hello_world_trace +g++ -O2 kuod.cc -o kuod +g++ -O2 kutrace_control.cc kutrace_lib.cc -o kutrace_control +g++ -O2 kutrace_unittest.cc kutrace_lib.cc -o kutrace_unittest +g++ -O2 makeself.cc -o makeself +g++ -O2 rawtoevent.cc -Wno-format-overflow from_base40.cc kutrace_lib.cc -o rawtoevent +g++ -O2 samptoname_k.cc -o samptoname_k +g++ -O2 samptoname_u.cc -o samptoname_u +g++ -O2 spantospan.cc -o spantospan +g++ -O2 spantoprof.cc -o spantoprof +g++ -O2 spantotrim.cc from_base40.cc -o spantotrim +g++ -O2 time_getpid.cc kutrace_lib.cc -o time_getpid +g++ -O2 unmakeself.cc -o unmakeself + diff --git a/postproc/eventtospan3.cc b/postproc/eventtospan3.cc index 2e09a94b2d19..214968855a45 100644 --- a/postproc/eventtospan3.cc +++ b/postproc/eventtospan3.cc @@ -65,6 +65,8 @@ // 2022.06.05 dsites Allow mwait(0) for C1 state, add mwait exit event // 2022.06.05 dsites Get pid (later: rpc names to track over time if they change // 2023.07.24 dsites Make default syscall dff, not 9ff +// 2024.07.03 dsites Add MakeIPISpan processing +// 2024.07.06 dsites Do CPU-related cexit latency tables // Compile with g++ -O2 eventtospan3.cc -o eventtospan3 @@ -116,6 +118,7 @@ // Additional drawing events #define ArcNum -3 +#define ArcIPINum -7 static const char* kIdleName = "-idle-"; static const char* kIdlelpName = "-idlelp-"; @@ -177,6 +180,51 @@ static const int kLatencyTable[256] = { // [255] AMD mwait guess }; +// Scraped from 6.6.36 linux-6.6.36/drivers/idle/intel_idle.c on 2024.07.05 +// Subscripted by mwait_arg>>4 + +// {"nehalem_cstates", {10,20,200,255,255,255,255,255,255,255,255,255,255,255,255,255,}}, +// {"snb_cstates", {10,80,104,109,255,255,255,255,255,255,255,255,255,255,255,255,}}, +// {"byt_cstates", {1,255,255,255,255,500,10000,255,255,255,255,255,255,255,255,255,}}, +// {"cht_cstates", {1,255,255,255,255,200,10000,255,255,255,255,255,255,255,255,255,}}, +// {"ivb_cstates", {10,59,80,87,255,255,255,255,255,255,255,255,255,255,255,255,}}, +// {"ivt_cstates", {10,59,82,255,255,255,255,255,255,255,255,255,255,255,255,255,}}, +// {"ivt_cstates_4s", {10,59,84,255,255,255,255,255,255,255,255,255,255,255,255,255,}}, +// {"ivt_cstates_8s", {10,59,88,255,255,255,255,255,255,255,255,255,255,255,255,255,}}, +// {"hsw_cstates", {10,33,133,166,300,600,2600,255,255,255,255,255,255,255,255,255,}}, +// {"bdw_cstates", {10,40,133,166,300,600,2600,255,255,255,255,255,255,255,255,255,}}, +// {"skl_cstates", {10,70,85,124,200,480,890,255,255,255,255,255,255,255,255,255,}}, +// {"skx_cstates", {10,255,133,255,255,255,255,255,255,255,255,255,255,255,255,255,}}, +// {"icx_cstates", {4,255,170,255,255,255,255,255,255,255,255,255,255,255,255,255,}}, +// {"adl_cstates", {2,255,220,255,280,255,680,255,255,255,255,255,255,255,255,255,}}, +// {"adl_l_cstates", {2,255,170,255,200,255,230,255,255,255,255,255,255,255,255,255,}}, +// {"gmt_cstates", {2,255,195,255,260,255,660,255,255,255,255,255,255,255,255,255,}}, +// {"spr_cstates", {2,255,290,255,255,255,255,255,255,255,255,255,255,255,255,255,}}, +// {"atom_cstates", {10,20,255,100,255,140,255,255,255,255,255,255,255,255,255,255,}}, +// {"tangier_cstates", {1,255,255,100,255,140,10000,255,255,255,255,255,255,255,255,255,}}, +// {"avn_cstates", {2,255,255,255,255,15,255,255,255,255,255,255,255,255,255,255,}}, +// {"knl_cstates", {1,120,255,255,255,255,255,255,255,255,255,255,255,255,255,255,}}, +// {"bxt_cstates", {10,255,133,155,1000,2000,10000,255,255,255,255,255,255,255,255,255,}}, +// {"dnv_cstates", {10,255,50,255,255,255,255,255,255,255,255,255,255,255,255,255,}}, +// {"snr_cstates", {15,255,130,255,255,255,255,255,255,255,255,255,255,255,255,255,}}, + +typedef struct { + const char* name; + const int lat[16]; +} CexitLatency; + +static const CexitLatency kLatencyTable2[] = { + // Kaby Lake Sky Lake skl + {"i3-7100", {10,70,85,124,200,480,890,255,255,255,255,255,255,255,255,255,}}, + // Goldmont bxt + {"J4005", {10,255,133,155,1000,2000,10000,255,255,255,255,255,255,255,255,255,}}, + // Default must be last. Drawn from Haswell hsw + {NULL, {10,33,133,166,300,600,2600,255,255,255,255,255,255,255,255,255,}} +}; + +// Sixteen-entry table of per-CPU-type c-exit latencies +static const int* NewLatTable2 = NULL; + // 2**0.0 through 2** 0.9 static const double kPowerTwoTenths[10] = { 1.0000, 1.0718, 1.1487, 1.2311, 1.3195, @@ -340,6 +388,7 @@ typedef map PerPidState; // State of each suspended task, by PID typedef map IntName; // Name for each PID/lock/method typedef map PidWakeup; // Previous wakeup event, by PID typedef map PidTime; // Previous per-PID timestamp (span end, kernel-seen packet) +typedef map CpuTarg; // Previous per-PID lock hash number typedef map PidLock; // Previous per-PID lock hash number typedef map PidHash32; // Previous per-PID pending user packet hash number typedef map PidRunning; // Set of currently-running PIDs @@ -503,6 +552,7 @@ IntName pidnames; // Current name for each PID, by pid# IntName pidrownames; // Collected names for each PID (clone, execve, etc. rename a thread), by pid# // Accumulates name sn order over time PidWakeup pendingWakeup; // Any pending wakeup event, to make arc from wakeup to running +PidWakeup pendingIPI; // Any pending IPI event, to make arc from sender to target CPU PidWakeup priorPidEvent; // Any prior event for each PID, to make wait_xxx display PidTime priorPidEnd; // Any prior span end for each PID, to make wait_xxx display PidLock priorPidLock; // Any prior lock hash number for each PID, to make wait_xxx display @@ -643,6 +693,12 @@ bool IsAContextSwitch(const OneSpan& event) { return (event.eventnum == KUTRACE_USERPID); } +// (2) Trigger IPI point event +bool IsAnIPI(const OneSpan& event) { + return ((event.eventnum == KUTRACE_IPI) || + (event.eventnum == KUTRACE_MONITORSTORE)); +} + // (2) Make-runnable point event bool IsAWakeup(const OneSpan& event) { return (event.eventnum == KUTRACE_RUNNABLE); @@ -1001,6 +1057,22 @@ int FloorLg(uint64 x) { return lg; } +// If one of the built-in tables has a CPU name string that is found in +// the incoming cpu_model_name, use the corresponding c-exit latency table. +void SetNewLatTable2() { + if (cpu_model_name.empty()) {return;} // Leave SetNewLatTable2 NULL + int k = 0; + while (kLatencyTable2[k].name != NULL) { + if (cpu_model_name.find(kLatencyTable2[k].name) != string::npos) { + fprintf(stderr, " Using c-exit latency table '%s'\n", + kLatencyTable2[k].name); + NewLatTable2 = &kLatencyTable2[k].lat[0]; + } + ++k; + } + // If no match, leave SetNewLatTable2 NULL +} + // Close off the current span // Remember each user-mode PID end in priorPidEnd @@ -1080,6 +1152,7 @@ void StartSpan(const OneSpan& event, OneSpan* span) { void MakeArcSpan(const OneSpan& event1, const OneSpan& event2, OneSpan* span) { span->start_ts = event1.start_ts; span->duration = event2.start_ts - event1.start_ts; + if (span->duration > kMAX_PLAUSIBLE_DURATION) {span->duration = 1;} span->cpu = event1.cpu; span->pid = event1.pid; span->rpcid = event1.rpcid; @@ -1090,6 +1163,20 @@ void MakeArcSpan(const OneSpan& event1, const OneSpan& event2, OneSpan* span) { span->name = "-wakeup-"; } +void MakeIPISpan(const OneSpan& event1, const OneSpan& event2, OneSpan* span) { + span->start_ts = event1.start_ts; + span->duration = event2.start_ts - event1.start_ts; + if (span->duration > kMAX_PLAUSIBLE_DURATION) {span->duration = 1;} + span->cpu = event1.cpu; + span->pid = -1; + span->rpcid = -1; + span->eventnum = ArcIPINum; + span->arg = event2.cpu; + span->retval = 0; + span->ipc = 0; + span->name = "-ipi-"; +} + // Waiting on reason c from event1 to event2. For PID or RPC, not on any CPU // Make a waiting span: letter, time, dur, CPU -1, PID, RPC, name // letter is 'a' through 'z' @@ -1272,6 +1359,7 @@ void InitialJson(FILE* f, const char* label, const char* basetime) { if (!cpu_model_name.empty()) { Clean(&cpu_model_name); fprintf(f, " \"cpuModelName\" : \"%s\",\n", cpu_model_name.c_str()); + SetNewLatTable2(); } if (!host_name.empty()) { Clean(&host_name); @@ -1514,6 +1602,14 @@ void DoWakeup(const OneSpan& event, CPUState* cpustate, PerPidState* perpidstate priorPidEnd[target_pid] = event.start_ts + event.duration; } +void DoIPI(const OneSpan& event, CPUState* cpustate, PerPidState* perpidstate) { + CPUState* thiscpu = &cpustate[event.cpu]; + int target_cpu = event.arg; + // Remember the IPI + pendingIPI[target_cpu] = event; + ////fprintf(stdout, "pendingIPI[%d]=%lld\n", target_cpu, event.start_ts); +} + void SwapStacks(int oldpid, int newpid, const string& name, CPUState* thiscpu, PerPidState* perpidstate) { if (oldpid == newpid) {return;} @@ -1891,8 +1987,6 @@ if (verbose) fprintf(stdout, " ===marking old stack ambiguous at ctx_switch to % lockpending.erase(subscr); } - - // Point event // Remember any make-runnable, aka wakeup, event by target pid, for drawing arc if (IsAWakeup(event)) { @@ -1900,6 +1994,14 @@ if (verbose) fprintf(stdout, " ===marking old stack ambiguous at ctx_switch to % DoWakeup(event, cpustate, perpidstate); WaitAfterWakeup(event, cpustate, perpidstate); } + + // Remember and sendipi or monotor-store as start of interprocessor + // get-target-CPU-going arc. Target in arg0 + if (IsAnIPI(event)) { + // Put this event in map for target CPU. + DoIPI(event, cpustate, perpidstate); + // Subsequently, draw ipi arc to next event on that CPU + } return; } // End point event @@ -1929,6 +2031,20 @@ if (verbose) fprintf(stdout, " ===marking old stack ambiguous at ctx_switch to % pendingWakeup.erase(event.pid); thiscpu->cur_span = temp_span; // Restore } + + // Connect IPI event to new span if the CPU number matches + if (pendingIPI.find(event.cpu) != pendingIPI.end()) { + // We are at an event for which there is a pending IPI delivery + // Make an IPI arc + ////fprintf(stdout, "found pendingIPI[%d]=%lld\n", event.cpu, pendingIPI[event.cpu].start_ts); + OneSpan temp_span = thiscpu->cur_span; // Save + MakeIPISpan(pendingIPI[event.cpu], event, &thiscpu->cur_span); + ////DumpSpan(stdout, "IPIspan", &thiscpu->cur_span); + WriteSpanJson(stdout, thiscpu); // Standalone arc span + // Consume the pending IPI + pendingIPI.erase(event.cpu); + thiscpu->cur_span = temp_span; // Restore + } // Make a wait_cpu display span from the wakeup to here if (priorPidEnd.find(event.pid) != priorPidEnd.end()) { @@ -2183,6 +2299,13 @@ if(verbose){fprintf(stdout, "InsertReturnAt 4\n");} return true; } +uint64 NewLatencyLookup(uint64 exit_latency, int mwait_pending) { + if (NewLatTable2 == NULL) { + return exit_latency; + } + int subscr16 = (mwait_pending >> 4) & 0x0F; // Top nibble + return NewLatTable2[subscr16] * 10; // units of 10ns +} // Fixup: Turn idle/mwait/idle/X into idle/mwait/idle/c-exit/X // We are at X @@ -2195,8 +2318,10 @@ bool FixupCexit(uint64 new_start_ts, PidState* thiscpu_stack = &thiscpu->cpu_stack; // Table entries are unknown units; they appear to be multiples of 100ns - uint64 exit_latency = kLatencyTable[thiscpu->mwait_pending] * 10; - + uint64 exit_latency = kLatencyTable[thiscpu->mwait_pending] * 10; // 10ns unit + // Newer CPU-related code + exit_latency = NewLatencyLookup(exit_latency, thiscpu->mwait_pending); + uint64 pending_span_latency = new_start_ts - thiscpu->cur_span.start_ts; bool good_mwait = (thiscpu->cpu_stack.top == 0); // Expecting to be in user-mode diff --git a/postproc/hello_world_trace.c b/postproc/hello_world_trace.c new file mode 100644 index 000000000000..71ca6c8661fb --- /dev/null +++ b/postproc/hello_world_trace.c @@ -0,0 +1,12 @@ +// Compile with g++ -O2 hello_world_trace.c kutrace_lib.cc -o hello_world_trace + +#include + +#include "kutrace_lib.h" + +int main (int argc, const char** argv) { + kutrace::mark_a("hello"); + fprintf(stdout, "hello world\n"); + kutrace::mark_a("/hello"); + return 0; +} diff --git a/postproc/kutrace_control.cc b/postproc/kutrace_control.cc new file mode 100644 index 000000000000..6523f6c949ad --- /dev/null +++ b/postproc/kutrace_control.cc @@ -0,0 +1,262 @@ +// Little program to control dclab_tracing +// dick sites 2017.11.16 +// +// 2017.11.16 dsites Updated to include instructions per cycle IPC flag +// 2018.05.08 dsites Updated by switching to using kutrace_lib +// 2019.02.19 dsites Updated ... +// 2020.04.03 dsites Added wait command +// 2024.05.29 dsites Added LLC miss tracking commands +// +// This program reads commands from stdin +// +// Compile with gcc -O2 kutrace_control.cc kutrace_lib.cc -o kutrace_control + +#include +#include +#include + +#include // nanosleep +#include // getpid gethostname +//#include + +#include // gettimeofday +#include + +#include "basetypes.h" +#include "kutrace_control_names.h" +#include "kutrace_lib.h" + +/* +TODO: +Rationalize the use of side-effect-free DoTest +*/ + +/* Outgoing arg to DoReset */ +#define DO_IPC 1 +#define DO_WRAP 2 +#define DO_LLC 4 + +typedef uint64 u64; +typedef int64 s64; + +/* For the flags byte in traceblock[1] */ +#define IPC_Flag 0x80ul +#define WRAP_Flag 0x40ul +#define LLC_Flag 0x20ul +#define Unused1_Flag 0x10ul +#define VERSION_MASK 0x0Ful + +// Module must be at least this version number for us to run +static const u64 kMinModuleVersionNumber = 3; + +// Number of u64 values per trace block (64KB total) +static const int kTraceBufSize = 8192; + +// Number of u64 values per IPC block, one u8 per u64 in trace buf (8KB total) +static const int kIpcBufSize = kTraceBufSize >> 3; + + +#if 0 +// Globals for mapping cycles to gettimeofday +static int64 start_cycles = 0; +static int64 stop_cycles = 0; +static int64 start_usec = 0; +static int64 stop_usec = 0; +#endif + + +// Very first block layout (x86 cycle counter is rdtsc >> 6) +// +-------+-----------------------+-------------------------------+ +// | cpu# | cycle counter | 0 module +// +-------+-----------------------+-------------------------------+ +// | flags | gettimeofday | 1 DoDump +// +-------+-----------------------+-------------------------------+ +// | start cycle counter | 2 DoDump +// +-------------------------------+-------------------------------+ +// | start gettimeofday | 3 DoDump +// +-------------------------------+-------------------------------+ +// | stop cycle counter | 4 DoDump +// +-------------------------------+-------------------------------+ +// | stop gettimeofday | 5 DoDump +// +-------------------------------+-------------------------------+ +// | u n u s e d | 6 +// +-------------------------------+-------------------------------+ +// | u n u s e d | 7 +// +-------------------------------+-------------------------------+ +// +-------------------------------+-------------------------------+ +// | u n u s e d | PID | 8 module +// +-------------------------------+-------------------------------+ +// | u n u s e d | 9 module +// +-------------------------------+-------------------------------+ +// | | 10 module +// + pidname + +// | | 11 module +// +-------------------------------+-------------------------------+ +// | followed by trace entries... | +// ~ ~ +// +// +// All other blocks layout +// +-------+-----------------------+-------------------------------+ +// | cpu# | cycle counter | 0 module +// +-------+-----------------------+-------------------------------+ +// | flags | gettimeofday | 1 DoDump +// +-------+-----------------------+-------------------------------+ +// | u n u s e d | PID | 2 module +// +-------------------------------+-------------------------------+ +// | u n u s e d | 3 module +// +-------------------------------+-------------------------------+ +// | | 4 module +// + pidname + +// | | 5 module +// +-------------------------------+-------------------------------+ +// | followed by trace entries... | +// ~ ~ +// + + + +void Usage() { + fprintf(stderr, "usage: kutrace_control, with sysin lines\n"); + fprintf(stderr, " go, stop [], init, on, off, flush, reset, stat, dump, quit, wait \n"); + exit(0); +} + +// Sleep for n milliseconds +void msleep(int msec) { + struct timespec ts; + ts.tv_sec = msec / 1000; + ts.tv_nsec = (msec % 1000) * 1000000; + nanosleep(&ts, NULL); +} + + +static const int kMaxBufferSize = 256; + +// Read next line, stripping any crlf. Return false if no more. +bool ReadLine(FILE* f, char* buffer, int maxsize) { + char* s = fgets(buffer, maxsize, f); + if (s == NULL) {return false;} + int len = strlen(s); + // Strip any crlf or cr or lf + if (s[len - 1] == '\n') {s[--len] = '\0';} + if (s[len - 1] == '\r') {s[--len] = '\0';} + return true; +} + +// Take a series of commands from stdin +// +// go|goipc|goipcwrap|gowrap +// stop +// init Initialize trace buffer with syscall/irq/trap names +// on Turn on tracing +// off Turn off tracing +// flush With tracing off, zero out the rest of each partly-used traceblock +// reset Set up for a new tracing run +// stat Show some sort of tracing status +// dump Dump the trace buffer to constructed filename +// quit Exit this program +// wait N Wait N seconds +// +// Command-line argument -force ignores any other running tracing and turns it off +// +int main (int argc, const char** argv) { + if ((argc > 1) && (strcmp(argv[1], "-force") == 0)) { + kutrace::DoControl(KUTRACE_CMD_RESET, 0); + } else { + if (!kutrace::TestModule()) { + return 0; + } + } + + u64 control_flags = 0; + // Added: if argv[1] is 1, do "go" and exit with tracing on + // if argv[1] is 0, do "stop" and exit with tracing off + + char fname[256]; + kutrace::MakeTraceFileName("ku", fname); + + if (argc > 1) { + if (strcmp(argv[1], "1") == 0) { + kutrace::DoReset(control_flags); kutrace::DoInit(argv[0]); kutrace::DoOn(); + return 0; + } + if (strcmp(argv[1], "0") == 0) { + /* After DoOff wait 20 msec for any pending tracing to finish */ + kutrace::DoOff(); msleep(20); kutrace::DoFlush(); kutrace::DoDump(fname); kutrace::DoQuit(); + return 0; + } + } + + + // Avoid always reseting so we can possibly start this program with tracing on + char buffer[kMaxBufferSize]; + fprintf(stdout, "control> "); + fflush(stdout); + while (ReadLine(stdin, buffer, kMaxBufferSize)) { + if (buffer[0] == '\0') {kutrace::DoStat(control_flags);} + else if (strcmp(buffer, "init") == 0) {kutrace::DoInit(argv[0]);} + else if (strcmp(buffer, "test") == 0) {kutrace::DoTest();} + else if (strcmp(buffer, "on") == 0) {kutrace::DoOn();} + else if (strcmp(buffer, "off") == 0) {kutrace::DoOff(); msleep(20);} + else if (strcmp(buffer, "flush") == 0) {kutrace::DoFlush();} + else if (strcmp(buffer, "reset") == 0) {kutrace::DoReset(control_flags);} + else if (strcmp(buffer, "stat") == 0) {kutrace::DoStat(control_flags);} + else if (strcmp(buffer, "dump") == 0) {kutrace::DoDump(fname);} + // NOTE: order for ipc/llc/wrap is alphabetical i-l-w + else if (strcmp(buffer, "go") == 0) { + control_flags = 0; + kutrace::DoReset(control_flags); kutrace::DoInit(argv[0]); kutrace::DoOn(); + } else if (strcmp(buffer, "goipc") == 0) { + control_flags |= DO_IPC; + kutrace::DoReset(control_flags); kutrace::DoInit(argv[0]); kutrace::DoOn(); + } else if (strcmp(buffer, "gollc") == 0) { + control_flags |= DO_LLC; + kutrace::DoReset(control_flags); kutrace::DoInit(argv[0]); kutrace::DoOn(); + } else if (strcmp(buffer, "gowrap") == 0) { + control_flags |= DO_WRAP; + kutrace::DoReset(control_flags); kutrace::DoInit(argv[0]); kutrace::DoOn(); + } else if (strcmp(buffer, "goipcllc") == 0) { + control_flags |= (DO_IPC | DO_LLC); + kutrace::DoReset(control_flags); kutrace::DoInit(argv[0]); kutrace::DoOn(); + } else if (strcmp(buffer, "goipcwrap") == 0) { + control_flags |= (DO_IPC | DO_WRAP); + kutrace::DoReset(control_flags); kutrace::DoInit(argv[0]); kutrace::DoOn(); + } else if (strcmp(buffer, "gollcwrap") == 0) { + control_flags |= (DO_LLC | DO_WRAP); + kutrace::DoReset(control_flags); kutrace::DoInit(argv[0]); kutrace::DoOn(); + } else if (strcmp(buffer, "goipcllcwrap") == 0) { + control_flags |= (DO_IPC | DO_LLC | DO_WRAP); + kutrace::DoReset(control_flags); kutrace::DoInit(argv[0]); kutrace::DoOn(); + } else if (memcmp(buffer, "stop", 4) == 0) { + /* Pick off filename if any */ + if (strlen(buffer) > 5) { + strcpy(fname, buffer + 5); + // Append ".trace" if not already there + if (strstr(fname, ".trace") == NULL) { + strcpy(&fname[strlen(fname)], ".trace"); + } + } + /* After DoOff wait 20 msec for any pending tracing to finish */ + kutrace::DoOff(); msleep(20); + kutrace::DoFlush(); kutrace::DoDump(fname); control_flags = 0; kutrace::DoQuit(); + } else if (strcmp(buffer, "quit") == 0) {kutrace::DoQuit();} + else if (strcmp(buffer, "exit") == 0) {kutrace::DoQuit();} + else if (memcmp(buffer, "wait ", 5) == 0) { + int n = atoi(buffer + 5); + msleep(n * 1000); + } else { + fprintf(stdout, "Not recognized '%s'\n", buffer); + fprintf(stdout, + " go(ipc|llc|wrap)* stop init on off flush reset stat dump wait quit\n"); + } + + fprintf(stdout, "control> "); + fflush(stdout); + } + + return 0; +} + + + diff --git a/postproc/kutrace_control_names.h b/postproc/kutrace_control_names.h index 2c8e0687bb9b..1d5cc8565693 100644 --- a/postproc/kutrace_control_names.h +++ b/postproc/kutrace_control_names.h @@ -1,57 +1,33 @@ -// Names for syscall, etc. in dclab_tracing -// dick sites 2022.07.31 +// Names for syscall, etc. in dclab_tracing +// dick sites 2019.03.13, 2020.07.10 +// These are from linux-4.19.19 x86 AMD 64-bit. Others will vary. // #ifndef __KUTRACE_CONTROL_NAMES_H__ #define __KUTRACE_CONTROL_NAMES_H__ -// Add others as you find and test them -#if defined(__linux__) -#define IsLinux 1 -#else -#define IsLinux 0 -#endif - -#if defined(__FreeBSD__) -#define IsFreeBSD 1 -#else -#define IsFreeBSD 0 -#endif - -#if defined(__x86_64__) -#define Isx86_64 1 -#else -#define Isx86_64 0 -#endif +/* Add others as you find and test them */ +#define Isx86_64 defined(__x86_64) +#define IsAmd_64 Isx86_64 && defined(__znver1) +#define IsIntel_64 Isx86_64 && !defined(__znver1) -#if defined(__znver1) -#define IsAmd_64 Isx86_64 -#define IsIntel_64 0 -#else -#define IsAmd_64 0 -#define IsIntel_64 Isx86_64 -#endif - -#if defined(__aarch64__) -#define IsArm_64 1 -#else -#define IsArm_64 0 -#endif - -#if IsFreeBSD && Isx86_64 -#include "kutrace_control_names_freebsd_x86.h" +#define IsArm_64 defined(__aarch64__) +#define IsRPi4 defined(__ARM_ARCH) && (__ARM_ARCH == 8) +#define IsRPi4_64 IsRPi4 && IsArm_64 -#elif IsLinux && Isx86_64 -#include "kutrace_control_names_linux_x86.h" +#if IsAmd_64 +#include "kutrace_control_names_ryzen.h" -#elif IsLinux && IsRiscv_64 -#include "kutrace_control_names_linux_riscv.h" +#elif IsIntel_64 +#include "kutrace_control_names_i3.h" -#elif IsLinux && IsArm_64 -#include "kutrace_control_names_linux_android.h" +#elif IsRPi4_64 +#include "kutrace_control_names_rpi4.h" #else #error Need control_names for your architecture #endif #endif // __KUTRACE_CONTROL_NAMES_H__ + + diff --git a/postproc/kutrace_control_names_4_4.h b/postproc/kutrace_control_names_4_4.h new file mode 100644 index 000000000000..74f66a8dc086 --- /dev/null +++ b/postproc/kutrace_control_names_4_4.h @@ -0,0 +1,508 @@ +// Names for syscall, etc. in dclab_tracing +// dick sites 2016.10.07 +// These are from linux-4.4.0 x86 64-bit. Others will vary. +// + +#ifndef __KUTRACE_CONTROL_NAMES_H__ +#define __KUTRACE_CONTROL_NAMES_H__ + +#include "kutrace_lib.h" + +//typedef struct { +// int number; +// const char* name; +//} NumNamePair; + + +static const NumNamePair PidNames[] = { + {0, "-idle-"}, + {-1, NULL}, // Must be last +}; + +static const NumNamePair Syscall64Names[] = { + {0, "read"}, + {1, "write"}, + {2, "open"}, + {3, "close"}, + {4, "stat"}, + {5, "fstat"}, + {6, "lstat"}, + {7, "poll"}, + {8, "lseek"}, + {9, "mmap"}, + {10, "mprotect"}, + {11, "munmap"}, + {12, "brk"}, + {13, "rt_sigaction"}, + {14, "rt_sigprocmask"}, + {15, "rt_sigreturn"}, + {16, "ioctl"}, + {17, "pread64"}, + {18, "pwrite64"}, + {19, "readv"}, + {20, "writev"}, + {21, "access"}, + {22, "pipe"}, + {23, "select"}, + {24, "sched_yield"}, + {25, "mremap"}, + {26, "msync"}, + {27, "mincore"}, + {28, "madvise"}, + {29, "shmget"}, + {30, "shmat"}, + {31, "shmctl"}, + {32, "dup"}, + {33, "dup2"}, + {34, "pause"}, + {35, "nanosleep"}, + {36, "getitimer"}, + {37, "alarm"}, + {38, "setitimer"}, + {39, "getpid"}, + {40, "sendfile"}, + {41, "socket"}, + {42, "connect"}, + {43, "accept"}, + {44, "sendto"}, + {45, "recvfrom"}, + {46, "sendmsg"}, + {47, "recvmsg"}, + {48, "shutdown"}, + {49, "bind"}, + {50, "listen"}, + {51, "getsockname"}, + {52, "getpeername"}, + {53, "socketpair"}, + {54, "setsockopt"}, + {55, "getsockopt"}, + {56, "clone"}, + {57, "fork"}, + {58, "vfork"}, + {59, "execve"}, + {60, "exit"}, + {61, "wait4"}, + {62, "kill"}, + {63, "uname"}, + {64, "semget"}, + {65, "semop"}, + {66, "semctl"}, + {67, "shmdt"}, + {68, "msgget"}, + {69, "msgsnd"}, + {70, "msgrcv"}, + {71, "msgctl"}, + {72, "fcntl"}, + {73, "flock"}, + {74, "fsync"}, + {75, "fdatasync"}, + {76, "truncate"}, + {77, "ftruncate"}, + {78, "getdents"}, + {79, "getcwd"}, + {80, "chdir"}, + {81, "fchdir"}, + {82, "rename"}, + {83, "mkdir"}, + {84, "rmdir"}, + {85, "creat"}, + {86, "link"}, + {87, "unlink"}, + {88, "symlink"}, + {89, "readlink"}, + {90, "chmod"}, + {91, "fchmod"}, + {92, "chown"}, + {93, "fchown"}, + {94, "lchown"}, + {95, "umask"}, + {96, "gettimeofday"}, + {97, "getrlimit"}, + {98, "getrusage"}, + {99, "sysinfo"}, + {100, "times"}, + {101, "ptrace"}, + {102, "getuid"}, + {103, "syslog"}, + {104, "getgid"}, + {105, "setuid"}, + {106, "setgid"}, + {107, "geteuid"}, + {108, "getegid"}, + {109, "setpgid"}, + {110, "getppid"}, + {111, "getpgrp"}, + {112, "setsid"}, + {113, "setreuid"}, + {114, "setregid"}, + {115, "getgroups"}, + {116, "setgroups"}, + {117, "setresuid"}, + {118, "getresuid"}, + {119, "setresgid"}, + {120, "getresgid"}, + {121, "getpgid"}, + {122, "setfsuid"}, + {123, "setfsgid"}, + {124, "getsid"}, + {125, "capget"}, + {126, "capset"}, + {127, "rt_sigpending"}, + {128, "rt_sigtimedwait"}, + {129, "rt_sigqueueinfo"}, + {130, "rt_sigsuspend"}, + {131, "sigaltstack"}, + {132, "utime"}, + {133, "mknod"}, + {134, "uselib"}, + {135, "personality"}, + {136, "ustat"}, + {137, "statfs"}, + {138, "fstatfs"}, + {139, "sysfs"}, + {140, "getpriority"}, + {141, "setpriority"}, + {142, "sched_setparam"}, + {143, "sched_getparam"}, + {144, "sched_setscheduler"}, + {145, "sched_getscheduler"}, + {146, "sched_get_priority_max"}, + {147, "sched_get_priority_min"}, + {148, "sched_rr_get_interval"}, + {149, "mlock"}, + {150, "munlock"}, + {151, "mlockall"}, + {152, "munlockall"}, + {153, "vhangup"}, + {154, "modify_ldt"}, + {155, "pivot_root"}, + {156, "_sysctl"}, + {157, "prctl"}, + {158, "arch_prctl"}, + {159, "adjtimex"}, + {160, "setrlimit"}, + {161, "chroot"}, + {162, "sync"}, + {163, "acct"}, + {164, "settimeofday"}, + {165, "mount"}, + {166, "umount2"}, + {167, "swapon"}, + {168, "swapoff"}, + {169, "reboot"}, + {170, "sethostname"}, + {171, "setdomainname"}, + {172, "iopl"}, + {173, "ioperm"}, + {174, "create_module"}, + {175, "init_module"}, + {176, "delete_module"}, + {177, "get_kernel_syms"}, + {178, "query_module"}, + {179, "quotactl"}, + {180, "nfsservctl"}, + {181, "getpmsg"}, + {182, "putpmsg"}, + {183, "afs_syscall"}, + {184, "tuxcall"}, + {185, "security"}, + {186, "gettid"}, + {187, "readahead"}, + {188, "setxattr"}, + {189, "lsetxattr"}, + {190, "fsetxattr"}, + {191, "getxattr"}, + {192, "lgetxattr"}, + {193, "fgetxattr"}, + {194, "listxattr"}, + {195, "llistxattr"}, + {196, "flistxattr"}, + {197, "removexattr"}, + {198, "lremovexattr"}, + {199, "fremovexattr"}, + {200, "tkill"}, + {201, "time"}, + {202, "futex"}, + {203, "sched_setaffinity"}, + {204, "sched_getaffinity"}, + {205, "set_thread_area"}, + {206, "io_setup"}, + {207, "io_destroy"}, + {208, "io_getevents"}, + {209, "io_submit"}, + {210, "io_cancel"}, + {211, "get_thread_area"}, + {212, "lookup_dcookie"}, + {213, "epoll_create"}, + {214, "epoll_ctl_old"}, + {215, "epoll_wait_old"}, + {216, "remap_file_pages"}, + {217, "getdents64"}, + {218, "set_tid_address"}, + {219, "restart_syscall"}, + {220, "semtimedop"}, + {221, "fadvise64"}, + {222, "timer_create"}, + {223, "timer_settime"}, + {224, "timer_gettime"}, + {225, "timer_getoverrun"}, + {226, "timer_delete"}, + {227, "clock_settime"}, + {228, "clock_gettime"}, + {229, "clock_getres"}, + {230, "clock_nanosleep"}, + {231, "exit_group"}, + {232, "epoll_wait"}, + {233, "epoll_ctl"}, + {234, "tgkill"}, + {235, "utimes"}, + {236, "vserver"}, + {237, "mbind"}, + {238, "set_mempolicy"}, + {239, "get_mempolicy"}, + {240, "mq_open"}, + {241, "mq_unlink"}, + {242, "mq_timedsend"}, + {243, "mq_timedreceive"}, + {244, "mq_notify"}, + {245, "mq_getsetattr"}, + {246, "kexec_load"}, + {247, "waitid"}, + {248, "add_key"}, + {249, "request_key"}, + {250, "keyctl"}, + {251, "ioprio_set"}, + {252, "ioprio_get"}, + {253, "inotify_init"}, + {254, "inotify_add_watch"}, + {255, "inotify_rm_watch"}, + {256, "migrate_pages"}, + {257, "openat"}, + {258, "mkdirat"}, + {259, "mknodat"}, + {260, "fchownat"}, + {261, "futimesat"}, + {262, "newfstatat"}, + {263, "unlinkat"}, + {264, "renameat"}, + {265, "linkat"}, + {266, "symlinkat"}, + {267, "readlinkat"}, + {268, "fchmodat"}, + {269, "faccessat"}, + {270, "pselect6"}, + {271, "ppoll"}, + {272, "unshare"}, + {273, "set_robust_list"}, + {274, "get_robust_list"}, + {275, "splice"}, + {276, "tee"}, + {277, "sync_file_range"}, + {278, "vmsplice"}, + {279, "move_pages"}, + {280, "utimensat"}, + {281, "epoll_pwait"}, + {282, "signalfd"}, + {283, "timerfd_create"}, + {284, "eventfd"}, + {285, "fallocate"}, + {286, "timerfd_settime"}, + {287, "timerfd_gettime"}, + {288, "accept4"}, + {289, "signalfd4"}, + {290, "eventfd2"}, + {291, "epoll_create1"}, + {292, "dup3"}, + {293, "pipe2"}, + {294, "inotify_init1"}, + {295, "preadv"}, + {296, "pwritev"}, + {297, "rt_tgsigqueueinfo"}, + {298, "perf_event_open"}, + {299, "recvmmsg"}, + {300, "fanotify_init"}, + {301, "fanotify_mark"}, + {302, "prlimit64"}, + {303, "name_to_handle_at"}, + {304, "open_by_handle_at"}, + {305, "clock_adjtime"}, + {306, "syncfs"}, + {307, "sendmmsg"}, + {308, "setns"}, + {309, "getcpu"}, + {310, "process_vm_readv"}, + {311, "process_vm_writev"}, + {312, "kcmp"}, + {313, "finit_module"}, + {314, "sched_setattr"}, + {315, "sched_getattr"}, + {316, "renameat2"}, + {317, "seccomp"}, + {318, "getrandom"}, + {319, "memfd_create"}, + {320, "kexec_file_load"}, + {321, "bpf"}, + {322, "execveat"}, + {323, "userfaultfd"}, + {324, "membarrier"}, + {325, "mlock2"}, + {511, "-sched-"}, // Fake last syscall. Indicates where __schedule runs + {-1, NULL}, // Must be last +}; + +// Based on arch/x86/include/asm/x86/irq_vectors.h +// 2017: arch/x86/include/asm/irq_vectors.h +/* + * Vectors 0 ... 31 : system traps and exceptions - hardcoded events + * Vectors 32 ... 127 : device interrupts + * Vector 128 : legacy int80 syscall interface + * Vectors 129 ... INVALIDATE_TLB_VECTOR_START-1 except 204 : device interrupts + * Vectors INVALIDATE_TLB_VECTOR_START ... 255 : special interrupts + */ + +static const NumNamePair IrqNames[] = { +#if 0 + // 2016 machines + {0, "timer"}, // timer + {1, "i8042_keyboard1"}, // keyboard/touchpad/mouse + {8, "rtc0"}, // real-time clock chip + {9, "acpi"}, + {12, "i8042_keyboard12"}, // keyboard/touchpad/mouse + {16, "usb1"}, + {23, "usb2"}, + {24, "xhci_hcd_usb"}, // usb + {25, "1f.2_disks"}, // disk(s) + {26, "i915_graphics"}, // graphics + {27, "enp2s0_eth0"}, // aka eth0 + {28, "mei_me"}, // Management Engine Interface + {29, "snd_hda_29"}, // audio? + {30, "snd_hda_30"}, // audio? + + {0xc1, "disk/ssd"}, // 2016 for our particular machines dclab-1,2,3,4 + {0xd1, "eth0"}, + +#else + + // 2017 machines + {0, "timer"}, // timer + {1, "i8042_keyboard1"}, // keyboard/touchpad/mouse + {8, "rtc0"}, // real-time clock chip + {9, "acpi"}, + {12, "i8042_keyboard12"}, // keyboard/touchpad/mouse + {16, "usb1"}, + {23, "usb2"}, + {24, "i915_graphics"}, // usb + {28, "enp2s0_eth0"}, // aka eth0 + {29, "hda_29_inner"}, // disk + {30, "hda_30_inner"}, // disk + {31, "mei_me"}, // Management Engine Interface + //{29, "snd_hda_29"}, // audio ?? maybe 32/33 now + //{30, "snd_hda_30"}, // audio ?? + + // 2017 for our particular machines dclab-1,2,3,4 + {0x22, "eth0"}, // eth0 + {0x42, "hda_29"}, // disk, forwarded to 29 + {0x52, "hda_30"}, // disk, forwarded to 30 + {0x62, "hda_31"}, // disk + {0xb1, "graphics"}, // ether?, forwards to 24, no return + + // 2018 for our particular machines dclab-1,2,3 + {0xb2, "eth0"}, // ethernet + + +#endif + + {128, "int80"}, + + {255, "spurious_apic"}, + {254, "error_apic"}, + {253, "reschedule_ipi"}, + {252, "call_function"}, + {251, "call_function_single"}, + {250, "thermal_apic"}, + {249, " threshold_apic"}, + {248, "reboot"}, + {247, "x86_platform_ipi"}, + {241, "posted_intr_wakeup"}, + {246, "irq_work"}, + {245, "uv_bau_message"}, + {244, "deferred_error"}, + {243, "hypervisor_callback"}, + {242, "posted_intr"}, + {240, "flush_tlb_ipi"}, + {239, "local_timer_vector"}, // event 0x05ef, decimal 1519 + {236, "local_timer_vector"}, // event 0x05ec, decimal 1516 4.19 x86 + {13, "fpu_irq"}, + + {-1, NULL}, // Must be last +}; + +static const NumNamePair TrapNames[] = { + {0, "Divide-by-zero"}, + {1, "Debug"}, + {2, "Non-maskable_Interrupt"}, + {3, "Breakpoint"}, + {4, "Overflow"}, + {5, "Bound_Range_Exceeded"}, + {6, "Invalid_Opcode"}, + {7, "device_not_available"}, + {8, "Double_Fault"}, + {9, "Coprocessor_Segment_Overrun"}, + {10, "Invalid_TSS"}, + {11, "Segment_Not_Present"}, + {12, "Stack_Segment_Fault"}, + {13, "General_Protection_Fault"}, + {14, "page_fault"}, + {15, "Spurious_Interrupt"}, + {16, "x87_Floating-Point_Exception"}, + {17, "Alignment_Check"}, + {18, "Machine_Check"}, + {19, "SIMD_Floating-Point_Exception"}, + {32, "IRET_Exception"}, + + {-1, NULL}, // Must be last +}; + +// This is just the base set. More could be added later +static const NumNamePair ErrnoNames[] = { + {1, "EPERM"}, + {2, "ENOENT"}, + {3, "ESRCH"}, + {4, "EINTR"}, + {5, "EIO"}, + {6, "ENXIO"}, + {7, "E2BIG"}, + {8, "ENOEXEC"}, + {9, "EBADF"}, + {10, "ECHILD"}, + {11, "EAGAIN"}, + {12, "ENOMEM"}, + {13, "EACCES"}, + {14, "EFAULT"}, + {15, "ENOTBLK"}, + {16, "EBUSY"}, + {17, "EEXIST"}, + {18, "EXDEV"}, + {19, "ENODEV"}, + {20, "ENOTDIR"}, + {21, "EISDIR"}, + {22, "EINVAL"}, + {23, "ENFILE"}, + {24, "EMFILE"}, + {25, "ENOTTY"}, + {26, "ETXTBSY"}, + {27, "EFBIG"}, + {28, "ENOSPC"}, + {29, "ESPIPE"}, + {30, "EROFS"}, + {31, "EMLINK"}, + {32, "EPIPE"}, + {33, "EDOM"}, + {34, "ERANGE"}, + + {-1, NULL}, // Must be last + +}; +#endif // __KUTRACE_CONTROL_NAMES_H__ + + diff --git a/postproc/kutrace_control_names_arm32.h b/postproc/kutrace_control_names_arm32.h new file mode 100644 index 000000000000..9b8fed9d2059 --- /dev/null +++ b/postproc/kutrace_control_names_arm32.h @@ -0,0 +1,551 @@ +// Names for syscall, etc. in dclab_tracing +// dick sites 2019.03.13 +// These are from linux-4.19 Arm32 linux/arch/arm/tools/syscall.tbl Others will vary. +// + +#ifndef __KUTRACE_CONTROL_NAMES_H__ +#define __KUTRACE_CONTROL_NAMES_H__ + +#include "kutrace_lib.h" + +static const char* CpuFamilyModelManuf = "7 3 ARMv7"; + +static const NumNamePair PidNames[] = { + {0, "-idle-"}, + {-1, NULL}, // Must be last +}; + +static const NumNamePair Syscall64Names[] = { + {511, "-sched-"}, // Fake last syscall. Indicates where __schedule runs + {-1, NULL}, // Must be last +}; + +static const NumNamePair Syscall32Names[] = { + {0, "restart_syscall"}, + {1, "exit"}, + {2, "fork"}, + {3, "read"}, + {4, "write"}, + {5, "open"}, + {6, "close"}, + {8, "creat"}, + {9, "link"}, + {10, "unlink"}, + {11, "execve"}, + {12, "chdir"}, + {14, "mknod"}, + {15, "chmod"}, + {16, "lchown"}, + {19, "lseek"}, + {20, "getpid"}, + {21, "mount"}, + {23, "setuid"}, + {24, "getuid"}, + {26, "ptrace"}, + {29, "pause"}, + {33, "access"}, + {34, "nice"}, + {36, "sync"}, + {37, "kill"}, + {38, "rename"}, + {39, "mkdir"}, + {40, "rmdir"}, + {41, "dup"}, + {42, "pipe"}, + {43, "times"}, + {45, "brk"}, + {46, "setgid"}, + {47, "getgid"}, + {49, "geteuid"}, + {50, "getegid"}, + {51, "acct"}, + {52, "umount2"}, + {54, "ioctl"}, + {55, "fcntl"}, + {57, "setpgid"}, + {60, "umask"}, + {61, "chroot"}, + {62, "ustat"}, + {63, "dup2"}, + {64, "getppid"}, + {65, "getpgrp"}, + {66, "setsid"}, + {67, "sigaction"}, + {70, "setreuid"}, + {71, "setregid"}, + {72, "sigsuspend"}, + {73, "sigpending"}, + {74, "sethostname"}, + {75, "setrlimit"}, + {77, "getrusage"}, + {78, "gettimeofday"}, + {79, "settimeofday"}, + {80, "getgroups"}, + {81, "setgroups"}, + {83, "symlink"}, + {85, "readlink"}, + {86, "uselib"}, + {87, "swapon"}, + {88, "reboot"}, + {91, "munmap"}, + {92, "truncate"}, + {93, "ftruncate"}, + {94, "fchmod"}, + {95, "fchown"}, + {96, "getpriority"}, + {97, "setpriority"}, + {99, "statfs"}, + {100, "fstatfs"}, + {103, "syslog"}, + {104, "setitimer"}, + {105, "getitimer"}, + {106, "stat"}, + {107, "lstat"}, + {108, "fstat"}, + {111, "vhangup"}, + {114, "wait4"}, + {115, "swapoff"}, + {116, "sysinfo"}, + {118, "fsync"}, + {119, "sigreturn"}, + {120, "clone"}, + {121, "setdomainname"}, + {122, "uname"}, + {124, "adjtimex"}, + {125, "mprotect"}, + {126, "sigprocmask"}, + {128, "init_module"}, + {129, "delete_module"}, + {131, "quotactl"}, + {132, "getpgid"}, + {133, "fchdir"}, + {134, "bdflush"}, + {135, "sysfs"}, + {136, "personality"}, + {138, "setfsuid"}, + {139, "setfsgid"}, + {140, "_llseek"}, + {141, "getdents"}, + {142, "_newselect"}, + {143, "flock"}, + {144, "msync"}, + {145, "readv"}, + {146, "writev"}, + {147, "getsid"}, + {148, "fdatasync"}, + {149, "_sysctl"}, + {150, "mlock"}, + {151, "munlock"}, + {152, "mlockall"}, + {153, "munlockall"}, + {154, "sched_setparam"}, + {155, "sched_getparam"}, + {156, "sched_setscheduler"}, + {157, "sched_getscheduler"}, + {158, "sched_yield"}, + {159, "sched_get_priority_max"}, + {160, "sched_get_priority_min"}, + {161, "sched_rr_get_interval"}, + {162, "nanosleep"}, + {163, "mremap"}, + {164, "setresuid"}, + {165, "getresuid"}, + {168, "poll"}, + {169, ""}, + {170, "setresgid"}, + {171, "getresgid"}, + {172, "prctl"}, + {173, "rt_sigreturn"}, + {174, "rt_sigaction"}, + {175, "rt_sigprocmask"}, + {176, "rt_sigpending"}, + {177, "rt_sigtimedwait"}, + {178, "rt_sigqueueinfo"}, + {179, "rt_sigsuspend"}, + {180, "pread64"}, + {181, "pwrite64"}, + {182, "chown"}, + {183, "getcwd"}, + {184, "capget"}, + {185, "capset"}, + {186, "sigaltstack"}, + {187, "sendfile"}, + {190, "vfork"}, + {191, "ugetrlimit"}, + {192, "mmap2"}, + {193, "truncate64"}, + {194, "ftruncate64"}, + {195, "stat64"}, + {196, "lstat64"}, + {197, "fstat64"}, + {198, "lchown32"}, + {199, "getuid32"}, + {200, "getgid32"}, + {201, "geteuid32"}, + {202, "getegid32"}, + {203, "setreuid32"}, + {204, "setregid32"}, + {205, "getgroups32"}, + {206, "setgroups32"}, + {207, "fchown32"}, + {208, "setresuid32"}, + {209, "getresuid32"}, + {210, "setresgid32"}, + {211, "getresgid32"}, + {212, "chown32"}, + {213, "setuid32"}, + {214, "setgid32"}, + {215, "setfsuid32"}, + {216, "setfsgid32"}, + {217, "getdents64"}, + {218, "pivot_root"}, + {219, "mincore"}, + {220, "madvise"}, + {221, "fcntl64"}, + {224, "gettid"}, + {225, "readahead"}, + {226, "setxattr"}, + {227, "lsetxattr"}, + {228, "fsetxattr"}, + {229, "getxattr"}, + {230, "lgetxattr"}, + {231, "fgetxattr"}, + {232, "listxattr"}, + {233, "llistxattr"}, + {234, "flistxattr"}, + {235, "removexattr"}, + {236, "lremovexattr"}, + {237, "fremovexattr"}, + {238, "tkill"}, + {239, "sendfile64"}, + {240, "futex"}, + {241, "sched_setaffinity"}, + {242, "sched_getaffinity"}, + {243, "io_setup"}, + {244, "io_destroy"}, + {245, "io_getevents"}, + {246, "io_submit"}, + {247, "io_cancel"}, + {248, "exit_group"}, + {249, "lookup_dcookie"}, + {250, "epoll_create"}, + {251, "epoll_ctl"}, + {252, "epoll_wait"}, + {253, "remap_file_pages"}, + {256, "set_tid_address"}, + {257, "timer_create"}, + {258, "timer_settime"}, + {259, "timer_gettime"}, + {260, "timer_getoverrun"}, + {261, "timer_delete"}, + {262, "clock_settime"}, + {263, "clock_gettime"}, + {264, "clock_getres"}, + {265, "clock_nanosleep"}, + {266, "statfs64"}, + {267, "fstatfs64"}, + {268, "tgkill"}, + {269, "utimes"}, + {270, "arm_fadvise64_64"}, + {271, "pciconfig_iobase"}, + {272, "pciconfig_read"}, + {273, "pciconfig_write"}, + {274, "mq_open"}, + {275, "mq_unlink"}, + {276, "mq_timedsend"}, + {277, "mq_timedreceive"}, + {278, "mq_notify"}, + {279, "mq_getsetattr"}, + {280, "waitid"}, + {281, "socket"}, + {282, "bind"}, + {283, "connect"}, + {284, "listen"}, + {285, "accept"}, + {286, "getsockname"}, + {287, "getpeername"}, + {288, "socketpair"}, + {289, "send"}, + {290, "sendto"}, + {291, "recv"}, + {292, "recvfrom"}, + {293, "shutdown"}, + {294, "setsockopt"}, + {295, "getsockopt"}, + {296, "sendmsg"}, + {297, "recvmsg"}, + {298, "semop"}, + {299, "semget"}, + {300, "semctl"}, + {301, "msgsnd"}, + {302, "msgrcv"}, + {303, "msgget"}, + {304, "msgctl"}, + {305, "shmat"}, + {306, "shmdt"}, + {307, "shmget"}, + {308, "shmctl"}, + {309, "add_key"}, + {310, "request_key"}, + {311, "keyctl"}, + {312, "semtimedop"}, + {313, ""}, + {314, "ioprio_set"}, + {315, "ioprio_get"}, + {316, "inotify_init"}, + {317, "inotify_add_watch"}, + {318, "inotify_rm_watch"}, + {319, "mbind"}, + {320, "get_mempolicy"}, + {321, "set_mempolicy"}, + {322, "openat"}, + {323, "mkdirat"}, + {324, "mknodat"}, + {325, "fchownat"}, + {326, "futimesat"}, + {327, "fstatat64"}, + {328, "unlinkat"}, + {329, "renameat"}, + {330, "linkat"}, + {331, "symlinkat"}, + {332, "readlinkat"}, + {333, "fchmodat"}, + {334, "faccessat"}, + {335, "pselect6"}, + {336, "ppoll"}, + {337, "unshare"}, + {338, "set_robust_list"}, + {339, "get_robust_list"}, + {340, "splice"}, + {341, "arm_sync_file_range"}, + {342, "tee"}, + {343, "vmsplice"}, + {344, "move_pages"}, + {345, "getcpu"}, + {346, "epoll_pwait"}, + {347, "kexec_load"}, + {348, "utimensat"}, + {349, "signalfd"}, + {350, "timerfd_create"}, + {351, "eventfd"}, + {352, "fallocate"}, + {353, "timerfd_settime"}, + {354, "timerfd_gettime"}, + {355, "signalfd4"}, + {356, "eventfd2"}, + {357, "epoll_create1"}, + {358, "dup3"}, + {359, "pipe2"}, + {360, "inotify_init1"}, + {361, "preadv"}, + {362, "pwritev"}, + {363, "rt_tgsigqueueinfo"}, + {364, "perf_event_open"}, + {365, "recvmmsg"}, + {366, "accept4"}, + {367, "fanotify_init"}, + {368, "fanotify_mark"}, + {369, "prlimit64"}, + {370, "name_to_handle_at"}, + {371, "open_by_handle_at"}, + {372, "clock_adjtime"}, + {373, "syncfs"}, + {374, "sendmmsg"}, + {375, "setns"}, + {376, "process_vm_readv"}, + {377, "process_vm_writev"}, + {378, "kcmp"}, + {379, "finit_module"}, + {380, "sched_setattr"}, + {381, "sched_getattr"}, + {382, "renameat2"}, + {383, "seccomp"}, + {384, "getrandom"}, + {385, "memfd_create"}, + {386, "bpf"}, + {387, "execveat"}, + {388, "userfaultfd"}, + {389, "membarrier"}, + {390, "mlock2"}, + {391, "copy_file_range"}, + {392, "preadv2"}, + {393, "pwritev2"}, + {394, "pkey_mprotect"}, + {395, "pkey_alloc"}, + {396, "pkey_free"}, + {397, "statx"}, + {398, "rseq"}, + {399, "io_pgetevents"}, + + {511, "-sched-"}, // Fake last syscall. Indicates where __schedule runs + {-1, NULL}, // Must be last +}; + +// Based on arch/x86/include/asm/x86/irq_vectors.h +// 2017: arch/x86/include/asm/irq_vectors.h +// 2019: arch/x86/include/asm/irq_vectors.h +/* + * Vectors 0 ... 31 : system traps and exceptions - hardcoded events + * Vectors 32 ... 127 : device interrupts + * Vector 128 : legacy int80 syscall interface + * Vectors 129 ... INVALIDATE_TLB_VECTOR_START-1 except 204 : device interrupts + * Vectors INVALIDATE_TLB_VECTOR_START ... 255 : special interrupts + */ + +// Based on at /proc/interrupts on RPi4 + +// IPI0: 0 0 0 0 CPU wakeup interrupts +// IPI1: 0 0 0 0 Timer broadcast interrupts +// IPI2: 75435 302688 400819 234894 Rescheduling interrupts +// IPI3: 3239 42860 27741 19549 Function call interrupts +// IPI4: 0 0 0 0 CPU stop interrupts +// IPI5: 151666 210389 250357 200351 IRQ work interrupts +// IPI6: 0 0 0 0 completion interrupts + + +static const NumNamePair IrqNames[] = { + // Raspberry Pi-4B + { 0, "wakeup"}, + { 1, "timer"}, + { 2, "reschedule"}, + { 3, "call_func"}, + { 4, "cpu_stop"}, + { 5, "irq_work"}, + { 6, "completion"}, + { 7, "backtrace"}, + + {17, "local_timer"}, // timer + {18, "local_timer"}, // timer + {23, "dma_irq"}, + {31, "fe00b880.mailbox"}, + {34, "uart-pl011"}, + {36, "brcmstb_thermal"}, + {37, "mmc"}, // micro SD card + {38, "vc4_videos"}, + {43, "v3d"}, + {45, "eth0"}, + {46, "eth0"}, + {52, "VCHIQ_doorbell"}, + {53, "PCIe"}, + {54, "xhci_hcd"}, + + // {255, "spurious_apic"}, + {255, "BH"}, // bottom half of an interrupt handler + {254, "error_apic_ipi"}, + {253, "reschedule_ipi"}, + {252, "call_func_ipi"}, + {251, "call_func1_ipi"}, + {250, "thermal_apic_ipi"}, + {249, "threshold_apic_ipi"}, + {248, "reboot_ipi"}, + {247, "x86_platform_ipi"}, + {246, "irq_work_ipi"}, + {245, "uv_bau_message"}, + {244, "deferred_error"}, + {243, "hypervisor_callback"}, + {242, "posted_intr"}, + {241, "posted_intr_wakeup"}, + {240, "posted_intr_nested"}, + {239, "managed_irq_shutdown"}, + {238, "hyperv_reenlighten"}, + {237, "hyperv_stimer0"}, + {236, "local_timer_vector"}, // event 0x05ec, decimal 1516 4.19 x86 + + {13, "fpu_irq"}, + + {-1, NULL}, // Must be last +}; + +// Export this to raw2event.cc, using above value +static const int kTIMER_IRQ_EVENT = 0x05ec; + +// Bottom half BH vectors, from include/linux/interrupt.h +static const NumNamePair SoftIrqNames[] = { + {0, "HI_SOFTIRQ"}, + {1, "TIMER_SOFTIRQ"}, + {2, "NET_TX_SOFTIRQ"}, + {3, "NET_RX_SOFTIRQ"}, + {4, "BLOCK_SOFTIRQ"}, + {5, "IRQ_POLL_SOFTIRQ"}, + {6, "TASKLET_SOFTIRQ"}, + {7, "SCHED_SOFTIRQ"}, + {8, "HRTIMER_SOFTIRQ"}, + {9, "RCU_SOFTIRQ"}, + + {-1, NULL}, // Must be last +}; + +static const NumNamePair TrapNames[] = { + {0, "Divide-by-zero"}, + {1, "Debug"}, + {2, "Non-maskable_Interrupt"}, + {3, "Breakpoint"}, + {4, "Overflow"}, + {5, "Bound_Range_Exceeded"}, + {6, "Invalid_Opcode"}, + {7, "device_not_available"}, + {8, "Double_Fault"}, + {9, "Coprocessor_Segment_Overrun"}, + {10, "Invalid_TSS"}, + {11, "Segment_Not_Present"}, + {12, "Stack_Segment_Fault"}, + {13, "General_Protection_Fault"}, + {14, "page_fault"}, + {15, "Spurious_Interrupt"}, + {16, "x87_Floating-Point_Exception"}, + {17, "Alignment_Check"}, + {18, "Machine_Check"}, + {19, "SIMD_Floating-Point_Exception"}, + {32, "IRET_Exception"}, + + {-1, NULL}, // Must be last +}; + +// This is just the base set. More could be added later +// see linux-4.19.19/tools/include/uapi/asm-generic/errno-base.h +// linux-4.19.19/include/linux/errno.h +// linux-4.19.19/include/uapi/linux/errno.h +// linux-4.19.19/include/uapi/asm-generic/errno.h + +static const NumNamePair ErrnoNames[] = { + {1, "EPERM"}, + {2, "ENOENT"}, + {3, "ESRCH"}, + {4, "EINTR"}, + {5, "EIO"}, + {6, "ENXIO"}, + {7, "E2BIG"}, + {8, "ENOEXEC"}, + {9, "EBADF"}, + {10, "ECHILD"}, + {11, "EAGAIN"}, + {12, "ENOMEM"}, + {13, "EACCES"}, + {14, "EFAULT"}, + {15, "ENOTBLK"}, + {16, "EBUSY"}, + {17, "EEXIST"}, + {18, "EXDEV"}, + {19, "ENODEV"}, + {20, "ENOTDIR"}, + {21, "EISDIR"}, + {22, "EINVAL"}, + {23, "ENFILE"}, + {24, "EMFILE"}, + {25, "ENOTTY"}, + {26, "ETXTBSY"}, + {27, "EFBIG"}, + {28, "ENOSPC"}, + {29, "ESPIPE"}, + {30, "EROFS"}, + {31, "EMLINK"}, + {32, "EPIPE"}, + {33, "EDOM"}, + {34, "ERANGE"}, + + {-1, NULL}, // Must be last + +}; +#endif // __KUTRACE_CONTROL_NAMES_H__ + + diff --git a/postproc/kutrace_control_names_i3.h b/postproc/kutrace_control_names_i3.h new file mode 100644 index 000000000000..720b11d596b2 --- /dev/null +++ b/postproc/kutrace_control_names_i3.h @@ -0,0 +1,605 @@ +// Names for syscall, etc. in dclab_tracing +// dick sites 2019.03.13, 2020.07.10 +// These are from linux-4.19.19 x86 AMD 64-bit. Others will vary. +// + +#ifndef __KUTRACE_CONTROL_NAMES_I3_H__ +#define __KUTRACE_CONTROL_NAMES_I3_H__ + +#include "kutrace_lib.h" + +// Get rid of this +static const char* CpuFamilyModelManuf = "23 17 AMD"; + +static const NumNamePair PidNames[] = { + {0, "-idle-"}, + {-1, NULL}, // Must be last +}; + +static const NumNamePair Syscall32Names[] = { + {1023, "-sched-"}, // Fake last syscall. Indicates where __schedule runs + {-1, NULL}, // Must be last +}; + +// From linux-6.1.12/arch/x86/include/generated/uapi/asm/unistd_64.h +// grep define arch/x86/include/generated/uapi/asm/unistd_64.h |sed 's/#define __NR_\([^ ]*\) \([0-9]*\)/ \{\2, \"\1\"\},/' +static const NumNamePair Syscall64Names[] = { + {0, "read"}, + {1, "write"}, + {2, "open"}, + {3, "close"}, + {4, "stat"}, + {5, "fstat"}, + {6, "lstat"}, + {7, "poll"}, + {8, "lseek"}, + {9, "mmap"}, + {10, "mprotect"}, + {11, "munmap"}, + {12, "brk"}, + {13, "rt_sigaction"}, + {14, "rt_sigprocmask"}, + {15, "rt_sigreturn"}, + {16, "ioctl"}, + {17, "pread64"}, + {18, "pwrite64"}, + {19, "readv"}, + {20, "writev"}, + {21, "access"}, + {22, "pipe"}, + {23, "select"}, + {24, "sched_yield"}, + {25, "mremap"}, + {26, "msync"}, + {27, "mincore"}, + {28, "madvise"}, + {29, "shmget"}, + {30, "shmat"}, + {31, "shmctl"}, + {32, "dup"}, + {33, "dup2"}, + {34, "pause"}, + {35, "nanosleep"}, + {36, "getitimer"}, + {37, "alarm"}, + {38, "setitimer"}, + {39, "getpid"}, + {40, "sendfile"}, + {41, "socket"}, + {42, "connect"}, + {43, "accept"}, + {44, "sendto"}, + {45, "recvfrom"}, + {46, "sendmsg"}, + {47, "recvmsg"}, + {48, "shutdown"}, + {49, "bind"}, + {50, "listen"}, + {51, "getsockname"}, + {52, "getpeername"}, + {53, "socketpair"}, + {54, "setsockopt"}, + {55, "getsockopt"}, + {56, "clone"}, + {57, "fork"}, + {58, "vfork"}, + {59, "execve"}, + {60, "exit"}, + {61, "wait4"}, + {62, "kill"}, + {63, "uname"}, + {64, "semget"}, + {65, "semop"}, + {66, "semctl"}, + {67, "shmdt"}, + {68, "msgget"}, + {69, "msgsnd"}, + {70, "msgrcv"}, + {71, "msgctl"}, + {72, "fcntl"}, + {73, "flock"}, + {74, "fsync"}, + {75, "fdatasync"}, + {76, "truncate"}, + {77, "ftruncate"}, + {78, "getdents"}, + {79, "getcwd"}, + {80, "chdir"}, + {81, "fchdir"}, + {82, "rename"}, + {83, "mkdir"}, + {84, "rmdir"}, + {85, "creat"}, + {86, "link"}, + {87, "unlink"}, + {88, "symlink"}, + {89, "readlink"}, + {90, "chmod"}, + {91, "fchmod"}, + {92, "chown"}, + {93, "fchown"}, + {94, "lchown"}, + {95, "umask"}, + {96, "gettimeofday"}, + {97, "getrlimit"}, + {98, "getrusage"}, + {99, "sysinfo"}, + {100, "times"}, + {101, "ptrace"}, + {102, "getuid"}, + {103, "syslog"}, + {104, "getgid"}, + {105, "setuid"}, + {106, "setgid"}, + {107, "geteuid"}, + {108, "getegid"}, + {109, "setpgid"}, + {110, "getppid"}, + {111, "getpgrp"}, + {112, "setsid"}, + {113, "setreuid"}, + {114, "setregid"}, + {115, "getgroups"}, + {116, "setgroups"}, + {117, "setresuid"}, + {118, "getresuid"}, + {119, "setresgid"}, + {120, "getresgid"}, + {121, "getpgid"}, + {122, "setfsuid"}, + {123, "setfsgid"}, + {124, "getsid"}, + {125, "capget"}, + {126, "capset"}, + {127, "rt_sigpending"}, + {128, "rt_sigtimedwait"}, + {129, "rt_sigqueueinfo"}, + {130, "rt_sigsuspend"}, + {131, "sigaltstack"}, + {132, "utime"}, + {133, "mknod"}, + {134, "uselib"}, + {135, "personality"}, + {136, "ustat"}, + {137, "statfs"}, + {138, "fstatfs"}, + {139, "sysfs"}, + {140, "getpriority"}, + {141, "setpriority"}, + {142, "sched_setparam"}, + {143, "sched_getparam"}, + {144, "sched_setscheduler"}, + {145, "sched_getscheduler"}, + {146, "sched_get_priority_max"}, + {147, "sched_get_priority_min"}, + {148, "sched_rr_get_interval"}, + {149, "mlock"}, + {150, "munlock"}, + {151, "mlockall"}, + {152, "munlockall"}, + {153, "vhangup"}, + {154, "modify_ldt"}, + {155, "pivot_root"}, + {156, "_sysctl"}, + {157, "prctl"}, + {158, "arch_prctl"}, + {159, "adjtimex"}, + {160, "setrlimit"}, + {161, "chroot"}, + {162, "sync"}, + {163, "acct"}, + {164, "settimeofday"}, + {165, "mount"}, + {166, "umount2"}, + {167, "swapon"}, + {168, "swapoff"}, + {169, "reboot"}, + {170, "sethostname"}, + {171, "setdomainname"}, + {172, "iopl"}, + {173, "ioperm"}, + {174, "create_module"}, + {175, "init_module"}, + {176, "delete_module"}, + {177, "get_kernel_syms"}, + {178, "query_module"}, + {179, "quotactl"}, + {180, "nfsservctl"}, + {181, "getpmsg"}, + {182, "putpmsg"}, + {183, "afs_syscall"}, + {184, "tuxcall"}, + {185, "security"}, + {186, "gettid"}, + {187, "readahead"}, + {188, "setxattr"}, + {189, "lsetxattr"}, + {190, "fsetxattr"}, + {191, "getxattr"}, + {192, "lgetxattr"}, + {193, "fgetxattr"}, + {194, "listxattr"}, + {195, "llistxattr"}, + {196, "flistxattr"}, + {197, "removexattr"}, + {198, "lremovexattr"}, + {199, "fremovexattr"}, + {200, "tkill"}, + {201, "time"}, + {202, "futex"}, + {203, "sched_setaffinity"}, + {204, "sched_getaffinity"}, + {205, "set_thread_area"}, + {206, "io_setup"}, + {207, "io_destroy"}, + {208, "io_getevents"}, + {209, "io_submit"}, + {210, "io_cancel"}, + {211, "get_thread_area"}, + {212, "lookup_dcookie"}, + {213, "epoll_create"}, + {214, "epoll_ctl_old"}, + {215, "epoll_wait_old"}, + {216, "remap_file_pages"}, + {217, "getdents64"}, + {218, "set_tid_address"}, + {219, "restart_syscall"}, + {220, "semtimedop"}, + {221, "fadvise64"}, + {222, "timer_create"}, + {223, "timer_settime"}, + {224, "timer_gettime"}, + {225, "timer_getoverrun"}, + {226, "timer_delete"}, + {227, "clock_settime"}, + {228, "clock_gettime"}, + {229, "clock_getres"}, + {230, "clock_nanosleep"}, + {231, "exit_group"}, + {232, "epoll_wait"}, + {233, "epoll_ctl"}, + {234, "tgkill"}, + {235, "utimes"}, + {236, "vserver"}, + {237, "mbind"}, + {238, "set_mempolicy"}, + {239, "get_mempolicy"}, + {240, "mq_open"}, + {241, "mq_unlink"}, + {242, "mq_timedsend"}, + {243, "mq_timedreceive"}, + {244, "mq_notify"}, + {245, "mq_getsetattr"}, + {246, "kexec_load"}, + {247, "waitid"}, + {248, "add_key"}, + {249, "request_key"}, + {250, "keyctl"}, + {251, "ioprio_set"}, + {252, "ioprio_get"}, + {253, "inotify_init"}, + {254, "inotify_add_watch"}, + {255, "inotify_rm_watch"}, + {256, "migrate_pages"}, + {257, "openat"}, + {258, "mkdirat"}, + {259, "mknodat"}, + {260, "fchownat"}, + {261, "futimesat"}, + {262, "newfstatat"}, + {263, "unlinkat"}, + {264, "renameat"}, + {265, "linkat"}, + {266, "symlinkat"}, + {267, "readlinkat"}, + {268, "fchmodat"}, + {269, "faccessat"}, + {270, "pselect6"}, + {271, "ppoll"}, + {272, "unshare"}, + {273, "set_robust_list"}, + {274, "get_robust_list"}, + {275, "splice"}, + {276, "tee"}, + {277, "sync_file_range"}, + {278, "vmsplice"}, + {279, "move_pages"}, + {280, "utimensat"}, + {281, "epoll_pwait"}, + {282, "signalfd"}, + {283, "timerfd_create"}, + {284, "eventfd"}, + {285, "fallocate"}, + {286, "timerfd_settime"}, + {287, "timerfd_gettime"}, + {288, "accept4"}, + {289, "signalfd4"}, + {290, "eventfd2"}, + {291, "epoll_create1"}, + {292, "dup3"}, + {293, "pipe2"}, + {294, "inotify_init1"}, + {295, "preadv"}, + {296, "pwritev"}, + {297, "rt_tgsigqueueinfo"}, + {298, "perf_event_open"}, + {299, "recvmmsg"}, + {300, "fanotify_init"}, + {301, "fanotify_mark"}, + {302, "prlimit64"}, + {303, "name_to_handle_at"}, + {304, "open_by_handle_at"}, + {305, "clock_adjtime"}, + {306, "syncfs"}, + {307, "sendmmsg"}, + {308, "setns"}, + {309, "getcpu"}, + {310, "process_vm_readv"}, + {311, "process_vm_writev"}, + {312, "kcmp"}, + {313, "finit_module"}, + {314, "sched_setattr"}, + {315, "sched_getattr"}, + {316, "renameat2"}, + {317, "seccomp"}, + {318, "getrandom"}, + {319, "memfd_create"}, + {320, "kexec_file_load"}, + {321, "bpf"}, + {322, "execveat"}, + {323, "userfaultfd"}, + {324, "membarrier"}, + {325, "mlock2"}, + + {326, "copy_file_range"}, + {327, "preadv2"}, + {328, "pwritev2"}, + {329, "pkey_mprotect"}, + {330, "pkey_alloc"}, + {331, "pkey_free"}, + {332, "statx"}, + {333, "io_pgetevents"}, + {334, "rseq"}, + {424, "pidfd_send_signal"}, + {425, "io_uring_setup"}, + {426, "io_uring_enter"}, + {427, "io_uring_register"}, + {428, "open_tree"}, + {429, "move_mount"}, + {430, "fsopen"}, + {431, "fsconfig"}, + {432, "fsmount"}, + {433, "fspick"}, + {434, "pidfd_open"}, + {435, "clone3"}, + {436, "close_range"}, + {437, "openat2"}, + {438, "pidfd_getfd"}, + {439, "faccessat2"}, + {440, "process_madvise"}, + {441, "epoll_pwait2"}, + {442, "mount_setattr"}, + {443, "quotactl_fd"}, + {444, "landlock_create_ruleset"}, + {445, "landlock_add_rule"}, + {446, "landlock_restrict_self"}, + {447, "memfd_secret"}, + {448, "process_mrelease"}, + {449, "futex_waitv"}, + {450, "set_mempolicy_home_node"}, + {451, "syscalls"}, + + {1023, "-sched-"}, // Fake last syscall. Indicates where __schedule runs + {-1, NULL}, // Must be last +}; + +// Based on arch/x86/include/asm/x86/irq_vectors.h +// 2017: arch/x86/include/asm/irq_vectors.h +// 2019: arch/x86/include/asm/irq_vectors.h +/* + * Vectors 0 ... 31 : system traps and exceptions - hardcoded events + * Vectors 32 ... 127 : device interrupts + * Vector 128 : legacy int80 syscall interface + * Vectors 129 ... INVALIDATE_TLB_VECTOR_START-1 except 204 : device interrupts + * Vectors INVALIDATE_TLB_VECTOR_START ... 255 : special interrupts + */ + +/*** +~/linux-6.1.12$ cat /proc/interrupts + CPU0 CPU1 CPU2 CPU3 + 0: 11 0 0 0 IR-IO-APIC 2-edge timer + 8: 0 0 0 0 IR-IO-APIC 8-edge rtc0 + 9: 0 0 0 0 IR-IO-APIC 9-fasteoi acpi + 120: 0 0 0 0 DMAR-MSI 0-edge dmar0 + 121: 0 0 0 0 DMAR-MSI 1-edge dmar1 + 125: 0 12 0 0 IR-PCI-MSI 524288-edge nvme0q0 + 126: 0 0 86 0 IR-PCI-MSI 327680-edge xhci_hcd + 127: 97 0 0 0 IR-PCI-MSI 524289-edge nvme0q1 + 128: 0 25 0 0 IR-PCI-MSI 524290-edge nvme0q2 + 129: 0 0 89 0 IR-PCI-MSI 524291-edge nvme0q3 + 130: 0 0 0 19 IR-PCI-MSI 524292-edge nvme0q4 + 131: 0 47097 7148 0 IR-PCI-MSI 376832-edge ahci[0000:00:17.0] + 132: 78 0 0 262704 IR-PCI-MSI 1048576-edge enp2s0 + 133: 0 0 0 463 IR-PCI-MSI 514048-edge snd_hda_intel:card0 + NMI: 1 1 1 1 Non-maskable interrupts + LOC: 380691 378255 378221 380382 Local timer interrupts + SPU: 0 0 0 0 Spurious interrupts + PMI: 1 1 1 1 Performance monitoring interrupts + IWI: 0 0 0 0 IRQ work interrupts + RTR: 0 0 0 0 APIC ICR read retries + RES: 468 430 517 461 Rescheduling interrupts + CAL: 5460 5010 4892 5592 Function call interrupts + TLB: 2102 2009 1803 1715 TLB shootdowns + TRM: 0 0 0 0 Thermal event interrupts + THR: 0 0 0 0 Threshold APIC interrupts + DFR: 0 0 0 0 Deferred Error APIC interrupts + MCE: 0 0 0 0 Machine check exceptions + MCP: 5 6 6 6 Machine check polls + ERR: 0 + MIS: 0 + PIN: 0 0 0 0 Posted-interrupt notification event + NPI: 0 0 0 0 Nested posted-interrupt event + PIW: 0 0 0 0 Posted-interrupt wakeup event +***/ + +static const NumNamePair IrqNames[] = { + // 2017 machines + {0, "timer"}, // timer + {1, "i8042_keyboard1"}, // keyboard/touchpad/mouse + {3, "int3"}, // int3 + {8, "rtc0"}, // real-time clock chip + {9, "acpi"}, + {12, "i8042_keyboard12"}, // keyboard/touchpad/mouse + {16, "usb1"}, + {23, "usb2"}, + {24, "i915_graphics"}, // usb + {28, "enp2s0_eth0"}, // aka eth0 + {29, "hda_29_inner"}, // disk + {30, "hda_30_inner"}, // disk + {31, "mei_me"}, // Management Engine Interface + //{29, "snd_hda_29"}, // audio ?? maybe 32/33 now + //{30, "snd_hda_30"}, // audio ?? + {36, "hda_36"}, + + // 2017 for our particular machines dclab-1,2,3,4 + {0x22, "eth0"}, // eth0 + {0x42, "hda_29"}, // disk, forwarded to 29 + {0x52, "hda_30"}, // disk, forwarded to 30 + {0x62, "hda_31"}, // disk + {0xb1, "graphics"}, // ether?, forwards to 24, no return + + // 2018 for our particular machines dclab-1,2,3 + {0xb2, "eth0"}, // ethernet + + + {128, "int80"}, + + {129, "eth0"}, + +// 2019.03.05 Linux 4.19 Ryzen */ + //{0x21, "??"}, // 1/sec + {0x23, "eth0"}, // 18/sec + //{0x24, "??"}, // 129 as 64+64 5 sec + {0x25, "eth0"}, // aka eth0 + {0x27, "sdb2"}, // aka disk + + // {255, "spurious_apic"}, + {255, "BH"}, // bottom half of an interrupt handler + {254, "error_apic_ipi"}, + {253, "reschedule_ipi"}, + {252, "call_func_ipi"}, + {251, "call_func1_ipi"}, + {250, "thermal_apic_ipi"}, + {249, "threshold_apic_ipi"}, + {248, "reboot_ipi"}, + {247, "x86_platform_ipi"}, + {246, "irq_work_ipi"}, + {245, "uv_bau_message"}, + {244, "deferred_error"}, + {243, "hypervisor_callback"}, + {242, "posted_intr"}, + {241, "posted_intr_wakeup"}, + {240, "posted_intr_nested"}, + {239, "managed_irq_shutdown"}, + {238, "hyperv_reenlighten"}, + {237, "hyperv_stimer0"}, + {236, "local_timer_vector"}, // event 0x05ec, decimal 1516 4.19 x86 + + {13, "fpu_irq"}, + + {-1, NULL}, // Must be last +}; + +// Export this to raw2event.cc, using above value +static const int kTIMER_IRQ_EVENT = 0x05ec; + +// Bottom half BH vectors, from include/linux/interrupt.h +static const NumNamePair SoftIrqNames[] = { + {0, "HI_SOFTIRQ"}, + {1, "TIMER_SOFTIRQ"}, + {2, "NET_TX_SOFTIRQ"}, + {3, "NET_RX_SOFTIRQ"}, + {4, "BLOCK_SOFTIRQ"}, + {5, "IRQ_POLL_SOFTIRQ"}, + {6, "TASKLET_SOFTIRQ"}, + {7, "SCHED_SOFTIRQ"}, + {8, "HRTIMER_SOFTIRQ"}, + {9, "RCU_SOFTIRQ"}, + + {-1, NULL}, // Must be last +}; + +static const NumNamePair TrapNames[] = { + {0, "Divide-by-zero"}, + {1, "Debug"}, + {2, "Non-maskable_Interrupt"}, + {3, "Breakpoint"}, + {4, "Overflow"}, + {5, "Bound_Range_Exceeded"}, + {6, "Invalid_Opcode"}, + {7, "device_not_available"}, + {8, "Double_Fault"}, + {9, "Coprocessor_Segment_Overrun"}, + {10, "Invalid_TSS"}, + {11, "Segment_Not_Present"}, + {12, "Stack_Segment_Fault"}, + {13, "General_Protection_Fault"}, + {14, "page_fault"}, + {15, "Spurious_Interrupt"}, + {16, "x87_Floating-Point_Exception"}, + {17, "Alignment_Check"}, + {18, "Machine_Check"}, + {19, "SIMD_Floating-Point_Exception"}, + {32, "IRET_Exception"}, + + {-1, NULL}, // Must be last +}; + +// This is just the base set. More could be added later +// see linux-4.19.19/tools/include/uapi/asm-generic/errno-base.h +// linux-4.19.19/include/linux/errno.h +// linux-4.19.19/include/uapi/linux/errno.h +// linux-4.19.19/include/uapi/asm-generic/errno.h + +static const NumNamePair ErrnoNames[] = { + {1, "EPERM"}, + {2, "ENOENT"}, + {3, "ESRCH"}, + {4, "EINTR"}, + {5, "EIO"}, + {6, "ENXIO"}, + {7, "E2BIG"}, + {8, "ENOEXEC"}, + {9, "EBADF"}, + {10, "ECHILD"}, + {11, "EAGAIN"}, + {12, "ENOMEM"}, + {13, "EACCES"}, + {14, "EFAULT"}, + {15, "ENOTBLK"}, + {16, "EBUSY"}, + {17, "EEXIST"}, + {18, "EXDEV"}, + {19, "ENODEV"}, + {20, "ENOTDIR"}, + {21, "EISDIR"}, + {22, "EINVAL"}, + {23, "ENFILE"}, + {24, "EMFILE"}, + {25, "ENOTTY"}, + {26, "ETXTBSY"}, + {27, "EFBIG"}, + {28, "ENOSPC"}, + {29, "ESPIPE"}, + {30, "EROFS"}, + {31, "EMLINK"}, + {32, "EPIPE"}, + {33, "EDOM"}, + {34, "ERANGE"}, + + {-1, NULL}, // Must be last + +}; +#endif // __KUTRACE_CONTROL_NAMES_I3_H__ + + diff --git a/postproc/kutrace_control_names_rpi4.h b/postproc/kutrace_control_names_rpi4.h new file mode 100644 index 000000000000..dc72978fbdcc --- /dev/null +++ b/postproc/kutrace_control_names_rpi4.h @@ -0,0 +1,492 @@ +// Names for syscall, etc. in KUtrace +// dick sites 2021.10.08 +// These are from linux-5.10.46 x86 RPi4 64-bit. Others will vary. +// + +#ifndef __KUTRACE_CONTROL_NAMES_RPI4_H__ +#define __KUTRACE_CONTROL_NAMES_RPI4_H__ + +#include "kutrace_lib.h" + +static const NumNamePair PidNames[] = { + {0, "-idle-"}, + {-1, NULL}, // Must be last +}; + +static const NumNamePair Syscall32Names[] = { + {511, "-sched-"}, // Fake last syscall. Indicates where __schedule runs + {-1, NULL}, // Must be last +}; + +static const NumNamePair Syscall64Names[] = { +// Rpi4 names from include/uapi/asm-generic/unistd.h +// via grep NR | sed 's/^.*NR[^_]*_\([^ ]*\) *\([0-9]*\).*$/ {\2, "\1"},/' +// Since these are just name labels, we don't bother with the NR3264 stuff + + {0, "io_setup"}, + {1, "io_destroy"}, + {2, "io_submit"}, + {3, "io_cancel"}, + {4, "io_getevents"}, + {5, "setxattr"}, + {6, "lsetxattr"}, + {7, "fsetxattr"}, + {8, "getxattr"}, + {9, "lgetxattr"}, + {10, "fgetxattr"}, + {11, "listxattr"}, + {12, "llistxattr"}, + {13, "flistxattr"}, + {14, "removexattr"}, + {15, "lremovexattr"}, + {16, "fremovexattr"}, + {17, "getcwd"}, + {18, "lookup_dcookie"}, + {19, "eventfd2"}, + {20, "epoll_create1"}, + {21, "epoll_ctl"}, + {22, "epoll_pwait"}, + {23, "dup"}, + {24, "dup3"}, + {25, "fcntl"}, + {26, "inotify_init1"}, + {27, "inotify_add_watch"}, + {28, "inotify_rm_watch"}, + {29, "ioctl"}, + {30, "ioprio_set"}, + {31, "ioprio_get"}, + {32, "flock"}, + {33, "mknodat"}, + {34, "mkdirat"}, + {35, "unlinkat"}, + {36, "symlinkat"}, + {37, "linkat"}, + {38, "renameat"}, + {39, "umount2"}, + {40, "mount"}, + {41, "pivot_root"}, + {42, "nfsservctl"}, + {43, "statfs"}, + {44, "fstatfs"}, + {45, "truncate"}, + {46, "ftruncate"}, + {47, "fallocate"}, + {48, "faccessat"}, + {49, "chdir"}, + {50, "fchdir"}, + {51, "chroot"}, + {52, "fchmod"}, + {53, "fchmodat"}, + {54, "fchownat"}, + {55, "fchown"}, + {56, "openat"}, + {57, "close"}, + {58, "vhangup"}, + {59, "pipe2"}, + {60, "quotactl"}, + {61, "getdents64"}, + {62, "lseek"}, + {63, "read"}, + {64, "write"}, + {65, "readv"}, + {66, "writev"}, + {67, "pread64"}, + {68, "pwrite64"}, + {69, "preadv"}, + {70, "pwritev"}, + {71, "sendfile"}, + {72, "pselect6"}, + {73, "ppoll"}, + {74, "signalfd4"}, + {75, "vmsplice"}, + {76, "splice"}, + {77, "tee"}, + {78, "readlinkat"}, + {79, "fstatat"}, + {80, "fstat"}, + {81, "sync"}, + {82, "fsync"}, + {83, "fdatasync"}, + {84, "sync_file_range2"}, + {84, "sync_file_range"}, + {85, "timerfd_create"}, + {86, "timerfd_settime"}, + {87, "timerfd_gettime"}, + {88, "utimensat"}, + {89, "acct"}, + {90, "capget"}, + {91, "capset"}, + {92, "personality"}, + {93, "exit"}, + {94, "exit_group"}, + {95, "waitid"}, + {96, "set_tid_address"}, + {97, "unshare"}, + {98, "futex"}, + {99, "set_robust_list"}, + {100, "get_robust_list"}, + {101, "nanosleep"}, + {102, "getitimer"}, + {103, "setitimer"}, + {104, "kexec_load"}, + {105, "init_module"}, + {106, "delete_module"}, + {107, "timer_create"}, + {108, "timer_gettime"}, + {109, "timer_getoverrun"}, + {110, "timer_settime"}, + {111, "timer_delete"}, + {112, "clock_settime"}, + {113, "clock_gettime"}, + {114, "clock_getres"}, + {115, "clock_nanosleep"}, + {116, "syslog"}, + {117, "ptrace"}, + {118, "sched_setparam"}, + {119, "sched_setscheduler"}, + {120, "sched_getscheduler"}, + {121, "sched_getparam"}, + {122, "sched_setaffinity"}, + {123, "sched_getaffinity"}, + {124, "sched_yield"}, + {125, "sched_get_priority_max"}, + {126, "sched_get_priority_min"}, + {127, "sched_rr_get_interval"}, + {128, "restart_syscall"}, + {129, "kill"}, + {130, "tkill"}, + {131, "tgkill"}, + {132, "sigaltstack"}, + {133, "rt_sigsuspend"}, + {134, "rt_sigaction"}, + {135, "rt_sigprocmask"}, + {136, "rt_sigpending"}, + {137, "rt_sigtimedwait"}, + {138, "rt_sigqueueinfo"}, + {139, "rt_sigreturn"}, + {140, "setpriority"}, + {141, "getpriority"}, + {142, "reboot"}, + {143, "setregid"}, + {144, "setgid"}, + {145, "setreuid"}, + {146, "setuid"}, + {147, "setresuid"}, + {148, "getresuid"}, + {149, "setresgid"}, + {150, "getresgid"}, + {151, "setfsuid"}, + {152, "setfsgid"}, + {153, "times"}, + {154, "setpgid"}, + {155, "getpgid"}, + {156, "getsid"}, + {157, "setsid"}, + {158, "getgroups"}, + {159, "setgroups"}, + {160, "uname"}, + {161, "sethostname"}, + {162, "setdomainname"}, + {163, "getrlimit"}, + {164, "setrlimit"}, + {165, "getrusage"}, + {166, "umask"}, + {167, "prctl"}, + {168, "getcpu"}, + {169, "gettimeofday"}, + {170, "settimeofday"}, + {171, "adjtimex"}, + {172, "getpid"}, + {173, "getppid"}, + {174, "getuid"}, + {175, "geteuid"}, + {176, "getgid"}, + {177, "getegid"}, + {178, "gettid"}, + {179, "sysinfo"}, + {180, "mq_open"}, + {181, "mq_unlink"}, + {182, "mq_timedsend"}, + {183, "mq_timedreceive"}, + {184, "mq_notify"}, + {185, "mq_getsetattr"}, + {186, "msgget"}, + {187, "msgctl"}, + {188, "msgrcv"}, + {189, "msgsnd"}, + {190, "semget"}, + {191, "semctl"}, + {192, "semtimedop"}, + {193, "semop"}, + {194, "shmget"}, + {195, "shmctl"}, + {196, "shmat"}, + {197, "shmdt"}, + {198, "socket"}, + {199, "socketpair"}, + {200, "bind"}, + {201, "listen"}, + {202, "accept"}, + {203, "connect"}, + {204, "getsockname"}, + {205, "getpeername"}, + {206, "sendto"}, + {207, "recvfrom"}, + {208, "setsockopt"}, + {209, "getsockopt"}, + {210, "shutdown"}, + {211, "sendmsg"}, + {212, "recvmsg"}, + {213, "readahead"}, + {214, "brk"}, + {215, "munmap"}, + {216, "mremap"}, + {217, "add_key"}, + {218, "request_key"}, + {219, "keyctl"}, + {220, "clone"}, + {221, "execve"}, + {222, "mmap"}, + {223, "fadvise64"}, + {224, "swapon"}, + {225, "swapoff"}, + {226, "mprotect"}, + {227, "msync"}, + {228, "mlock"}, + {229, "munlock"}, + {230, "mlockall"}, + {231, "munlockall"}, + {232, "mincore"}, + {233, "madvise"}, + {234, "remap_file_pages"}, + {235, "mbind"}, + {236, "get_mempolicy"}, + {237, "set_mempolicy"}, + {238, "migrate_pages"}, + {239, "move_pages"}, + {240, "rt_tgsigqueueinfo"}, + {241, "perf_event_open"}, + {242, "accept4"}, + {243, "recvmmsg"}, + {244, "arch_specific_syscall"}, + {260, "wait4"}, + {261, "prlimit64"}, + {262, "fanotify_init"}, + {263, "fanotify_mark"}, + {264, "name_to_handle_at"}, + {265, "open_by_handle_at"}, + {266, "clock_adjtime"}, + {267, "syncfs"}, + {268, "setns"}, + {269, "sendmmsg"}, + {270, "process_vm_readv"}, + {271, "process_vm_writev"}, + {272, "kcmp"}, + {273, "finit_module"}, + {274, "sched_setattr"}, + {275, "sched_getattr"}, + {276, "renameat2"}, + {277, "seccomp"}, + {278, "getrandom"}, + {279, "memfd_create"}, + {280, "bpf"}, + {281, "execveat"}, + {282, "userfaultfd"}, + {283, "membarrier"}, + {284, "mlock2"}, + {285, "copy_file_range"}, + {286, "preadv2"}, + {287, "pwritev2"}, + {288, "pkey_mprotect"}, + {289, "pkey_alloc"}, + {290, "pkey_free"}, + {291, "statx"}, + {292, "io_pgetevents"}, + {293, "rseq"}, + {294, "kexec_file_load"}, + {403, "clock_gettime64"}, + {404, "clock_settime64"}, + {405, "clock_adjtime64"}, + {406, "clock_getres_time64"}, + {407, "clock_nanosleep_time64"}, + {408, "timer_gettime64"}, + {409, "timer_settime64"}, + {410, "timerfd_gettime64"}, + {411, "timerfd_settime64"}, + {412, "utimensat_time64"}, + {413, "pselect6_time64"}, + {414, "ppoll_time64"}, + {416, "io_pgetevents_time64"}, + {417, "recvmmsg_time64"}, + {418, "mq_timedsend_time64"}, + {419, "mq_timedreceive_time64"}, + {420, "semtimedop_time64"}, + {421, "rt_sigtimedwait_time64"}, + {422, "futex_time64"}, + {423, "sched_rr_get_interval_time64"}, + {424, "pidfd_send_signal"}, + {425, "io_uring_setup"}, + {426, "io_uring_enter"}, + {427, "io_uring_register"}, + {428, "open_tree"}, + {429, "move_mount"}, + {430, "fsopen"}, + {431, "fsconfig"}, + {432, "fsmount"}, + {433, "fspick"}, + {434, "pidfd_open"}, + {435, "clone3"}, + {436, "close_range"}, + {437, "openat2"}, + {438, "pidfd_getfd"}, + {439, "faccessat2"}, + {440, "process_madvise"}, + + {511, "-sched-"}, // Fake last syscall. Indicates where __schedule runs + {-1, NULL}, // Must be last +}; + +// From cat /proc/interrupts on RPi-4B 64-bit +static const NumNamePair IrqNames[] = { + {2, "resched_ipi"}, + {9, "vgic"}, + {11, "arch_timer"}, + {12, "kvm_guest_vtimer"}, + {18, "gpu_mbox"}, /* fe00b880.mailbox */ + {21, "uart-pl011"}, + {24, "dma_irq"}, + {31, "vchiq_doorbell"}, + {32, "eth0"}, /* mmc0_mmc1 */ + {33, "vc4_firmware_kms"}, + {34, "arm-pmu"}, + {35, "arm-pmu"}, + {36, "arm-pmu"}, + {37, "arm-pmu"}, + {38, "ssd"}, + {39, "eth0?"}, + {40, "eth00?"}, + {46, "v3d"}, + {48, "xhci_hcd"}, + +// Raspberry Pi list plus some x86 + +// {255, "spurious_apic"}, + {255, "BH"}, /* bottom half of an interrupt handler */ + {254, "unused_ipi"}, + {253, "unused_ipi"}, + {252, "wakeup_ipi"}, + {251, "irq_work_ipi"}, + {250, "timer_ipi"}, + {249, "cpu_crash_stop_ipi"}, + {248, "cpu_stop_ipi"}, + {247, "call_func_ipi"}, + {246, "reschedule_ipi"}, + + {245, "uv_bau_message"}, /* from x86 */ + + {244, "deferred_error"}, + {243, "hypervisor_callback"}, + {242, "posted_intr"}, + {241, "posted_intr_wakeup"}, + {240, "posted_intr_nested"}, + {239, "managed_irq_shutdown"}, + {238, "hyperv_reenlighten"}, + {237, "hyperv_stimer0"}, + {236, "local_timer_vector"}, // event 0x05ec, decimal 1516 4.19 x86 + + {-1, NULL}, // Must be last +}; + +// Export this to raw2event.cc, using above value +static const int kTIMER_IRQ_EVENT = 0x05ec; + +// Bottom half BH vectors, from include/linux/interrupt.h +static const NumNamePair SoftIrqNames[] = { + {0, "HI_SOFTIRQ"}, + {1, "TIMER_SOFTIRQ"}, + {2, "NET_TX_SOFTIRQ"}, + {3, "NET_RX_SOFTIRQ"}, + {4, "BLOCK_SOFTIRQ"}, + {5, "IRQ_POLL_SOFTIRQ"}, + {6, "TASKLET_SOFTIRQ"}, + {7, "SCHED_SOFTIRQ"}, + {8, "HRTIMER_SOFTIRQ"}, + {9, "RCU_SOFTIRQ"}, + + {-1, NULL}, // Must be last +}; + +static const NumNamePair TrapNames[] = { + {0, "Divide-by-zero"}, + {1, "Debug"}, + {2, "Non-maskable_Interrupt"}, + {3, "Breakpoint"}, + {4, "Overflow"}, + {5, "Bound_Range_Exceeded"}, + {6, "Invalid_Opcode"}, + {7, "device_not_available"}, + {8, "Double_Fault"}, + {9, "Coprocessor_Segment_Overrun"}, + {10, "Invalid_TSS"}, + {11, "Segment_Not_Present"}, + {12, "Stack_Segment_Fault"}, + {13, "General_Protection_Fault"}, + {14, "page_fault"}, + {15, "Spurious_Interrupt"}, + {16, "x87_Floating-Point_Exception"}, + {17, "Alignment_Check"}, + {18, "Machine_Check"}, + {19, "SIMD_Floating-Point_Exception"}, + {32, "IRET_Exception"}, + + {-1, NULL}, // Must be last +}; + +// This is just the base set. More could be added later +// see linux-4.19.19/tools/include/uapi/asm-generic/errno-base.h +// linux-4.19.19/include/linux/errno.h +// linux-4.19.19/include/uapi/linux/errno.h +// linux-4.19.19/include/uapi/asm-generic/errno.h + +static const NumNamePair ErrnoNames[] = { + {1, "EPERM"}, + {2, "ENOENT"}, + {3, "ESRCH"}, + {4, "EINTR"}, + {5, "EIO"}, + {6, "ENXIO"}, + {7, "E2BIG"}, + {8, "ENOEXEC"}, + {9, "EBADF"}, + {10, "ECHILD"}, + {11, "EAGAIN"}, + {12, "ENOMEM"}, + {13, "EACCES"}, + {14, "EFAULT"}, + {15, "ENOTBLK"}, + {16, "EBUSY"}, + {17, "EEXIST"}, + {18, "EXDEV"}, + {19, "ENODEV"}, + {20, "ENOTDIR"}, + {21, "EISDIR"}, + {22, "EINVAL"}, + {23, "ENFILE"}, + {24, "EMFILE"}, + {25, "ENOTTY"}, + {26, "ETXTBSY"}, + {27, "EFBIG"}, + {28, "ENOSPC"}, + {29, "ESPIPE"}, + {30, "EROFS"}, + {31, "EMLINK"}, + {32, "EPIPE"}, + {33, "EDOM"}, + {34, "ERANGE"}, + + {-1, NULL}, // Must be last + +}; +#endif // __KUTRACE_CONTROL_NAMES_RPI4_H__ + + diff --git a/postproc/kutrace_control_names_ryzen.h b/postproc/kutrace_control_names_ryzen.h new file mode 100644 index 000000000000..cb9a12307c82 --- /dev/null +++ b/postproc/kutrace_control_names_ryzen.h @@ -0,0 +1,528 @@ +// Names for syscall, etc. in dclab_tracing +// dick sites 2019.03.13 +// These are from linux-4.19.19 x86 AMD 64-bit. Others will vary. +// + +#ifndef __KUTRACE_CONTROL_NAMES_RYZEN_H__ +#define __KUTRACE_CONTROL_NAMES_RYZEN_H__ + +#include "kutrace_lib.h" + +static const char* CpuFamilyModelManuf = "23 17 AMD"; + +static const NumNamePair PidNames[] = { + {0, "-idle-"}, + {-1, NULL}, // Must be last +}; + +static const NumNamePair Syscall32Names[] = { + {511, "-sched-"}, // Fake last syscall. Indicates where __schedule runs + {-1, NULL}, // Must be last +}; + +static const NumNamePair Syscall64Names[] = { + {0, "read"}, + {1, "write"}, + {2, "open"}, + {3, "close"}, + {4, "stat"}, + {5, "fstat"}, + {6, "lstat"}, + {7, "poll"}, + {8, "lseek"}, + {9, "mmap"}, + {10, "mprotect"}, + {11, "munmap"}, + {12, "brk"}, + {13, "rt_sigaction"}, + {14, "rt_sigprocmask"}, + {15, "rt_sigreturn"}, + {16, "ioctl"}, + {17, "pread64"}, + {18, "pwrite64"}, + {19, "readv"}, + {20, "writev"}, + {21, "access"}, + {22, "pipe"}, + {23, "select"}, + {24, "sched_yield"}, + {25, "mremap"}, + {26, "msync"}, + {27, "mincore"}, + {28, "madvise"}, + {29, "shmget"}, + {30, "shmat"}, + {31, "shmctl"}, + {32, "dup"}, + {33, "dup2"}, + {34, "pause"}, + {35, "nanosleep"}, + {36, "getitimer"}, + {37, "alarm"}, + {38, "setitimer"}, + {39, "getpid"}, + {40, "sendfile"}, + {41, "socket"}, + {42, "connect"}, + {43, "accept"}, + {44, "sendto"}, + {45, "recvfrom"}, + {46, "sendmsg"}, + {47, "recvmsg"}, + {48, "shutdown"}, + {49, "bind"}, + {50, "listen"}, + {51, "getsockname"}, + {52, "getpeername"}, + {53, "socketpair"}, + {54, "setsockopt"}, + {55, "getsockopt"}, + {56, "clone"}, + {57, "fork"}, + {58, "vfork"}, + {59, "execve"}, + {60, "exit"}, + {61, "wait4"}, + {62, "kill"}, + {63, "uname"}, + {64, "semget"}, + {65, "semop"}, + {66, "semctl"}, + {67, "shmdt"}, + {68, "msgget"}, + {69, "msgsnd"}, + {70, "msgrcv"}, + {71, "msgctl"}, + {72, "fcntl"}, + {73, "flock"}, + {74, "fsync"}, + {75, "fdatasync"}, + {76, "truncate"}, + {77, "ftruncate"}, + {78, "getdents"}, + {79, "getcwd"}, + {80, "chdir"}, + {81, "fchdir"}, + {82, "rename"}, + {83, "mkdir"}, + {84, "rmdir"}, + {85, "creat"}, + {86, "link"}, + {87, "unlink"}, + {88, "symlink"}, + {89, "readlink"}, + {90, "chmod"}, + {91, "fchmod"}, + {92, "chown"}, + {93, "fchown"}, + {94, "lchown"}, + {95, "umask"}, + {96, "gettimeofday"}, + {97, "getrlimit"}, + {98, "getrusage"}, + {99, "sysinfo"}, + {100, "times"}, + {101, "ptrace"}, + {102, "getuid"}, + {103, "syslog"}, + {104, "getgid"}, + {105, "setuid"}, + {106, "setgid"}, + {107, "geteuid"}, + {108, "getegid"}, + {109, "setpgid"}, + {110, "getppid"}, + {111, "getpgrp"}, + {112, "setsid"}, + {113, "setreuid"}, + {114, "setregid"}, + {115, "getgroups"}, + {116, "setgroups"}, + {117, "setresuid"}, + {118, "getresuid"}, + {119, "setresgid"}, + {120, "getresgid"}, + {121, "getpgid"}, + {122, "setfsuid"}, + {123, "setfsgid"}, + {124, "getsid"}, + {125, "capget"}, + {126, "capset"}, + {127, "rt_sigpending"}, + {128, "rt_sigtimedwait"}, + {129, "rt_sigqueueinfo"}, + {130, "rt_sigsuspend"}, + {131, "sigaltstack"}, + {132, "utime"}, + {133, "mknod"}, + {134, "uselib"}, + {135, "personality"}, + {136, "ustat"}, + {137, "statfs"}, + {138, "fstatfs"}, + {139, "sysfs"}, + {140, "getpriority"}, + {141, "setpriority"}, + {142, "sched_setparam"}, + {143, "sched_getparam"}, + {144, "sched_setscheduler"}, + {145, "sched_getscheduler"}, + {146, "sched_get_priority_max"}, + {147, "sched_get_priority_min"}, + {148, "sched_rr_get_interval"}, + {149, "mlock"}, + {150, "munlock"}, + {151, "mlockall"}, + {152, "munlockall"}, + {153, "vhangup"}, + {154, "modify_ldt"}, + {155, "pivot_root"}, + {156, "_sysctl"}, + {157, "prctl"}, + {158, "arch_prctl"}, + {159, "adjtimex"}, + {160, "setrlimit"}, + {161, "chroot"}, + {162, "sync"}, + {163, "acct"}, + {164, "settimeofday"}, + {165, "mount"}, + {166, "umount2"}, + {167, "swapon"}, + {168, "swapoff"}, + {169, "reboot"}, + {170, "sethostname"}, + {171, "setdomainname"}, + {172, "iopl"}, + {173, "ioperm"}, + {174, "create_module"}, + {175, "init_module"}, + {176, "delete_module"}, + {177, "get_kernel_syms"}, + {178, "query_module"}, + {179, "quotactl"}, + {180, "nfsservctl"}, + {181, "getpmsg"}, + {182, "putpmsg"}, + {183, "afs_syscall"}, + {184, "tuxcall"}, + {185, "security"}, + {186, "gettid"}, + {187, "readahead"}, + {188, "setxattr"}, + {189, "lsetxattr"}, + {190, "fsetxattr"}, + {191, "getxattr"}, + {192, "lgetxattr"}, + {193, "fgetxattr"}, + {194, "listxattr"}, + {195, "llistxattr"}, + {196, "flistxattr"}, + {197, "removexattr"}, + {198, "lremovexattr"}, + {199, "fremovexattr"}, + {200, "tkill"}, + {201, "time"}, + {202, "futex"}, + {203, "sched_setaffinity"}, + {204, "sched_getaffinity"}, + {205, "set_thread_area"}, + {206, "io_setup"}, + {207, "io_destroy"}, + {208, "io_getevents"}, + {209, "io_submit"}, + {210, "io_cancel"}, + {211, "get_thread_area"}, + {212, "lookup_dcookie"}, + {213, "epoll_create"}, + {214, "epoll_ctl_old"}, + {215, "epoll_wait_old"}, + {216, "remap_file_pages"}, + {217, "getdents64"}, + {218, "set_tid_address"}, + {219, "restart_syscall"}, + {220, "semtimedop"}, + {221, "fadvise64"}, + {222, "timer_create"}, + {223, "timer_settime"}, + {224, "timer_gettime"}, + {225, "timer_getoverrun"}, + {226, "timer_delete"}, + {227, "clock_settime"}, + {228, "clock_gettime"}, + {229, "clock_getres"}, + {230, "clock_nanosleep"}, + {231, "exit_group"}, + {232, "epoll_wait"}, + {233, "epoll_ctl"}, + {234, "tgkill"}, + {235, "utimes"}, + {236, "vserver"}, + {237, "mbind"}, + {238, "set_mempolicy"}, + {239, "get_mempolicy"}, + {240, "mq_open"}, + {241, "mq_unlink"}, + {242, "mq_timedsend"}, + {243, "mq_timedreceive"}, + {244, "mq_notify"}, + {245, "mq_getsetattr"}, + {246, "kexec_load"}, + {247, "waitid"}, + {248, "add_key"}, + {249, "request_key"}, + {250, "keyctl"}, + {251, "ioprio_set"}, + {252, "ioprio_get"}, + {253, "inotify_init"}, + {254, "inotify_add_watch"}, + {255, "inotify_rm_watch"}, + {256, "migrate_pages"}, + {257, "openat"}, + {258, "mkdirat"}, + {259, "mknodat"}, + {260, "fchownat"}, + {261, "futimesat"}, + {262, "newfstatat"}, + {263, "unlinkat"}, + {264, "renameat"}, + {265, "linkat"}, + {266, "symlinkat"}, + {267, "readlinkat"}, + {268, "fchmodat"}, + {269, "faccessat"}, + {270, "pselect6"}, + {271, "ppoll"}, + {272, "unshare"}, + {273, "set_robust_list"}, + {274, "get_robust_list"}, + {275, "splice"}, + {276, "tee"}, + {277, "sync_file_range"}, + {278, "vmsplice"}, + {279, "move_pages"}, + {280, "utimensat"}, + {281, "epoll_pwait"}, + {282, "signalfd"}, + {283, "timerfd_create"}, + {284, "eventfd"}, + {285, "fallocate"}, + {286, "timerfd_settime"}, + {287, "timerfd_gettime"}, + {288, "accept4"}, + {289, "signalfd4"}, + {290, "eventfd2"}, + {291, "epoll_create1"}, + {292, "dup3"}, + {293, "pipe2"}, + {294, "inotify_init1"}, + {295, "preadv"}, + {296, "pwritev"}, + {297, "rt_tgsigqueueinfo"}, + {298, "perf_event_open"}, + {299, "recvmmsg"}, + {300, "fanotify_init"}, + {301, "fanotify_mark"}, + {302, "prlimit64"}, + {303, "name_to_handle_at"}, + {304, "open_by_handle_at"}, + {305, "clock_adjtime"}, + {306, "syncfs"}, + {307, "sendmmsg"}, + {308, "setns"}, + {309, "getcpu"}, + {310, "process_vm_readv"}, + {311, "process_vm_writev"}, + {312, "kcmp"}, + {313, "finit_module"}, + {314, "sched_setattr"}, + {315, "sched_getattr"}, + {316, "renameat2"}, + {317, "seccomp"}, + {318, "getrandom"}, + {319, "memfd_create"}, + {320, "kexec_file_load"}, + {321, "bpf"}, + {322, "execveat"}, + {323, "userfaultfd"}, + {324, "membarrier"}, + {325, "mlock2"}, + {511, "-sched-"}, // Fake last syscall. Indicates where __schedule runs + {-1, NULL}, // Must be last +}; + +// Based on arch/x86/include/asm/x86/irq_vectors.h +// 2017: arch/x86/include/asm/irq_vectors.h +// 2019: arch/x86/include/asm/irq_vectors.h +/* + * Vectors 0 ... 31 : system traps and exceptions - hardcoded events + * Vectors 32 ... 127 : device interrupts + * Vector 128 : legacy int80 syscall interface + * Vectors 129 ... INVALIDATE_TLB_VECTOR_START-1 except 204 : device interrupts + * Vectors INVALIDATE_TLB_VECTOR_START ... 255 : special interrupts + */ + +static const NumNamePair IrqNames[] = { + // 2017 machines + {0, "timer"}, // timer + {1, "i8042_keyboard1"}, // keyboard/touchpad/mouse + {8, "rtc0"}, // real-time clock chip + {9, "acpi"}, + {12, "i8042_keyboard12"}, // keyboard/touchpad/mouse + {16, "usb1"}, + {23, "usb2"}, + {24, "i915_graphics"}, // usb + {28, "enp2s0_eth0"}, // aka eth0 + {29, "hda_29_inner"}, // disk + {30, "hda_30_inner"}, // disk + {31, "mei_me"}, // Management Engine Interface + {38, "sdb"}, // disk + //{29, "snd_hda_29"}, // audio ?? maybe 32/33 now + //{30, "snd_hda_30"}, // audio ?? + + // 2017 for our particular machines dclab-1,2,3,4 + {0x22, "eth0"}, // eth0 + {0x42, "hda_29"}, // disk, forwarded to 29 + {0x52, "hda_30"}, // disk, forwarded to 30 + {0x62, "hda_31"}, // disk + {0xb1, "graphics"}, // ether?, forwards to 24, no return + + // 2018 for our particular machines dclab-1,2,3 + {0xb2, "eth0"}, // ethernet + + + {128, "int80"}, + +// 2019.03.05 Linux 4.19 Ryzen numbers seem to move around at reboot */ + //{0x21, "??"}, // 1/sec + {0x23, "eth0"}, // 18/sec + //{0x24, "??"}, // 129 as 64+64 5 sec + {0x25, "eth0?"}, // aka eth0 + {0x27, "sdb2"}, // aka disk + + // {255, "spurious_apic"}, + {255, "BH"}, // bottom half of an interrupt handler + {254, "error_apic_ipi"}, + {253, "reschedule_ipi"}, + {252, "call_func_ipi"}, + {251, "call_func1_ipi"}, + {250, "thermal_apic_ipi"}, + {249, "threshold_apic_ipi"}, + {248, "reboot_ipi"}, + {247, "x86_platform_ipi"}, + {246, "irq_work_ipi"}, + {245, "uv_bau_message"}, + {244, "deferred_error"}, + {243, "hypervisor_callback"}, + {242, "posted_intr"}, + {241, "posted_intr_wakeup"}, + {240, "posted_intr_nested"}, + {239, "managed_irq_shutdown"}, + {238, "hyperv_reenlighten"}, + {237, "hyperv_stimer0"}, + {236, "local_timer_vector"}, // event 0x05ec, decimal 1516 4.19 x86 + + {13, "fpu_irq"}, + + {-1, NULL}, // Must be last +}; + +// Export this to raw2event.cc, using above value +static const int kTIMER_IRQ_EVENT = 0x05ec; + +// Bottom half BH vectors, from include/linux/interrupt.h +static const NumNamePair SoftIrqNames[] = { + {0, "HI_SOFTIRQ"}, + {1, "TIMER_SOFTIRQ"}, + {2, "NET_TX_SOFTIRQ"}, + {3, "NET_RX_SOFTIRQ"}, + {4, "BLOCK_SOFTIRQ"}, + {5, "IRQ_POLL_SOFTIRQ"}, + {6, "TASKLET_SOFTIRQ"}, + {7, "SCHED_SOFTIRQ"}, + {8, "HRTIMER_SOFTIRQ"}, + {9, "RCU_SOFTIRQ"}, + + {-1, NULL}, // Must be last +}; + +static const NumNamePair TrapNames[] = { + {0, "Divide-by-zero"}, + {1, "Debug"}, + {2, "Non-maskable_Interrupt"}, + {3, "Breakpoint"}, + {4, "Overflow"}, + {5, "Bound_Range_Exceeded"}, + {6, "Invalid_Opcode"}, + {7, "device_not_available"}, + {8, "Double_Fault"}, + {9, "Coprocessor_Segment_Overrun"}, + {10, "Invalid_TSS"}, + {11, "Segment_Not_Present"}, + {12, "Stack_Segment_Fault"}, + {13, "General_Protection_Fault"}, + {14, "page_fault"}, + {15, "Spurious_Interrupt"}, + {16, "x87_Floating-Point_Exception"}, + {17, "Alignment_Check"}, + {18, "Machine_Check"}, + {19, "SIMD_Floating-Point_Exception"}, + {32, "IRET_Exception"}, + + {-1, NULL}, // Must be last +}; + +// This is just the base set. More could be added later +// see linux-4.19.19/tools/include/uapi/asm-generic/errno-base.h +// linux-4.19.19/include/linux/errno.h +// linux-4.19.19/include/uapi/linux/errno.h +// linux-4.19.19/include/uapi/asm-generic/errno.h + +static const NumNamePair ErrnoNames[] = { + {1, "EPERM"}, + {2, "ENOENT"}, + {3, "ESRCH"}, + {4, "EINTR"}, + {5, "EIO"}, + {6, "ENXIO"}, + {7, "E2BIG"}, + {8, "ENOEXEC"}, + {9, "EBADF"}, + {10, "ECHILD"}, + {11, "EAGAIN"}, + {12, "ENOMEM"}, + {13, "EACCES"}, + {14, "EFAULT"}, + {15, "ENOTBLK"}, + {16, "EBUSY"}, + {17, "EEXIST"}, + {18, "EXDEV"}, + {19, "ENODEV"}, + {20, "ENOTDIR"}, + {21, "EISDIR"}, + {22, "EINVAL"}, + {23, "ENFILE"}, + {24, "EMFILE"}, + {25, "ENOTTY"}, + {26, "ETXTBSY"}, + {27, "EFBIG"}, + {28, "ENOSPC"}, + {29, "ESPIPE"}, + {30, "EROFS"}, + {31, "EMLINK"}, + {32, "EPIPE"}, + {33, "EDOM"}, + {34, "ERANGE"}, + {35, "EDEADLK"}, + {36, "ENAMETOOLONG"}, + {37, "ENOLCK"}, + {38, "ENOSYS"}, + {39, "ENOTEMPTY"}, + {40, "ELOOP"}, + + {-1, NULL}, // Must be last + +}; +#endif // __KUTRACE_CONTROL_NAMES_RYZEN_H__ + + diff --git a/postproc/kutrace_control_names_x86.h b/postproc/kutrace_control_names_x86.h new file mode 100644 index 000000000000..581bd9f3a926 --- /dev/null +++ b/postproc/kutrace_control_names_x86.h @@ -0,0 +1,521 @@ +// Names for syscall, etc. in dclab_tracing +// dick sites 2019.03.13 +// These are from linux-4.19.19 x86 AMD 64-bit. Others will vary. +// + +#ifndef __KUTRACE_CONTROL_NAMES_H__ +#define __KUTRACE_CONTROL_NAMES_H__ + +#include "kutrace_lib.h" + +static const char* CpuFamilyModelManuf = "23 17 AMD"; + +static const NumNamePair PidNames[] = { + {0, "-idle-"}, + {-1, NULL}, // Must be last +}; + +static const NumNamePair Syscall32Names[] = { + {511, "-sched-"}, // Fake last syscall. Indicates where __schedule runs + {-1, NULL}, // Must be last +}; + +static const NumNamePair Syscall64Names[] = { + {0, "read"}, + {1, "write"}, + {2, "open"}, + {3, "close"}, + {4, "stat"}, + {5, "fstat"}, + {6, "lstat"}, + {7, "poll"}, + {8, "lseek"}, + {9, "mmap"}, + {10, "mprotect"}, + {11, "munmap"}, + {12, "brk"}, + {13, "rt_sigaction"}, + {14, "rt_sigprocmask"}, + {15, "rt_sigreturn"}, + {16, "ioctl"}, + {17, "pread64"}, + {18, "pwrite64"}, + {19, "readv"}, + {20, "writev"}, + {21, "access"}, + {22, "pipe"}, + {23, "select"}, + {24, "sched_yield"}, + {25, "mremap"}, + {26, "msync"}, + {27, "mincore"}, + {28, "madvise"}, + {29, "shmget"}, + {30, "shmat"}, + {31, "shmctl"}, + {32, "dup"}, + {33, "dup2"}, + {34, "pause"}, + {35, "nanosleep"}, + {36, "getitimer"}, + {37, "alarm"}, + {38, "setitimer"}, + {39, "getpid"}, + {40, "sendfile"}, + {41, "socket"}, + {42, "connect"}, + {43, "accept"}, + {44, "sendto"}, + {45, "recvfrom"}, + {46, "sendmsg"}, + {47, "recvmsg"}, + {48, "shutdown"}, + {49, "bind"}, + {50, "listen"}, + {51, "getsockname"}, + {52, "getpeername"}, + {53, "socketpair"}, + {54, "setsockopt"}, + {55, "getsockopt"}, + {56, "clone"}, + {57, "fork"}, + {58, "vfork"}, + {59, "execve"}, + {60, "exit"}, + {61, "wait4"}, + {62, "kill"}, + {63, "uname"}, + {64, "semget"}, + {65, "semop"}, + {66, "semctl"}, + {67, "shmdt"}, + {68, "msgget"}, + {69, "msgsnd"}, + {70, "msgrcv"}, + {71, "msgctl"}, + {72, "fcntl"}, + {73, "flock"}, + {74, "fsync"}, + {75, "fdatasync"}, + {76, "truncate"}, + {77, "ftruncate"}, + {78, "getdents"}, + {79, "getcwd"}, + {80, "chdir"}, + {81, "fchdir"}, + {82, "rename"}, + {83, "mkdir"}, + {84, "rmdir"}, + {85, "creat"}, + {86, "link"}, + {87, "unlink"}, + {88, "symlink"}, + {89, "readlink"}, + {90, "chmod"}, + {91, "fchmod"}, + {92, "chown"}, + {93, "fchown"}, + {94, "lchown"}, + {95, "umask"}, + {96, "gettimeofday"}, + {97, "getrlimit"}, + {98, "getrusage"}, + {99, "sysinfo"}, + {100, "times"}, + {101, "ptrace"}, + {102, "getuid"}, + {103, "syslog"}, + {104, "getgid"}, + {105, "setuid"}, + {106, "setgid"}, + {107, "geteuid"}, + {108, "getegid"}, + {109, "setpgid"}, + {110, "getppid"}, + {111, "getpgrp"}, + {112, "setsid"}, + {113, "setreuid"}, + {114, "setregid"}, + {115, "getgroups"}, + {116, "setgroups"}, + {117, "setresuid"}, + {118, "getresuid"}, + {119, "setresgid"}, + {120, "getresgid"}, + {121, "getpgid"}, + {122, "setfsuid"}, + {123, "setfsgid"}, + {124, "getsid"}, + {125, "capget"}, + {126, "capset"}, + {127, "rt_sigpending"}, + {128, "rt_sigtimedwait"}, + {129, "rt_sigqueueinfo"}, + {130, "rt_sigsuspend"}, + {131, "sigaltstack"}, + {132, "utime"}, + {133, "mknod"}, + {134, "uselib"}, + {135, "personality"}, + {136, "ustat"}, + {137, "statfs"}, + {138, "fstatfs"}, + {139, "sysfs"}, + {140, "getpriority"}, + {141, "setpriority"}, + {142, "sched_setparam"}, + {143, "sched_getparam"}, + {144, "sched_setscheduler"}, + {145, "sched_getscheduler"}, + {146, "sched_get_priority_max"}, + {147, "sched_get_priority_min"}, + {148, "sched_rr_get_interval"}, + {149, "mlock"}, + {150, "munlock"}, + {151, "mlockall"}, + {152, "munlockall"}, + {153, "vhangup"}, + {154, "modify_ldt"}, + {155, "pivot_root"}, + {156, "_sysctl"}, + {157, "prctl"}, + {158, "arch_prctl"}, + {159, "adjtimex"}, + {160, "setrlimit"}, + {161, "chroot"}, + {162, "sync"}, + {163, "acct"}, + {164, "settimeofday"}, + {165, "mount"}, + {166, "umount2"}, + {167, "swapon"}, + {168, "swapoff"}, + {169, "reboot"}, + {170, "sethostname"}, + {171, "setdomainname"}, + {172, "iopl"}, + {173, "ioperm"}, + {174, "create_module"}, + {175, "init_module"}, + {176, "delete_module"}, + {177, "get_kernel_syms"}, + {178, "query_module"}, + {179, "quotactl"}, + {180, "nfsservctl"}, + {181, "getpmsg"}, + {182, "putpmsg"}, + {183, "afs_syscall"}, + {184, "tuxcall"}, + {185, "security"}, + {186, "gettid"}, + {187, "readahead"}, + {188, "setxattr"}, + {189, "lsetxattr"}, + {190, "fsetxattr"}, + {191, "getxattr"}, + {192, "lgetxattr"}, + {193, "fgetxattr"}, + {194, "listxattr"}, + {195, "llistxattr"}, + {196, "flistxattr"}, + {197, "removexattr"}, + {198, "lremovexattr"}, + {199, "fremovexattr"}, + {200, "tkill"}, + {201, "time"}, + {202, "futex"}, + {203, "sched_setaffinity"}, + {204, "sched_getaffinity"}, + {205, "set_thread_area"}, + {206, "io_setup"}, + {207, "io_destroy"}, + {208, "io_getevents"}, + {209, "io_submit"}, + {210, "io_cancel"}, + {211, "get_thread_area"}, + {212, "lookup_dcookie"}, + {213, "epoll_create"}, + {214, "epoll_ctl_old"}, + {215, "epoll_wait_old"}, + {216, "remap_file_pages"}, + {217, "getdents64"}, + {218, "set_tid_address"}, + {219, "restart_syscall"}, + {220, "semtimedop"}, + {221, "fadvise64"}, + {222, "timer_create"}, + {223, "timer_settime"}, + {224, "timer_gettime"}, + {225, "timer_getoverrun"}, + {226, "timer_delete"}, + {227, "clock_settime"}, + {228, "clock_gettime"}, + {229, "clock_getres"}, + {230, "clock_nanosleep"}, + {231, "exit_group"}, + {232, "epoll_wait"}, + {233, "epoll_ctl"}, + {234, "tgkill"}, + {235, "utimes"}, + {236, "vserver"}, + {237, "mbind"}, + {238, "set_mempolicy"}, + {239, "get_mempolicy"}, + {240, "mq_open"}, + {241, "mq_unlink"}, + {242, "mq_timedsend"}, + {243, "mq_timedreceive"}, + {244, "mq_notify"}, + {245, "mq_getsetattr"}, + {246, "kexec_load"}, + {247, "waitid"}, + {248, "add_key"}, + {249, "request_key"}, + {250, "keyctl"}, + {251, "ioprio_set"}, + {252, "ioprio_get"}, + {253, "inotify_init"}, + {254, "inotify_add_watch"}, + {255, "inotify_rm_watch"}, + {256, "migrate_pages"}, + {257, "openat"}, + {258, "mkdirat"}, + {259, "mknodat"}, + {260, "fchownat"}, + {261, "futimesat"}, + {262, "newfstatat"}, + {263, "unlinkat"}, + {264, "renameat"}, + {265, "linkat"}, + {266, "symlinkat"}, + {267, "readlinkat"}, + {268, "fchmodat"}, + {269, "faccessat"}, + {270, "pselect6"}, + {271, "ppoll"}, + {272, "unshare"}, + {273, "set_robust_list"}, + {274, "get_robust_list"}, + {275, "splice"}, + {276, "tee"}, + {277, "sync_file_range"}, + {278, "vmsplice"}, + {279, "move_pages"}, + {280, "utimensat"}, + {281, "epoll_pwait"}, + {282, "signalfd"}, + {283, "timerfd_create"}, + {284, "eventfd"}, + {285, "fallocate"}, + {286, "timerfd_settime"}, + {287, "timerfd_gettime"}, + {288, "accept4"}, + {289, "signalfd4"}, + {290, "eventfd2"}, + {291, "epoll_create1"}, + {292, "dup3"}, + {293, "pipe2"}, + {294, "inotify_init1"}, + {295, "preadv"}, + {296, "pwritev"}, + {297, "rt_tgsigqueueinfo"}, + {298, "perf_event_open"}, + {299, "recvmmsg"}, + {300, "fanotify_init"}, + {301, "fanotify_mark"}, + {302, "prlimit64"}, + {303, "name_to_handle_at"}, + {304, "open_by_handle_at"}, + {305, "clock_adjtime"}, + {306, "syncfs"}, + {307, "sendmmsg"}, + {308, "setns"}, + {309, "getcpu"}, + {310, "process_vm_readv"}, + {311, "process_vm_writev"}, + {312, "kcmp"}, + {313, "finit_module"}, + {314, "sched_setattr"}, + {315, "sched_getattr"}, + {316, "renameat2"}, + {317, "seccomp"}, + {318, "getrandom"}, + {319, "memfd_create"}, + {320, "kexec_file_load"}, + {321, "bpf"}, + {322, "execveat"}, + {323, "userfaultfd"}, + {324, "membarrier"}, + {325, "mlock2"}, + {511, "-sched-"}, // Fake last syscall. Indicates where __schedule runs + {-1, NULL}, // Must be last +}; + +// Based on arch/x86/include/asm/x86/irq_vectors.h +// 2017: arch/x86/include/asm/irq_vectors.h +// 2019: arch/x86/include/asm/irq_vectors.h +/* + * Vectors 0 ... 31 : system traps and exceptions - hardcoded events + * Vectors 32 ... 127 : device interrupts + * Vector 128 : legacy int80 syscall interface + * Vectors 129 ... INVALIDATE_TLB_VECTOR_START-1 except 204 : device interrupts + * Vectors INVALIDATE_TLB_VECTOR_START ... 255 : special interrupts + */ + +static const NumNamePair IrqNames[] = { + // 2017 machines + {0, "timer"}, // timer + {1, "i8042_keyboard1"}, // keyboard/touchpad/mouse + {8, "rtc0"}, // real-time clock chip + {9, "acpi"}, + {12, "i8042_keyboard12"}, // keyboard/touchpad/mouse + {16, "usb1"}, + {23, "usb2"}, + {24, "i915_graphics"}, // usb + {28, "enp2s0_eth0"}, // aka eth0 + {29, "hda_29_inner"}, // disk + {30, "hda_30_inner"}, // disk + {31, "mei_me"}, // Management Engine Interface + //{29, "snd_hda_29"}, // audio ?? maybe 32/33 now + //{30, "snd_hda_30"}, // audio ?? + + // 2017 for our particular machines dclab-1,2,3,4 + {0x22, "eth0"}, // eth0 + {0x42, "hda_29"}, // disk, forwarded to 29 + {0x52, "hda_30"}, // disk, forwarded to 30 + {0x62, "hda_31"}, // disk + {0xb1, "graphics"}, // ether?, forwards to 24, no return + + // 2018 for our particular machines dclab-1,2,3 + {0xb2, "eth0"}, // ethernet + + + {128, "int80"}, + +// 2019.03.05 Linux 4.19 Ryzen */ + //{0x21, "??"}, // 1/sec + {0x23, "eth0"}, // 18/sec + //{0x24, "??"}, // 129 as 64+64 5 sec + {0x25, "eth0?"}, // aka eth0 + {0x27, "sdb2"}, // aka disk + + // {255, "spurious_apic"}, + {255, "BH"}, // bottom half of an interrupt handler + {254, "error_apic_ipi"}, + {253, "reschedule_ipi"}, + {252, "call_func_ipi"}, + {251, "call_func1_ipi"}, + {250, "thermal_apic_ipi"}, + {249, "threshold_apic_ipi"}, + {248, "reboot_ipi"}, + {247, "x86_platform_ipi"}, + {246, "irq_work_ipi"}, + {245, "uv_bau_message"}, + {244, "deferred_error"}, + {243, "hypervisor_callback"}, + {242, "posted_intr"}, + {241, "posted_intr_wakeup"}, + {240, "posted_intr_nested"}, + {239, "managed_irq_shutdown"}, + {238, "hyperv_reenlighten"}, + {237, "hyperv_stimer0"}, + {236, "local_timer_vector"}, // event 0x05ec, decimal 1516 4.19 x86 + + {13, "fpu_irq"}, + + {-1, NULL}, // Must be last +}; + +// Export this to raw2event.cc, using above value +static const int kTIMER_IRQ_EVENT = 0x05ec; + +// Bottom half BH vectors, from include/linux/interrupt.h +static const NumNamePair SoftIrqNames[] = { + {0, "HI_SOFTIRQ"}, + {1, "TIMER_SOFTIRQ"}, + {2, "NET_TX_SOFTIRQ"}, + {3, "NET_RX_SOFTIRQ"}, + {4, "BLOCK_SOFTIRQ"}, + {5, "IRQ_POLL_SOFTIRQ"}, + {6, "TASKLET_SOFTIRQ"}, + {7, "SCHED_SOFTIRQ"}, + {8, "HRTIMER_SOFTIRQ"}, + {9, "RCU_SOFTIRQ"}, + + {-1, NULL}, // Must be last +}; + +static const NumNamePair TrapNames[] = { + {0, "Divide-by-zero"}, + {1, "Debug"}, + {2, "Non-maskable_Interrupt"}, + {3, "Breakpoint"}, + {4, "Overflow"}, + {5, "Bound_Range_Exceeded"}, + {6, "Invalid_Opcode"}, + {7, "device_not_available"}, + {8, "Double_Fault"}, + {9, "Coprocessor_Segment_Overrun"}, + {10, "Invalid_TSS"}, + {11, "Segment_Not_Present"}, + {12, "Stack_Segment_Fault"}, + {13, "General_Protection_Fault"}, + {14, "page_fault"}, + {15, "Spurious_Interrupt"}, + {16, "x87_Floating-Point_Exception"}, + {17, "Alignment_Check"}, + {18, "Machine_Check"}, + {19, "SIMD_Floating-Point_Exception"}, + {32, "IRET_Exception"}, + + {-1, NULL}, // Must be last +}; + +// This is just the base set. More could be added later +// see linux-4.19.19/tools/include/uapi/asm-generic/errno-base.h +// linux-4.19.19/include/linux/errno.h +// linux-4.19.19/include/uapi/linux/errno.h +// linux-4.19.19/include/uapi/asm-generic/errno.h + +static const NumNamePair ErrnoNames[] = { + {1, "EPERM"}, + {2, "ENOENT"}, + {3, "ESRCH"}, + {4, "EINTR"}, + {5, "EIO"}, + {6, "ENXIO"}, + {7, "E2BIG"}, + {8, "ENOEXEC"}, + {9, "EBADF"}, + {10, "ECHILD"}, + {11, "EAGAIN"}, + {12, "ENOMEM"}, + {13, "EACCES"}, + {14, "EFAULT"}, + {15, "ENOTBLK"}, + {16, "EBUSY"}, + {17, "EEXIST"}, + {18, "EXDEV"}, + {19, "ENODEV"}, + {20, "ENOTDIR"}, + {21, "EISDIR"}, + {22, "EINVAL"}, + {23, "ENFILE"}, + {24, "EMFILE"}, + {25, "ENOTTY"}, + {26, "ETXTBSY"}, + {27, "EFBIG"}, + {28, "ENOSPC"}, + {29, "ESPIPE"}, + {30, "EROFS"}, + {31, "EMLINK"}, + {32, "EPIPE"}, + {33, "EDOM"}, + {34, "ERANGE"}, + + {-1, NULL}, // Must be last + +}; +#endif // __KUTRACE_CONTROL_NAMES_H__ + + diff --git a/postproc/kutrace_lib.cc b/postproc/kutrace_lib.cc index aeec5658bb9d..a7ff8a57efe5 100644 --- a/postproc/kutrace_lib.cc +++ b/postproc/kutrace_lib.cc @@ -1,4 +1,4 @@ -// Little user-mode library program to control kutracing +// Little user-mode library program to control kutracing // Copyright 2023 Richard L. Sites // @@ -8,7 +8,7 @@ #include // nanosleep #include // getpid gethostname syscall #include // gettimeofday -#include +#include #if defined(__x86_64__) #include // _rdtsc @@ -28,7 +28,7 @@ namespace { /* For the flags byte in traceblock[1] */ #define IPC_Flag CLU(0x80) #define WRAP_Flag CLU(0x40) -#define Unused2_Flag CLU(0x20) +#define LLC_Flag CLU(0x20) #define Unused1_Flag CLU(0x10) #define VERSION_MASK CLU(0x0F) @@ -42,7 +42,7 @@ static const u64 kMin4KBModuleVersionNumber = 4; // This defines the format of the resulting trace file static const u64 kTracefileVersionNumber = 3; -// NOTE: To use fast 4KB transfers out of trace buffer, +// NOTE: To use fast 4KB transfers out of trace buffer, // IPC block must be at least 4KB and thus trace block must be at least 32KB. // Number of u64 values per 4KB @@ -71,7 +71,7 @@ char kernelversion[GetbufSize]; char modelname[GetbufSize]; char hostname[GetbufSize]; char linkspeed[GetbufSize]; -NumNamePair localirqpairs[256]; // At most 256 IRQ name/number pairs +NumNamePair localirqpairs[256]; // At most 256 IRQ name/number pairs irqname irqnames[256]; // At most 256 IRQ names @@ -113,7 +113,7 @@ inline u64 ku_get_cycles(void) { u64 timer_value; #if defined(__aarch64__) - asm volatile("mrs %x0, cntvct_el0" : "=r"(timer_value)); + asm volatile("mrs %0, cntvct_el0" : "=r"(timer_value)); #elif defined(__ARM_ARCH_ISA_ARM) /* This 32-bit result at 54 MHz RPi4 wraps every 75 seconds */ asm volatile("mrrc p15, 1, %Q0, %R0, c14" : "=r" (timer_value)); @@ -165,9 +165,9 @@ void StripCRLF(char* s) { if ((0 < len) && s[len - 1] == '\r') {s[len - 1] = '\0'; --len;} } -//--------------------------------------------------------------------------------------// +//--------------------------------------------------------------------------------------// // FreeBSD-specific routines -//--------------------------------------------------------------------------------------// +//--------------------------------------------------------------------------------------// #if defined(__FreeBSD__) // FreeBSD syscalls are different. The nice thing is that @@ -235,7 +235,7 @@ void GetModelName(char* modelname, int len) { StripCRLF(modelname); } -// Get next interrupt description line from file, if any, and set +// Get next interrupt description line from file, if any, and set // interrupt number and name and return value of true. // If no more lines, return false // @@ -266,7 +266,7 @@ bool NextIntr(FILE* intrfile, int* intrnum, char* intrname, int len) { intrname[len - 1] = '\0'; return true; } - + return false; } @@ -293,13 +293,14 @@ void GetIrqNames(NumNamePair* irqpairs, irqname* irqnames) { #endif -//--------------------------------------------------------------------------------------// +//--------------------------------------------------------------------------------------// // Linux-specific routines -//--------------------------------------------------------------------------------------// +//--------------------------------------------------------------------------------------// #if !defined(__FreeBSD__) static const int __NR_kutrace_control = 1023; +//static const int __NR_kutrace_control = 511; u64 inline DoControl(u64 command, u64 arg) { @@ -332,13 +333,13 @@ void GetModelName(char* modelname, int len) { StripCRLF(modelname); } -// Get next interrupt description line from file, if any, and set +// Get next interrupt description line from file, if any, and set // interrupt number and name and return value of true. // If no more lines, return false // // Expecting: // cat /proc/interrupts -// CPU0 CPU1 +// CPU0 CPU1 // 0: 20 0 IO-APIC 2-edge timer // 1: 3 0 IO-APIC 1-edge i8042 // 8: 1 0 IO-APIC 8-edge rtc0 @@ -355,7 +356,7 @@ bool NextIntr(FILE* intrfile, int* intrnum, char* intrname, int len) { intrname[len - 1] = '\0'; return true; } - + return false; } @@ -365,7 +366,7 @@ void GetIrqNames(NumNamePair* irqpairs, irqname* irqnames) { irqpairs[0].name = NULL; FILE* intrfile = fopen("/proc/interrupts", "r"); if (intrfile == NULL) {return;} - + char intrname[GetbufSize]; int intrnum; int k = 0; @@ -383,9 +384,9 @@ void GetIrqNames(NumNamePair* irqpairs, irqname* irqnames) { #endif -//--------------------------------------------------------------------------------------// +//--------------------------------------------------------------------------------------// // Common routines -//--------------------------------------------------------------------------------------// +//--------------------------------------------------------------------------------------// // Kernel version is the result of command: uname -rv void GetKernelVersion(char* kernelversion, int len) { @@ -456,11 +457,12 @@ u64 inline DoControl(u64 command, u64 arg) } return (rval); } + #else // Not FreeBSD // These numbers must exactly match the numbers in kernel include file kutrace.h -#define __NR_kutrace_control 1023 +#define __NR_kutrace_control 1023 u64 inline DoControl(u64 command, u64 arg) { return syscall(__NR_kutrace_control, command, arg); @@ -477,7 +479,7 @@ void msleep(int msec) { nanosleep(&ts, NULL); } -// Single static buffer. In real production code, this would +// Single static buffer. In real production code, this would // all be std::string value, or something else at least as safe. static const int kMaxDateTimeBuffer = 32; static char gTempDateTimeBuffer[kMaxDateTimeBuffer]; @@ -517,10 +519,10 @@ const char* MakeTraceFileName(const char* argv0, char* str) { int pid = getpid(); sprintf(str, "%s_%s_%s_%d.trace", slash, timestr, hostnamestr, pid); - return str; -} + return str; +} -// This depends on ~KUTRACE_CMD_INSERTN working even with tracing off. +// This depends on ~KUTRACE_CMD_INSERTN working even with tracing off. void InsertVariableEntry(const char* str, u64 event, u64 arg) { u64 temp[8]; // Up to 56 bytes u64 bytelen = strlen(str); @@ -548,7 +550,7 @@ void EmitNames(const NumNamePair* ipair, u64 event) { -// This depends on ~TRACE_INSERTN working even with tracing off. +// This depends on ~TRACE_INSERTN working even with tracing off. void InsertTimePair(int64 cycles, int64 usec) { u64 temp[8]; // Always 8 words for TRACE_INSERTN u64 n_with_length = KUTRACE_TIMEPAIR + (3 << 4); @@ -570,7 +572,7 @@ bool TestModule() { if (retval > 255) { // Module is not loaded - fprintf(stderr, "KUtrace module/code not loaded\n"); + fprintf(stderr, "KUtrace module/code not loaded or PTRACE needed or use insmod check=0\n"); return false; } if (retval < kMinModuleVersionNumber) { @@ -640,9 +642,9 @@ bool DoOn() { // Current design is two-step: // one routine to capture all the info // second routine to insert into trace buffer -// We want the inserts to be fast and have no delays that might allow a process -// migration in the *middle* of building the initial name list. Doing so will -// confuse wraparound and my leave some events unnamed for the first few +// We want the inserts to be fast and have no delays that might allow a process +// migration in the *middle* of building the initial name list. Doing so will +// confuse wraparound and my leave some events unnamed for the first few // housand rawtoevent entries if some CPU blocks precede the remainder of // the name entries. @@ -663,14 +665,14 @@ void DoInit(const char* process_name) { // AHHA. These can take more than 10msec to execute. so 20-bit time can wrap, // and we can get migrated to another CPU while we are blocked. - // So we need to capture all the strings up front before creating the first trace + // So we need to capture all the strings up front before creating the first trace // entry, and then insert all at once. GetKernelVersion(kernelversion, GetbufSize); GetModelName(modelname, GetbufSize); GetHostName(hostname, GetbufSize); GetLinkSpeed(linkspeed, GetbufSize); GetIrqNames(localirqpairs, irqnames); - + GetTimePair(&start_cycles, &start_usec); // Now OK to look at time // Start trace buffer with a little trace environment information @@ -682,8 +684,8 @@ void DoInit(const char* process_name) { // Add trap/irq/syscall names into front of trace EmitNames(PidNames, KUTRACE_PIDNAME); EmitNames(TrapNames, KUTRACE_TRAPNAME); - EmitNames(localirqpairs, KUTRACE_INTERRUPTNAME); // Running system interrupts 1st - EmitNames(IrqNames, KUTRACE_INTERRUPTNAME); // Default interrupt names 2nd + EmitNames(IrqNames, KUTRACE_INTERRUPTNAME); // Default interrupt names 1st + EmitNames(localirqpairs, KUTRACE_INTERRUPTNAME); // Running system interrupts 2nd EmitNames(Syscall64Names, KUTRACE_SYSCALL64NAME); EmitNames(ErrnoNames, KUTRACE_ERRNONAME); @@ -720,13 +722,13 @@ void DoReset(u64 control_flags) { // Show some sort of tracing status // Module must be loaded. Tracing may well be on -// If IPC,only 7/8 of the blocks are counted: +// If IPC,only 7/8 of the blocks are counted: // for every 64KB traceblock there is another 8KB IPCblock (and some wasted space) void DoStat(u64 control_flags) { u64 retval = DoControl(KUTRACE_CMD_STAT, 0); double blocksize = kTraceBufSize * sizeof(u64); if ((control_flags & DO_IPC) != 0) {blocksize = (blocksize * 8) / 7;} - fprintf(stderr, "Stat: %lld trace blocks used (%3.1fMB)\n", + fprintf(stderr, "Stat: %lld trace blocks used (%3.1fMB)\n", retval, (retval * blocksize) / (1024 * 1024)); } @@ -755,7 +757,7 @@ typedef struct { double m_slope; } CyclesToUsecParams; -void SetParams(int64 start_cycles, int64 start_usec, +void SetParams(int64 start_cycles, int64 start_usec, int64 stop_cycles, int64 stop_usec, CyclesToUsecParams* param) { param->base_cycles = start_cycles; param->base_usec = start_usec; @@ -778,13 +780,13 @@ const char* FormatUsecDateTime(int64 us) { if (us == 0) {return "unknown";} // Longer spelling: caller expecting date int32 seconds = us / 1000000; int32 usec = us - (seconds * 1000000); - snprintf(gTempPrintBuffer, kMaxPrintBuffer, "%s.%06d", + snprintf(gTempPrintBuffer, kMaxPrintBuffer, "%s.%06d", FormatSecondsDateTime(seconds), usec); return gTempPrintBuffer; } void DumpTimePair(const char* label, int64 cycles, int64 usec) { - fprintf(stderr, "%s %016llx cy %016llx us => %s\n", + fprintf(stderr, "%s %016llx cy %016llx us => %s\n", label, cycles, usec, FormatUsecDateTime(usec)); } #endif @@ -822,7 +824,7 @@ void DoDump(const char* fname) { //fprintf(stderr, "wordcount = %ld\n", wordcount); //fprintf(stderr, "blockcount = %ld\n", blockcount); - // If module implements 4KB transfers, use those. + // If module implements 4KB transfers, use those. bool use_4kb = (kIpcBufSize >= k4KBSize); use_4kb &= (DoControl(KUTRACE_CMD_VERSION, 0) >= kMin4KBModuleVersionNumber); @@ -856,20 +858,44 @@ void DoDump(const char* fname) { // traceblock[0] has cpu number and cycle counter // traceblock[1] has flags in top byte, then zeros - // We put the reconstructed getimeofday value into traceblock[1] + // We put the reconstructed getimeofday value into traceblock[1] uint8 flags = traceblock[1] >> 56; - bool this_block_has_ipc = ((flags & IPC_Flag) != 0); + bool this_block_has_ipc = ((flags & (IPC_Flag | LLC_Flag)) != 0); bool very_first_block = (i == 0); if (very_first_block) { - // Fill in the tracefile version + // Fill in the tracefile version traceblock[1] |= ((kTracefileVersionNumber & VERSION_MASK) << 56); if (!did_wrap_around) { - // The kernel exports the wrap flag in the first block before + // The kernel exports the wrap flag in the first block before // it is known whether the trace actually wrapped. // It did not, so turn off that bit traceblock[1] &= ~(WRAP_Flag << 56); } + + // For Arm-32, the "cycle" counter is only 32 bits at 54 MHz, so wraps about every 79 seconds. + // This can leave stop_cycles small by a few multiples of 4G. We do a temporary fix here + // for exactly 54 MHz. Later, we could find or take as input a different approximate + // frequency. We could also do something similar for a 40-bit counter. + bool has_32bit_cycles = ((start_cycles | stop_cycles) & 0xffffffff00000000llu) == 0; + if (has_32bit_cycles) { +//VERYTEMP +//fprintf(stderr, "DoDump detected 32-bit cycle counter. Should be RPi4.\n"); + uint64 elapsed_usec = (uint64)(stop_usec - start_usec); + uint64 elapsed_cycles = (uint64)(stop_cycles - start_cycles); + uint64 expected_cycles = elapsed_usec * mhz_32bit_cycles; + // Pick off the expected high bits + uint64 approx_hi = (start_cycles + expected_cycles) & 0xffffffff00000000llu; + // Put them in + stop_cycles |= (int64)approx_hi; + // Cross-check and change by 1 if right at a boundary + // and off by more than 12.5% from expected MHz + elapsed_cycles = (uint64)(stop_cycles - start_cycles); + uint64 ratio = elapsed_cycles / elapsed_usec; + if (ratio > (mhz_32bit_cycles + (mhz_32bit_cycles >> 3))) {stop_cycles -= 0x0000000100000000llu;} + if (ratio < (mhz_32bit_cycles - (mhz_32bit_cycles >> 3))) {stop_cycles += 0x0000000100000000llu;} + elapsed_cycles = (uint64)(stop_cycles - start_cycles); + } uint64 block_0_cycle = traceblock[0] & CLU(0x00ffffffffffffff); @@ -882,7 +908,7 @@ void DoDump(const char* fname) { traceblock[3] = start_usec; traceblock[4] = stop_cycles; traceblock[5] = stop_usec; - + ////DumpTimePair("start", start_cycles, start_usec); ////DumpTimePair("stop ", stop_cycles, stop_usec); } // End of very first block @@ -967,31 +993,31 @@ u64 DoEvent(u64 eventnum, u64 arg) { // 0123456789012345678901234567890123456789 // where the first is NUL. static const char kToBase40[256] = { - 0,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, - 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, - 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,37,38,39, - 27,28,29,30, 31,32,33,34, 35,36,38,38, 38,38,38,38, + 0,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, + 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, + 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,37,38,39, + 27,28,29,30, 31,32,33,34, 35,36,38,38, 38,38,38,38, 38, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11, 12,13,14,15, - 16,17,18,19, 20,21,22,23, 24,25,26,38, 38,38,38,38, + 16,17,18,19, 20,21,22,23, 24,25,26,38, 38,38,38,38, 38, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11, 12,13,14,15, - 16,17,18,19, 20,21,22,23, 24,25,26,38, 38,38,38,38, + 16,17,18,19, 20,21,22,23, 24,25,26,38, 38,38,38,38, - 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, - 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, - 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, - 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, + 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, + 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, + 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, + 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, - 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, - 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, - 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, - 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, + 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, + 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, + 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, + 38,38,38,38, 38,38,38,38, 38,38,38,38, 38,38,38,38, }; static const char kFromBase40[40] = { '\0','a','b','c', 'd','e','f','g', 'h','i','j','k', 'l','m','n','o', 'p','q','r','s', 't','u','v','w', 'x','y','z','0', '1','2','3','4', - '5','6','7','8', '9','-','.','/', + '5','6','7','8', '9','-','.','/', }; @@ -1041,7 +1067,7 @@ void kutrace::mark_c(const char* label) {::DoMark(KUTRACE_MARKC, ::CharToBase40( void kutrace::mark_d(uint64 n) {::DoMark(KUTRACE_MARKD, n);} // Returns number of words inserted 1..8, or -// 0 if tracing is off, negative if module is not not loaded +// 0 if tracing is off, negative if module is not not loaded u64 kutrace::addevent(uint64 eventnum, uint64 arg) {return ::DoEvent(eventnum, arg);} void kutrace::addname(uint64 eventnum, uint64 number, const char* name) {::addname(eventnum, number, name);} @@ -1075,6 +1101,6 @@ const char* kutrace::MakeTraceFileName(const char* name, char* str) { bool kutrace::TestModule() {return ::TestModule();} - + diff --git a/postproc/kutrace_lib.h b/postproc/kutrace_lib.h index 643ac0396807..294e5bc251bc 100644 --- a/postproc/kutrace_lib.h +++ b/postproc/kutrace_lib.h @@ -1,7 +1,7 @@ -// kutrace_lib.h +// kutrace_lib.h // Copyright 2023 Richard L. Sites // -// This is a simple interface for user-mode code to control kernel/user tracing and +// This is a simple interface for user-mode code to control kernel/user tracing and // to add markers // @@ -17,13 +17,13 @@ typedef int64 s64; typedef struct { int number; - const char* name; + const char* name; } NumNamePair; /* This is the definitive list of raw trace 12-bit event numbers */ -// These user-mode declarations need to exactly match -// source pool kutrace.h kernel-mode ones +// These user-mode declarations need to exactly match +// source pool kutrace.h kernel-mode ones /* kutrace_control() commands */ #define KUTRACE_CMD_OFF 0 @@ -50,7 +50,7 @@ typedef struct { // +-------------------+-----------+---------------+-------+-------+ // | timestamp | event | delta | retval| arg0 | // +-------------------+-----------+---------------+-------+-------+ -// 20 12 8 8 16 +// 20 12 8 8 16 // Add KUTRACE_ and uppercase #define KUTRACE_NOP 0x000 @@ -70,7 +70,7 @@ typedef struct { // +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+ // ~ ~ // +---------------------------------------------------------------+ -// 20 12 32 +// 20 12 32 // TimePair (DEFUNCT) // +-------------------+-----------+-------------------------------+ @@ -80,10 +80,10 @@ typedef struct { // +---------------------------------------------------------------+ // | matching gettimeofday value | // +---------------------------------------------------------------+ -// 20 12 32 +// 20 12 32 -// Variable-length starting numbers. +// Variable-length starting numbers. // Middle hex digit will become length in u64 words, 2..8 #define KUTRACE_FILENAME 0x001 #define KUTRACE_PIDNAME 0x002 @@ -120,7 +120,7 @@ typedef struct { // +-------------------+-----------+-------------------------------+ // | timestamp | event | arg | // +-------------------+-----------+-------------------------------+ -// 20 12 32 +// 20 12 32 #define KUTRACE_MARKA 0x20A #define KUTRACE_MARKB 0x20B @@ -132,14 +132,14 @@ typedef struct { #define KUTRACE_LOCKACQUIRE 0x211 #define KUTRACE_LOCKWAKEUP 0x212 // unused 0x213 - + // Added 2020.10.29 -#define KUTRACE_RX_PKT 0x214 /* Raw packet received w/32-byte payload hash */ +#define KUTRACE_RX_PKT 0x214 /* Raw packet received w/32-byte payload hash */ #define KUTRACE_TX_PKT 0x215 /* Raw packet sent w/32-byte payload hash */ -#define KUTRACE_RX_USER 0x216 /* Request beginning at user code w/32-byte payload hash */ +#define KUTRACE_RX_USER 0x216 /* Request beginning at user code w/32-byte payload hash */ #define KUTRACE_TX_USER 0x217 /* Response ending at user code w/32-byte payload hash */ - + #define KUTRACE_MBIT_SEC 0x218 /* Network rate in Mb/s */ #define KUTRACE_RESOURCE 0x219 /* Arbitrary resource span; arg says which resource */ @@ -166,7 +166,7 @@ typedef struct { /* Reasons for waiting, inserted only in postprocessing */ /* dsites 2019.10.25 */ #define KUTRACE_WAITA 0x300 /* a-z, through 0x0319 */ -#define KUTRACE_WAITZ 0x319 +#define KUTRACE_WAITZ 0x319 /* These are in blocks of 256 or 512 numbers */ #define KUTRACE_TRAP 0x400 @@ -194,8 +194,7 @@ typedef struct { #define KUTRACE_LOCAL_TIMER_VECTOR 0xec /* Reuse the spurious_apic vector to show bottom halves executing */ -// XXX: Changed from 255 to 241 for Android -#define KUTRACE_BOTTOM_HALF 241 +#define KUTRACE_BOTTOM_HALF 255 #define AST_SOFTIRQ 15 #define RESCHEDULE_VECTOR IPI_PREEMPT @@ -206,7 +205,7 @@ typedef struct { // Names for the variable-length events 0y0-0yF and 1y0-1yF, where y is length in words 2..8 static const char* const kNameName[32] = { - "-000-", "file", "pid", "rpc", + "-000-", "file", "pid", "rpc", "trap", "irq", "trap", "irq", "syscall", "syscall", "syscall", "syscall", "syscall32", "syscall32", "syscall32", "syscall32", @@ -219,10 +218,10 @@ static const char* const kNameName[32] = { // Names for the special events 200-21F static const char* const kSpecialName[32] = { - "userpid", "rpcreq", "rpcresp", "rpcmid", + "userpid", "rpcreq", "rpcresp", "rpcmid", "rxmsg", "txmsg", "runnable", "sendipi", - "mwait", "-freq-", "mark_a", "mark_b", - "mark_c", "mark_d", "-20e-", "-20f-", + "mwait", "-freq-", "mark_a", "mark_b", + "mark_c", "mark_d", "-20e-", "-20f-", "try_", "acq_", "rel_", "-213-", // Locks "rx", "tx", "urx", "utx", "mbs", "res", "enq", "deq", @@ -235,7 +234,7 @@ static const char* const kSpecialName[32] = { // Names for events 400-FFF are always embedded in the trace // x86- and ARM-specific Names for return codes -128 to -1 -// If errno is in [-128..-1], subscript this by -errno - 1. +// If errno is in [-128..-1], subscript this by -errno - 1. // Error -1 EPERM thus maps to kErrnoName[0], not [1] // See include/uapi/asm-generic/errno-base.h // See include/uapi/asm-generic/errno.h @@ -246,20 +245,20 @@ static const char* const kErrnoName[128] = { "EEXIST", "EXDEV", "ENODEV", "ENOTDIR", "EISDIR", "EINVAL", "ENFILE", "EMFILE", "ENOTTY", "ETXTBSY", "EFBIG", "ENOSPC", "ESPIPE", "EROFS", "EMLINK", "EPIPE", - "EDOM", "ERANGE", "EDEADLK", "ENAMETOOLONG", "ENOLCK", "ENOSYS", "ENOTEMPTY", "ELOOP", - "", "ENOMSG", "EIDRM", "ECHRNG", "EL2NSYNC", "EL3HLT", "EL3RST", "ELNRNG", - "EUNATCH", "ENOCSI", "EL2HLT", "EBADE", "EBADR", "EXFULL", "ENOANO", "EBADRQC", - "EBADSLT", "", "EBFONT", "ENOSTR", "ENODATA", "ETIME", "ENOSR", "ENONET", + "EDOM", "ERANGE", "EDEADLK", "ENAMETOOLONG", "ENOLCK", "ENOSYS", "ENOTEMPTY", "ELOOP", + "", "ENOMSG", "EIDRM", "ECHRNG", "EL2NSYNC", "EL3HLT", "EL3RST", "ELNRNG", + "EUNATCH", "ENOCSI", "EL2HLT", "EBADE", "EBADR", "EXFULL", "ENOANO", "EBADRQC", + "EBADSLT", "", "EBFONT", "ENOSTR", "ENODATA", "ETIME", "ENOSR", "ENONET", - "", "", "", "", "", "", "", "", - "", "", "", "", "", "", "", "", - "", "", "", "", "", "", "", "", - "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", - "", "", "", "", "", "", "", "", - "", "", "", "", "", "", "", "", - "", "", "", "", "", "", "", "", - "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", }; @@ -274,7 +273,7 @@ namespace kutrace { void mark_d(u64 n); // Returns number of words inserted 1..8, or - // 0 if tracing is off, negative if module is not not loaded + // 0 if tracing is off, negative if module is not not loaded u64 addevent(u64 eventnum, u64 arg); void addname(u64 eventnum, u64 number, const char* name); diff --git a/postproc/kutrace_unittest.cc b/postproc/kutrace_unittest.cc new file mode 100644 index 000000000000..6eb116272c4a --- /dev/null +++ b/postproc/kutrace_unittest.cc @@ -0,0 +1,31 @@ +// Unit test for kutrace_lib +// dsites 2017.08.25 +// +// Compile with g++ -O2 kutrace_unittest.cc kutrace_lib.cc -o kutrace_unittest +// + +#include +#include + +#include "kutrace_lib.h" + + +int main (int argc, const char** argv) { + //Exit immediately if the module is not loaded + if (!kutrace::test()) { + fprintf(stderr, "FAIL, module kutrace_mod.ko not loaded\n"); + return 0; + } + + // Executable image name, backscan for slash if any + const char* slash = strrchr(argv[0], '/'); + kutrace::go((slash == NULL) ? argv[0] : slash + 1); + kutrace::mark_a("write"); + kutrace::mark_b("/write"); + kutrace::mark_c("a"); + kutrace::mark_d(666); + fprintf(stderr, "PASS, ./postproc3.sh /tmp/unittest.trace \"unittest\"\n"); + fprintf(stderr, " ./kuod /tmp/unittest.trace\n"); + kutrace::stop("/tmp/unittest.trace"); + return 0; +} diff --git a/postproc/postproc3.sh b/postproc/postproc3.sh old mode 100755 new mode 100644 diff --git a/postproc/rawtoevent.cc b/postproc/rawtoevent.cc index 960589776ddb..5c8effcf4ca0 100644 --- a/postproc/rawtoevent.cc +++ b/postproc/rawtoevent.cc @@ -2,7 +2,7 @@ // The main work is turning truncated cycle times into multiples of 10ns // Copyright 2021 Richard L. Sites // -// Input has filename like +// Input has filename like // kutrace_control_20170821_095154_dclab-1_2056.trace // // compile with g++ -O2 rawtoevent.cc from_base40.cc kutrace_lib.cc -o rawtoevent @@ -15,8 +15,7 @@ // dsites 2022.08.19 Add RPi tweaks // dsites 2023.04.30 Update TSDELTA processing to go backward // dsites 2023.05.03 Update timestamp processing to go backward in top 7/8 of wrap period -// - +// dsites 2024.05.29 Accept both IPC and LLC bytes #include #include @@ -40,7 +39,7 @@ static int gTIMER_IRQ_EVENT = 0x05ec; // local_timer static int gSCHED_EVENT = 0x0dff; // -sched- // Remap high syscall numbers into lo sys32 numbers -#define kutrace_map_nr(nr) (nr + (nr & 0x200)) +#define kutrace_map_nr(nr) (nr + (nr & 0x200)) /* Amount to shift cycle counter to get 20-bit timestamps */ /* 4 bits = ~ 2.56 GHz/16 ~ 6nsec tick resolution */ @@ -64,13 +63,13 @@ static const bool TRACEWRAP = false; static const int kMAX_CPUS = 80; static const int mhz_32bit_counts = 54; static const int kNetworkMbPerSec = 1000; // Default: 1 Gb/s -static const int kDefaultLowResNsec10 = 35; // Low-res riscv: 0 dur => 350 nsec instead +static const int kDefaultLowResNsec10 = 35; // Low-res riscv: 0 dur => 350 nsec instead // For sanity checks static const uint64 usec_per_100_years = 1000000LL * 86400 * 365 * 100; // Thru ~2070 // Large ts difference means slightly backward time -static const uint64 kLargeTsdelta = 2000000000; +static const uint64 kLargeTsdelta = 2000000000; // For dealing with riscv poor-resolution sifive u74-mc clock (1MHz) bool is_low_res_ts = false; // True for Riscv u74 1 MHz timestamp @@ -83,15 +82,15 @@ static const uint64 kLateStoreThresh = 0x0000000000020000LLU; #define IPC_Flag 0x80 #define WRAP_Flag 0x40 -#define Unused2_Flag 0x20 +#define LLC_Flag 0x20 #define Unused1_Flag 0x10 #define VERSION_MASK 0x0F -#define RDTSC_SHIFT 0 +#define RDTSC_SHIFT 0 #define OLD_RDTSC_SHIFT 6 -// Module, control must be at least version 3 +// Module, control must be at least version 3 static const int kRawVersionNumber = 3; static const char* kIdleName = "-idle-"; @@ -191,7 +190,7 @@ static const int kTraceBufSize = 8192; static const double kTraceBlocksPerMB = 16.0; static const char* soft_irq_name[] = { - "hi", "timer", "tx", "rx", "block", "irq_p", "taskl", "sched", + "hi", "timer", "tx", "rx", "block", "irq_p", "taskl", "sched", "hrtim", "rcu", "", "", "", "", "", "ast" }; @@ -205,7 +204,7 @@ const char* missingeventname[16] = { typedef map U64toString; typedef set U64set; -// These all use a single static buffer. In real production code, these would +// These all use a single static buffer. In real production code, these would // all be std::string values, or something else at least as safe. static const int kMaxDateTimeBuffer = 32; static char gTempDateTimeBuffer[kMaxDateTimeBuffer]; @@ -223,7 +222,7 @@ typedef struct { double m_slope_nsec10; } CyclesToUsecParams; -void SetParams(int64 start_cycles, int64 start_usec, +void SetParams(int64 start_cycles, int64 start_usec, int64 stop_cycles, int64 stop_usec, CyclesToUsecParams* params) { params->base_cycles = start_cycles; params->base_usec = start_usec; @@ -270,8 +269,8 @@ const char* FormatSecondsDateTime(int32 sec) { if (sec == 0) {return "unknown";} // Longer spelling: caller expecting date time_t tt = sec; struct tm* t = localtime(&tt); - sprintf(gTempDateTimeBuffer, "%04d-%02d-%02d_%02d:%02d:%02d", - t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, + sprintf(gTempDateTimeBuffer, "%04d-%02d-%02d_%02d:%02d:%02d", + t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec); return gTempDateTimeBuffer; } @@ -281,7 +280,7 @@ const char* FormatUsecDateTime(int64 us) { if (us == 0) {return "unknown";} // Longer spelling: caller expecting date int32 seconds = us / 1000000; int32 usec = us - (seconds * 1000000); - snprintf(gTempPrintBuffer, kMaxPrintBuffer, "%s.%06d", + snprintf(gTempPrintBuffer, kMaxPrintBuffer, "%s.%06d", FormatSecondsDateTime(seconds), usec); return gTempPrintBuffer; } @@ -294,15 +293,15 @@ const char* FormatUsecDateTime(int64 us) { // 10 nsec and 40 nsec. inline bool Wrapped(uint64 prior, uint64 now) { - if (prior <= now) {return false;} // Common case + if (prior <= now) {return false;} // Common case return (prior > (now + 4096)); // Wrapped if prior is larger } inline bool LateStore(uint64 prior, uint64 now) { - if (prior <= now) {return false;} // Common case - return (prior <= (now + kLateStoreThresh)); // Late store + if (prior <= now) {return false;} // Common case + return (prior <= (now + kLateStoreThresh)); // Late store } - + // A user-mode-execution event is the pid number plus 64K uint64 PidToEvent(uint64 pid) {return (pid & 0xFFFF) | 0x10000;} uint64 EventToPid(uint64 event) {return event & 0xFFFF;} @@ -313,19 +312,19 @@ inline bool is_cpu_description(uint64 event) { return false; } -// Return true if the event is user-mode execution +// Return true if the event is user-mode execution inline bool is_contextswitch(uint64 event) {return (event == KUTRACE_USERPID);} -// Return true if the event is the idle task, pid 0 +// Return true if the event is the idle task, pid 0 inline bool is_idle(uint64 event) {return (event == 0x10000);} -// Return true if the event is user-mode execution +// Return true if the event is user-mode execution inline bool is_usermode(uint64 event) {return (event > 0xffff) && !is_idle(event);} -// Return true if the event is a syscall/interrupt/trap +// Return true if the event is a syscall/interrupt/trap inline bool is_call(uint64 event) {return (event <= 0xffff) && (KUTRACE_TRAP <= event) && ((event & 0x0200) == 0);} -// Return true if the event is an optimized syscall/interrupt/trap with included return +// Return true if the event is an optimized syscall/interrupt/trap with included return inline bool is_opt_call(uint64 event, uint64 delta_t) {return (delta_t > 0) && is_call(event);} // Return true if the event is a syscall/interrupt/trap return @@ -398,7 +397,7 @@ inline bool is_user_msg_hash(uint64 event) { return (KUTRACE_RX_USER <= event) && (event <= KUTRACE_TX_USER); } -// Return true if the event is RPC message processing begin/end +// Return true if the event is RPC message processing begin/end inline bool is_rpc_msg(uint64 event) { return (KUTRACE_RPCIDREQ <= event) && (event <= KUTRACE_RPCIDRESP); } @@ -423,6 +422,10 @@ int HasIPC(uint8 flags) { return (flags & IPC_Flag) != 0; } +int HasLLC(uint8 flags) { + return (flags & LLC_Flag) != 0; +} + int HasWraparound(uint8 flags) { return (flags & WRAP_Flag) != 0; } @@ -448,9 +451,9 @@ void OutputName(FILE* f, uint64 nsec10, uint64 event, uint32 argall, const char* } // time dur event cpu pid rpc arg retval IPC name(event) -void OutputEvent(FILE* f, +void OutputEvent(FILE* f, uint64 nsec10, uint64 duration, uint64 event, uint64 current_cpu, - uint64 pid, uint64 rpc, + uint64 pid, uint64 rpc, uint64 arg, uint64 retval, int ipc, const char* name) { // Avoid crazy big times bool fail = false; @@ -462,9 +465,9 @@ void OutputEvent(FILE* f, return; } - fprintf(f, "%lld %lld %lld %lld %lld %lld %lld %lld %d %s (%llx)\n", - nsec10, duration, event, current_cpu, - pid, rpc, + fprintf(f, "%lld %lld %lld %lld %lld %lld %lld %lld %d %s (%llx)\n", + nsec10, duration, event, current_cpu, + pid, rpc, arg, retval, ipc, name, event); } @@ -487,7 +490,7 @@ string AppendHexNum(const string& name, uint64 num) { } return name; } - + // Change spaces and control codes to underscore // Get rid of any high bits in names string MakeSafeAscii(string s) { @@ -534,12 +537,12 @@ void FixupIdlePid(uint64* pid, char* pidname, U64set* idle_pids) { //VERYTEMP if (keep_idle) {return;} // FreeBSD has multiple idle threads named idle:xxx, with different PID numbers - // Map all of these to pid 0 + // Map all of these to pid 0 if (memcmp(pidname , "idle:", 5) == 0) { idle_pids->insert(*pid); *pid = 0; } - // Map pid 0 name to "-idle-" + // Map pid 0 name to "-idle-" if (*pid == 0) {strcpy(pidname, kIdleName);} } @@ -578,12 +581,17 @@ bool handle_very_first_block (uint64* traceblock, uint64* base_usec_timestamp, C *base_usec_timestamp = start_usec; bool fail = false; - + int64 delta_counts = stop_counts - start_counts; int64 delta_usec = stop_usec - start_usec; if (delta_usec <= 0) {delta_usec = 1;} // Avoid zdiv double counts_per_usec = (delta_counts * 1.0) / delta_usec; + // We have some possible fixups to do on the time counter values + // riscv can have 1MHz counts that fit in 32 bits + // RPi arm-32 can have 54MHz counts that are truncated to 32 bits + bool has_32bit_counts = ((start_counts | stop_counts) & 0xffffffff00000000llu) == 0; + bool likely_rpi = (memmem((uint8*)traceblock, 256, "Raspberry", 9) != NULL); bool likely_riscv = (memmem((uint8*)traceblock, 256, "u74-mc", 6) != NULL); // Risc-v fixup: u74 chip sometimes sets bogus bit<32> in stop cycles, so 4GB too large @@ -591,7 +599,7 @@ bool handle_very_first_block (uint64* traceblock, uint64* base_usec_timestamp, C //fprintf(stderr, "likely riscv\n"); //fprintf(stderr, "start_counts %016llx\n", start_counts); //fprintf(stderr, "stop_counts %016llx\n", stop_counts); - if ((counts_per_usec > 100.1) && + if ((counts_per_usec > 100.1) && ((start_counts >> 32) == 0) && ((stop_counts >> 32) == 1) ) { stop_counts &= 0x00000000FFFFFFFFLL; @@ -602,18 +610,51 @@ bool handle_very_first_block (uint64* traceblock, uint64* base_usec_timestamp, C } } - // Record where we stand + // Arm-32 fixup: + // For Arm-32, the "cycle" counter is only 32 bits at 54 MHz, so wraps + // about every 79 seconds. This can leave stop_counts small by a few + // multiples of 4G. We do a fix here for exactly 54 MHz. Later, we could + // find or take as input a different approximate counter frequency. + // These traces likely are missing the Raspberry model name + if (has_32bit_counts && likely_rpi) { + //fprintf(stderr, "likely arm-32\n"); + //fprintf(stderr, "rawtoevent: has_32bit_counts\n"); + uint64 elapsed_usec = (uint64)(delta_usec); + uint64 elapsed_counts = (uint64)(delta_counts); + uint64 expected_counts = elapsed_usec * mhz_32bit_counts; + // Pick off the high bits + uint64 approx_hi = expected_counts & 0xffffffff00000000llu; + // Put them in + stop_counts |= (int64)approx_hi; + // Cross-check and change by 1 if right at a boundary + // and off by more than 12.5% from expected MHz + elapsed_counts = (uint64)(stop_counts - start_counts); + uint64 ratio = elapsed_counts / elapsed_usec; + if (ratio > (mhz_32bit_counts + (mhz_32bit_counts >> 3))) { + // High ratio; lower stop point + stop_counts -= 0x0000000100000000llu; + } + if (ratio < (mhz_32bit_counts - (mhz_32bit_counts >> 3))) { + // Low ratio; raise stop point + stop_counts += 0x0000000100000000llu; + } + delta_counts = stop_counts - start_counts; + counts_per_usec = (delta_counts * 1.0) / delta_usec; + fprintf(stderr, "rawtoevent: RPi fixup done.\n"); + } + + // Record where we stand //fprintf(stderr, "# counts per second %3.1f MHz\n", counts_per_usec); //fprintf(stdout, "# counts per second %3.1f MHz\n", counts_per_usec); if (counts_per_usec < 10.0) { fprintf(stderr, "rawtoevent: ... Low-resolution timestamps ...\n"); } - + if (verbose || hexevent) { - fprintf(stdout, "%% %016llx = %lldcy %lldus (%lld mod 1min)\n", + fprintf(stdout, "%% %016llx = %lldcy %lldus (%lld mod 1min)\n", traceblock[2], start_counts, start_usec, start_usec % 60000000l); fprintf(stdout, "%% %016llx\n", traceblock[3]); - fprintf(stdout, "%% %016llx = %lldcy %lldus (%lld mod 1min)\n", + fprintf(stdout, "%% %016llx = %lldcy %lldus (%lld mod 1min)\n", traceblock[4], stop_counts, stop_usec, stop_usec % 60000000l); fprintf(stdout, "%% %016llx\n", traceblock[5]); fprintf(stdout, "%% %016llx unused\n", traceblock[6]); @@ -621,7 +662,7 @@ bool handle_very_first_block (uint64* traceblock, uint64* base_usec_timestamp, C fprintf(stdout, "\n"); } - // Now do some error checking + // Now do some error checking if (counts_per_usec < 0.99) { fprintf(stderr, "rawtoevent Fail: cycles per us %3.1f < 0.99 MHz\n", counts_per_usec); fail = true; @@ -660,7 +701,7 @@ bool handle_very_first_block (uint64* traceblock, uint64* base_usec_timestamp, C SetParams(start_counts, start_usec, stop_counts, stop_usec, params); // Round usec down to multiple of 1 minute - base_minute_usec = (start_usec / 60000000) * 60000000; + base_minute_usec = (start_usec / 60000000) * 60000000; // Backmap base_minute_usec to cycles base_minute_cycle = UsecToCycles(base_minute_usec, *params); @@ -700,8 +741,8 @@ int main (int argc, const char** argv) { // Start timepair is set by DoInit // Stop timepair is set by DoOff - // If start_counts is zero, we got here directly without calling DoInit, - // which was done in some earlier run of this program. In that case, go + // If start_counts is zero, we got here directly without calling DoInit, + // which was done in some earlier run of this program. In that case, go // find the start pair as the first real trace entry in the first trace block. CyclesToUsecParams params; @@ -719,9 +760,9 @@ int main (int argc, const char** argv) { maxblock = atoi(argv[i]); } } - + for (int i = 0; i < kMAX_CPUS; ++i) { - current_pid[i] = 0; + current_pid[i] = 0; current_rpc[i] = 0; prior_timer_irq_nsec10[i] = 0; at_first_cpu_block[i] = true; @@ -758,16 +799,16 @@ int main (int argc, const char** argv) { // TODO: Move this to a stylized BASETIME comment ////fprintf(stdout, "# blocknumber %d\n", blocknumber); // These are stylized comments that eventtospan depends on for initial time - fprintf(stdout, "# [0] %016llx cpu %02llx block %d\n", + fprintf(stdout, "# [0] %016llx cpu %02llx block %d\n", traceblock[0], traceblock[0] >> 56, blocknumber); fprintf(stdout, "# [1] %s cpu %02llx flags %02llx block %d\n", FormatUsecDateTime(traceblock[1] & 0x00fffffffffffffful), - traceblock[0] >> 56, + traceblock[0] >> 56, traceblock[1] >> 56, blocknumber); - fprintf(stdout, + fprintf(stdout, "# TS DUR EVENT CPU PID RPC ARG0 RETVAL IPC NAME (t and dur multiples of 10ns)\n"); if (verbose || hexevent) { @@ -784,7 +825,7 @@ int main (int argc, const char** argv) { current_cpu = traceblock[0] >> 56; uint64 base_cycle = traceblock[0] & 0x00fffffffffffffful; - // traceblock[1] has flags in top byte. + // traceblock[1] has flags in top byte. uint8 flags = traceblock[1] >> 56; uint64 gtod = traceblock[1] & 0x00fffffffffffffful; @@ -799,10 +840,10 @@ int main (int argc, const char** argv) { fprintf(stderr, "rawtoevent FAIL: block[%d] gettimeofday crazy large %016llx\n", blocknumber, gtod); fail = true; } - + all_flags |= flags; - bool this_block_has_ipc = (HasIPC(flags)); + bool this_block_has_ipc = (HasIPC(flags) | HasLLC(flags)); // For each 64KB traceblock that has IPC_Flag set, also read the IPC bytes if (this_block_has_ipc) { @@ -818,7 +859,7 @@ int main (int argc, const char** argv) { // Our downstream display does badly with seconds much over 120... // // We would like the base_minute_usec to be set by the first real entry in block 1 instead... -// Can still use paramaters here for basic time conversion. +// Can still use paramaters here for basic time conversion. // Not much issue with overflow, I think. // @@ -847,7 +888,7 @@ int main (int argc, const char** argv) { uint64 prepend = base_cycle & ~0xfffff; // The base cycle count for this block may well be a bit later than the truncated time - // in the first real entry, and may have wrapped in its low 20 bits. If so, the high bits + // in the first real entry, and may have wrapped in its low 20 bits. If so, the high bits // we want to prepend should be one smaller. uint64 first_timestamp = traceblock[first_real_entry] >> 44; uint64 prior_t = first_timestamp; @@ -882,14 +923,14 @@ int main (int argc, const char** argv) { pid = RemapHighPid(pid); memcpy(pidname, reinterpret_cast(&traceblock[first_real_entry + 2]), 16); pidname[16] = '\0'; - + // FreeBSD has multiple idle threads named idle:xxx, with different PID numbers // Map all of these to pid 0 name -idle-, remembering them FixupIdlePid(&pid, pidname, &idle_pids); if (verbose || hexevent) { if (at_first_cpu_block[current_cpu]) { - fprintf(stderr, "rawtoevent block[%d] cpu %lld pid %lld freq %lld %s\n", + fprintf(stderr, "rawtoevent block[%d] cpu %lld pid %lld freq %lld %s\n", blocknumber, current_cpu, pid, freq_mhz, pidname); } fprintf(stdout, "%% %016llx pid %lld\n", traceblock[first_real_entry + 0], pid); @@ -903,7 +944,7 @@ int main (int argc, const char** argv) { uint64 nameinsert = PidToEvent(pid); string name = MakeSafeAscii(ReduceSpaces(string(pidname))); names[nameinsert] = name; - + // To allow updates of the reconstruction stack in eventtospan uint64 nsec10 = CyclesToNsec10(base_cycle, params); OutputName(stdout, nsec10, KUTRACE_PIDNAME, pid, name.c_str()); @@ -926,10 +967,10 @@ int main (int argc, const char** argv) { // The effect is that first-entry = ctx switch gets LOST. // Commenting out for the time being. dsites 2020.11.12. Fixes reconstruct bug. // - // A possible alternate design is to back up the timestamp here to just before the + // A possible alternate design is to back up the timestamp here to just before the // first real entry. // - /////OutputEvent(stdout, nsec10, duration, event, current_cpu, + /////OutputEvent(stdout, nsec10, duration, event, current_cpu, //// pid, 0, 0, 0, 0, name.c_str()); // Statistics: don't count as a context switch -- almost surely same @@ -939,10 +980,10 @@ int main (int argc, const char** argv) { // dsites 2021.10.20 Output initial CPU frequency if nonzero if (at_first_cpu_block[current_cpu]) { at_first_cpu_block[current_cpu] = false; - OutputEvent(stdout, nsec10, duration, KUTRACE_USERPID, current_cpu, + OutputEvent(stdout, nsec10, duration, KUTRACE_USERPID, current_cpu, pid, 0, 0, 0, 0, name.c_str()); if (0 < freq_mhz) { - OutputEvent(stdout, nsec10, duration, KUTRACE_PSTATE, current_cpu, + OutputEvent(stdout, nsec10, duration, KUTRACE_PSTATE, current_cpu, pid, 0, freq_mhz, 0, 0, "-freq-"); } } @@ -954,7 +995,7 @@ int main (int argc, const char** argv) { // We wrapped if high bit of first_timestamp is 1 and high bit of base is 0 if (Wrapped(first_timestamp, base_cycle)) { - prepend -= 0x100000; + prepend -= 0x100000; if (TRACEWRAP) {fprintf(stdout, " Wrap0 %05llx %05llx\n", first_timestamp, base_cycle);} } @@ -977,8 +1018,8 @@ int main (int argc, const char** argv) { // +-------------------+-----------+---------------+-------+-------+ // | timestamp | event | delta | retval| arg0 | // +-------------------+-----------+---------------+-------+-------+ - // 20 12 8 8 16 - + // 20 12 8 8 16 + uint64 t = traceblock[i] >> 44; // Timestamp uint64 n = (traceblock[i] >> 32) & 0xfff; // event number uint64 arg = traceblock[i] & 0x0000ffff; // syscall/ret arg/retval @@ -993,13 +1034,13 @@ int main (int argc, const char** argv) { // Sign extend optimized retval [-128..127] from 8 bits to 16 retval = (uint64)(((int64)(retval << 56)) >> 56) & 0xffff; if (verbose) { - fprintf(stdout, - "%% [%d,%d] %05llx %03llx %04llx %04llx = %lld %lld %lld, %lld %lld %02x\n", + fprintf(stdout, + "%% [%d,%d] %05llx %03llx %04llx %04llx = %lld %lld %lld, %lld %lld %02x\n", blocknumber, i, - (traceblock[i] >> 44) & 0xFFFFF, - (traceblock[i] >> 32) & 0xFFF, - (traceblock[i] >> 16) & 0xFFFF, - (traceblock[i] >> 0) & 0xFFFF, + (traceblock[i] >> 44) & 0xFFFFF, + (traceblock[i] >> 32) & 0xFFF, + (traceblock[i] >> 16) & 0xFFFF, + (traceblock[i] >> 0) & 0xFFFF, t, n, delta_t, retval, arg, ipc); } @@ -1022,40 +1063,40 @@ int main (int argc, const char** argv) { // 2019.03.18 Go back to preserving KUTRACE_USERPID for eventtospan event = n; - + // Module does // delta_cycles = now - tb->prior_cycles; - // but records just the low 20 bits of now + // but records just the low 20 bits of now // We have to figure out here how to account for the low 20 bits wrapping: // prior = ppp.f8938 now = nnn.d6f66 delta = 001.de62e // prior + delta_lo = ppq.d6ff6 but (ppq.d6ff6 - ppp.f8938 fits in 20 bits, so would not have generated a tsdelta // prior + delta = ppr.d6ff6 - + /* - * In recording a trace event, it is possible for an interrupt to happen after + * In recording a trace event, it is possible for an interrupt to happen after * KUtrace code takes the event timestamp and before it claims the storage location. - * In this case, the interupt handling will recursively record several events + * In this case, the interupt handling will recursively record several events * before returning to the original KUtrace path, which then claims a location * and stores the original event with its earlier timestamp. This is called a * "late store." When that happens, the reconstruciton in rawtoevent needs to * decide whether time went forward by almost the entire 20-bit wraparound * period, or went backward by some amount. - * + * * To resolve this ambiguity, we declare that a time gap of 7/8 of the wraparound * period is forward time and the high 1/8 is backward time associated with an * otherwise undetectable backward time. - * + * * To mark forward time in that 1/8 (and above), we add a TSDELTA entry to the - * trace. The exact compare for late store must be identical in kutrace_mod.c + * trace. The exact compare for late store must be identical in kutrace_mod.c * and in rawtoevent.cc. - * + * */ // If TSDELTA entry, increment the prepend value. // argall has the time difference between this entry and previous one, // in units of timestamp ticks (10-20nsec). - // If time goes backward a little, difference will be large, otherwise it will + // If time goes backward a little, difference will be large, otherwise it will // be a small number of millions. // A threshold of 2,000,000,000 is good for separating large, which we ignore if (n == KUTRACE_TSDELTA) { @@ -1072,7 +1113,7 @@ int main (int argc, const char** argv) { uint64 oldfull = (prepend | prior_t); // Old prepend old t uint64 newfull = oldfull + (0xFFFFFFFF00000000LLU | argall); // sign extend arg - // Use newfull, but do not update prepend. Doing so would ... + // Use newfull, but do not update prepend. Doing so would ... prepend = newfull & ~0xfffffLLU; t = newfull & 0xfffffLLU; prior_t = t; @@ -1086,14 +1127,14 @@ int main (int argc, const char** argv) { } } - + // tfull is increments of cycles from the base minute for this trace uint64 tfull = prepend | t; prior_t = t; // nsec10 is increments of 10ns from the base minute. - // For a trace starting at 50 seconds into a minute and spanning 99 seconds, - // this reaches 14,900,000,000 which means the + // For a trace starting at 50 seconds into a minute and spanning 99 seconds, + // this reaches 14,900,000,000 which means the // base minute + 149.000 000 00 seconds. More than 32 bits. uint64 nsec10 = CyclesToNsec10(tfull, params); uint64 duration = 0; @@ -1106,7 +1147,7 @@ int main (int argc, const char** argv) { else {deferred_rpcid0 = true;} } - // Pick out any name definitions + // Pick out any name definitions if (is_namedef(n)) { has_arg = true; // We have a name or other variable-length entry @@ -1143,14 +1184,14 @@ int main (int argc, const char** argv) { if (!is_timepair(n)) { memset(tempstring, 0, 64); memcpy(tempstring, &traceblock[i + 1], (len - 1) * 8); - + if (is_pidnamedef(n)) { // FreeBSD has multiple idle threads named idle:xxx, with different PID numbers // Map all of these to pid 0 name -idle-, remembering them FixupIdlePid(&arg, tempstring, &idle_pids); nameinsert = PidToEvent(arg); // Processes 0..64K } - + // Remember the name, except throw away the empty name string name = string(tempstring); if (is_modelnamedef(n)) { @@ -1178,16 +1219,16 @@ int main (int argc, const char** argv) { extra_word = true; continue; } - + if (is_cpu_description(n)) { // Just pass it on to eventtospan - OutputEvent(stdout, nsec10, 1, event, current_cpu, + OutputEvent(stdout, nsec10, 1, event, current_cpu, 0, 0, argall, 0, 0, ""); } if (keep_just_names) {continue;} //======================================================================== - // Name definitions above skip this code, so do not affect lo/hi + // Name definitions above skip this code, so do not affect lo/hi if (lo_timestamp > nsec10) {lo_timestamp = nsec10;} // stats if (hi_timestamp < nsec10) {hi_timestamp = nsec10;} // stats @@ -1251,21 +1292,21 @@ int main (int argc, const char** argv) { // +-----------+---+-----------------------------------------------+ // | event |///| PC | // +-----------+---+-----------------------------------------------+ - // 12 4 48 + // 12 4 48 // (2) Current scaffolding // +-------------------+-----------+---------------+-------+-------+ // | timestamp | event | zeros | arg0 | // +-------------------+-----------+---------------+-------+-------+ // | PC | // +---------------------------------------------------------------+ - // 64 + // 64 // Just deal with form (2) right now // // 2021.04.05 We now include the CPU frequency sample as arg0 in this entry if nonzero. // Extract it as a separate KUTRACE_PSTATE event. - // Strictly speaking, the event number for PC_TEMP should be 0x121 to signify + // Strictly speaking, the event number for PC_TEMP should be 0x121 to signify // two words, but it is in fact just 0x101. - // + // if (is_pc_sample(n)) { has_arg = true; extra_word = true; @@ -1274,7 +1315,7 @@ int main (int argc, const char** argv) { // Change PC_TEMP to either kernel or user sample address event = n = (pc_sample & 0x8000000000000000LLU) ? KUTRACE_PC_K : KUTRACE_PC_U; - // The PC sample is generated after the local_timer interrupt, but we really + // The PC sample is generated after the local_timer interrupt, but we really // want its sample time to be just before that interrupt. We move it back here. if (prior_timer_irq_nsec10[current_cpu] != 0) { nsec10 = prior_timer_irq_nsec10[current_cpu] - 1; // 10 nsec before timer IRQ @@ -1284,15 +1325,15 @@ int main (int argc, const char** argv) { // This is used for drawing color // If addrtoline is used later, reset arg retval = 0; - ipc = 0; + ipc = 0; char temp_hex[24]; sprintf(temp_hex, "PC=%012llx", pc_sample); // Normally 48-bit PC - name = string(temp_hex); + name = string(temp_hex); // Output the frequency event first if nonzero - if (0 < freq_mhz) { - OutputEvent(stdout, nsec10, 1, KUTRACE_PSTATE, current_cpu, - current_pid[current_cpu], current_rpc[current_cpu], + if (0 < freq_mhz) { + OutputEvent(stdout, nsec10, 1, KUTRACE_PSTATE, current_cpu, + current_pid[current_cpu], current_rpc[current_cpu], freq_mhz, 0, 0, "-freq-"); ++event_count; // stats } @@ -1350,7 +1391,7 @@ int main (int argc, const char** argv) { // +-------------------+-----------+-------------------------------+ // | timestamp | event | arg | // +-------------------+-----------+-------------------------------+ - // 20 12 32 + // 20 12 32 if (is_mark_abc(n)) { has_arg = true; // Include the marker label string, from all 32 bits af argument @@ -1362,15 +1403,15 @@ int main (int argc, const char** argv) { // Debug output. Raw 64-bit event in hex if (hexevent) { - fprintf(stdout, "%05llx.%03llx ", - (traceblock[entry_i] >> 44) & 0xFFFFF, + fprintf(stdout, "%05llx.%03llx ", + (traceblock[entry_i] >> 44) & 0xFFFFF, (traceblock[entry_i] >> 32) & 0xFFF); if (has_arg) { - fprintf(stdout, " %04llx%04llx ", - (traceblock[entry_i] >> 16) & 0xFFFF, + fprintf(stdout, " %04llx%04llx ", + (traceblock[entry_i] >> 16) & 0xFFFF, (traceblock[entry_i] >> 0) & 0xFFFF); } else { - fprintf(stdout, " "); + fprintf(stdout, " "); } } @@ -1382,24 +1423,24 @@ int main (int argc, const char** argv) { // If event is syscall/ret 511 and no name, then we have a trace file // using 511 for -sched- mismatched with a more recent kutrace_control_names.h // Fix them right here - if (event == 0x9ff) {strcpy(temp, "-sched-");} - if (event == 0xdff) {strcpy(temp, "-sched-");} - if (event == 0xbff) {strcpy(temp, "/-sched-");} - if (event == 0xfff) {strcpy(temp, "/-sched-");} + if (event == 0x9ff) {strcpy(temp, "-sched-");} + if (event == 0xdff) {strcpy(temp, "-sched-");} + if (event == 0xbff) {strcpy(temp, "/-sched-");} + if (event == 0xfff) {strcpy(temp, "/-sched-");} name = string(temp); } // Output the trace event // Output format: // time dur event cpu pid rpc arg retval IPC name(event) - OutputEvent(stdout, nsec10, duration, event, current_cpu, - current_pid[current_cpu], current_rpc[current_cpu], + OutputEvent(stdout, nsec10, duration, event, current_cpu, + current_pid[current_cpu], current_rpc[current_cpu], arg, retval, ipc, name.c_str()); // Update some statistics ++event_count; // stats if (hexevent && extra_word) { - fprintf(stdout, " %16llx\n", traceblock[entry_i + 1]); + fprintf(stdout, " %16llx\n", traceblock[entry_i + 1]); } // Do deferred switch to rpcid = 0 @@ -1420,14 +1461,14 @@ int main (int argc, const char** argv) { fclose(f); - // Pass along the OR of all incoming raw traceblock flags, in particular IPC_Flag + // Pass along the OR of all incoming raw traceblock flags, in particular IPC_Flag fprintf(stdout, "# ## FLAGS: %d\n", all_flags); // Reduce timestamps to start at no more than 60 seconds after the base minute. // With wraparound tracing, we don't know the true value of lo_timestamp until - // possibly the very last input block. So we offset here. The output file already - // has the larger times so eventtospan will reduce those. + // possibly the very last input block. So we offset here. The output file already + // has the larger times so eventtospan will reduce those. uint64 extra_minutes = lo_timestamp / 6000000000l; uint64 offset_timestamp = extra_minutes * 6000000000l; lo_timestamp -= offset_timestamp; @@ -1442,18 +1483,18 @@ if (hi_seconds > 999.0) {fprintf(stderr,"BUG: hi_seconds > 999.0 %12.8f\n", hi_s hi_seconds = 1.0; total_seconds = 1.0; // avoid zdiv } - // Pass along the time bounds + // Pass along the time bounds fprintf(stdout, "# ## TIMES: %10.8f %10.8f\n", lo_seconds, hi_seconds); uint64 total_cpus = unique_cpus.size(); if (total_cpus == 0) {total_cpus = 1;} // avoid zdiv - - //fprintf(stderr, "rawtoevent(%3.1fMB):\n", blocknumber / kTraceBlocksPerMB); - //fprintf(stderr, + + //fprintf(stderr, "rawtoevent(%3.1fMB):\n", blocknumber / kTraceBlocksPerMB); + //fprintf(stderr, // " %s, %lld events, %lld CPUs (%1.0f/sec/cpu)\n", // FormatSecondsDateTime(base_usec_timestamp / 1000000), - // event_count, total_cpus, (event_count / total_seconds) /total_cpus); + // event_count, total_cpus, (event_count / total_seconds) /total_cpus); uint64 total_irqs = events_by_type[5] + events_by_type[7]; uint64 total_traps = events_by_type[4] + events_by_type[6]; uint64 total_sys64 = events_by_type[8] + events_by_type[9] + @@ -1462,14 +1503,14 @@ if (hi_seconds > 999.0) {fprintf(stderr,"BUG: hi_seconds > 999.0 %12.8f\n", hi_s events_by_type[14] + events_by_type[15]; //fprintf(stderr, " %lld IRQ, %lld Trap, %lld Sys64, %lld Sys32, %lld Mark\n", - // total_irqs, total_traps, total_sys64, total_sys32, total_marks); - //fprintf(stderr, " %lld PIDs, %lld context-switches (%1.0f/sec/cpu)\n", + // total_irqs, total_traps, total_sys64, total_sys32, total_marks); + //fprintf(stderr, " %lld PIDs, %lld context-switches (%1.0f/sec/cpu)\n", // (u64)unique_pids.size(), ctx_switches, (ctx_switches / total_seconds) / total_cpus); - fprintf(stderr, "rawtoevent: %llu events\n", event_count); - fprintf(stderr, - " %5.3f elapsed seconds: %5.3f to %5.3f\n", - total_seconds, lo_seconds, hi_seconds); + fprintf(stderr, "rawtoevent: %llu events\n", event_count); + fprintf(stderr, + " %5.3f elapsed seconds: %5.3f to %5.3f\n", + total_seconds, lo_seconds, hi_seconds); } diff --git a/postproc/remake.sh b/postproc/remake.sh old mode 100755 new mode 100644 index 244ab4a92015..efa7af049c2d --- a/postproc/remake.sh +++ b/postproc/remake.sh @@ -1,12 +1,9 @@ -#!/bin/sh -# -# Put in newer version of show_cpu.html template (in current directory) -# usage: remake foo.html produces foo_2.html -# -# The sed step turns one extremely long line into one with carriage returns after -# every closing bracket. -# +# Paste in new JavaScript template for a KUtrace HTML file +# $1 is foo.html, output is foo_2.html +# uses unmakeself, makeself, and ./unmake show_cpu.html in current directory +# dick sites 2022.06.28 fname=$1 -echo ${fname%.html}_2.html cat $1 |./unmakeself |sed 's/\], /\],\n/g' |./makeself show_cpu.html > ${fname%.html}_2.html +echo " ${fname%.html}_2.html written" + diff --git a/postproc/show_cpu.html b/postproc/show_cpu.html index 7d40ab15262d..a7387f1f3648 100644 --- a/postproc/show_cpu.html +++ b/postproc/show_cpu.html @@ -1,13 +1,15 @@ - + - - + + + + @@ -384,8 +386,8 @@ // Global constants // //----------------------------------------------------------------------------// -// Version control for this file -var script_edit_date = "(ver2023-07-31)"; // Shown in secondary menu for identification +// Version control for this HTML file +var script_edit_date = "(ver2024-07-14)"; // Shown in secondary menu for identification var book = false; // Set true to get defaults for creating book diagrams @@ -408,7 +410,7 @@ const kNetworkMbPerSec = 1000; // Default: 1 Gb/s -// Little usage hints to display +// Little usage hints to display const kUsageText = "Scroll wheel to zoom. Click-drag to pan. " + "Shift-click-unclick to annotate. " + "Shift-click-unshift to annotate and keep. " + @@ -430,6 +432,7 @@ [999.0, 0, 0, 0, 0, 0, 0, 0, 0, "x"]] }; +const ipibase = -7; const dotsbase = -6; const annotbase = -5; const calloutbase = -4; @@ -438,6 +441,7 @@ const bracketbase = -1; const msgrxbase = 0x00204; // Complete messages const msgtxbase = 0x00205; +const send_ipi = 0x00207; const freqbase = 0x00209; const markbase = 0x0020A; const pktrxbase = 0x00214; // Individual packets seen by kernel tcp/udp @@ -445,6 +449,7 @@ const userrxbase = 0x00216; // Individual packets seen by user code const usertxbase = 0x00217; const queued = 0x0021A; // RPC queued +const mon_store = 0x0021E; // Monitor_store or ipi wakeup const lockbase = 0x00282; const pcbase = 0x00280; // PC samp 280=u, 281=k const waitbase = 0x00300; @@ -463,6 +468,9 @@ const searchlistMax = 20; const searchlistMaxDisplay = 7; +const NSEC10 = 0.000000010; // 10 nanoseconds + + // Pixel-banging in layout const min_txt_px = 12; // Minimum font size px for annotation text lines @@ -478,12 +486,20 @@ // This very roughly approximates overlapped multiple outstanding misses. // The table here maps bucket number 0..15 to nanoseconds of memory activity. // These values are extremely rough and only given to two digits. +//const kLlcNsec = [ +// 0, 100, 450, 820, 1500, 2700, 5000, 9000, +// 16000, 30000, 54000, 98000, 180000, 320000, 590000, 1100000 +//ss]; + +// The above seem too large (exceeding actual duration too often). +// Made them ~40% smaller above 16 misses 2024.04.01 const kLlcNsec = [ - 0, 100, 450, 820, 1500, 2700, 5000, 9000, - 16000, 30000, 54000, 98000, 180000, 320000, 590000, 1100000 + 0, 100, 400, 700, 900, 1600, 3000, 5400, + 9600, 18000, 32000, 59000, 110000, 190000, 350000, 660000 ]; + //----------------------------------------------------------------------------// // Global constant colors // //----------------------------------------------------------------------------// @@ -717,7 +733,9 @@ var timerHandle; // For fewer redraws of events (faster with big pan/zoom) -var ipc_really_llc = false; // Reset on data load if 4-bit IPC field is really LLC misses +var has_ipc = false; +var has_llc = false; +var has_both = false; const prefixCpu = 0; const prefixPid = 1; @@ -759,7 +777,7 @@ const ovhd_value_max = 1; // 0: none, 1: show overhead time const lock_value_max = 2; // 0: none, 1: bold, 2: show lock-held lines const cb_value_max = 1; // 0: normal colors, 1: color-blind colors -const samp_value_max = 1; // 0: none, 1: show PC samples +const samp_value_max = 2; // 0: none, 1: show idle PC samples, 2: show PC samples const searchnot_value_max = 1; // 0: normal, 1: invert match const textmultiplier_value_max = 3; // 0: normal, 1: 0.75x, 2: 1.5x, 3: 1.25x const basetime0_value_max = 1; // 0: normal, 1: relative to row start, /* 2: summary_h, 3: summary_v */ @@ -810,7 +828,7 @@ //const llcvalues = ["0", "64B", "128", "256", "512", "1KB", "2KB", "4KB", // "8KB", "16K", "32K", "64K", "128K", "256K", "512K", "1M+"]; // 2023.06.25 encoding -const llcvalues = ["0", "64+", "512", "1KB", "2KB", "4KB", "8KB", "16K", +const llcvalues = ["0", "64", "512", "1KB", "2KB", "4KB", "8KB", "16K", "32K", "64K", "128K", "256K", "512K", "1M", "2M", "4M+"]; const ipc_color = ["#555555", "#0000FF", "#0000FF", "#AA0000"]; @@ -1095,6 +1113,7 @@ ////basetime0_value: 0, hilite_evnum : 0, // Shift-RIGHT-click on an event highlights all of them + hilite_evnum2 : 0, // previous highlight, so youcan have two at once onscreen just_reset: true, // Controls initial display of kernel and CPU model // List of items that are annotated on screen @@ -1448,11 +1467,12 @@ //// state.hilite_event_array = []; hilite_event_set.clear(); - state2.rowToHilite.fill(0); + state2.rowToHilite.fill(false); state.annotated_d = []; state2.annotated_one_d = -1; state.hilite_evnum = 0; + state.hilite_evnum2 = 0; state2.minmax_units_value = 1; // usec state.just_reset = true; @@ -1534,6 +1554,16 @@ // placeholder for now function res(d) {return -1;} +// Fetch IPC, from packed two-bit IPC&LLC if both +// Top 2 bits are IPC: 0 4 8 12. Map into 1 5 9 13 +function realipc(d) {return has_both ? (ipc(d) & 0x0c) + 1 : ipc(d);} + +// Fetch LLC, from packed two-bit IPC&LLC if both +//// Bottom twobits are LLC: 0 1 2 3. Map into 2 6 10 14 +// Bottom two bits are LLC: 0 1 2 3. Map into 0 2 5 8 +const kLlcSmall = [0,2,5,8]; +function realllc(d) {return has_both ? kLlcSmall[ipc(d) & 0x03] : ipc(d);} + function tsend(d) {return d[0] + d[1];} function tsrelend(d) {return (d[0] - xaxisfmt.basetime) + d[1];} @@ -1602,6 +1632,7 @@ function is_bracket(d) {return ev(d) == -1;} function is_oval(d) {return ev(d) == -2;} function is_arc(d) {return ev(d) == -3;} +function is_ipi(d) {return ev(d) == -7;} function is_callout(d) {return ev(d) == -4;} function is_annot(d) {return ev(d) == annotbase;} function is_dots(d) {return ev(d) == dotsbase;} @@ -1640,6 +1671,7 @@ function is_bracket_ev(ev) {return ev == -1;} function is_oval_ev(ev) {return ev == -2;} function is_arc_ev(ev) {return ev == -3;} +function is_ipi_ev(ev) {return ev == -7;} function is_callout_ev(ev) {return ev == -4;} function is_overlay_ev(ev) {return (ev < 0) && !is_arc_ev(ev);} function is_any_overlay_ev(ev) {return (ev < 0);} @@ -1923,6 +1955,9 @@ // Round to one decimal place function Rnd1(x) {return Math.round(x * 10) / 10;} +// Round to two decimal places +function Rnd2d(x) {return Math.round(x * 100) / 100;} + // Round to multiple of 10 function Rnd10(x) {return Math.round(x / 10) * 10;} @@ -1964,19 +1999,24 @@ } +// Draw an IPC or LLC triangle +// Used for timespans, but also for drawing legends +// If ipcd is >=0, draw as IPC, else draw as LLC of ipcd+16 function draw_ipcmark(dotg, centerx, centery, size, ipcd, legend) { + var ipcllcd = ipcd; + if (ipcd < 0) {ipcllcd += 16;} var xx = -size; var yy = size / 5; var offset = size * 3 / 4; var strokewidth = Rnd1(size / 20); - var rad = Math.PI - ((ipcd * Math.PI) / 16); + var rad = Math.PI - ((ipcllcd * Math.PI) / 16); // Speedometer angle var sinangle = Math.sin(rad); var cosangle = Math.cos(rad); var path; // Offset and Rotate the center centerx2 = centerx + (offset * cosangle); centery2 = centery + (offset * -sinangle); - if ((ipcd & 1) == 0) { + if ((ipcllcd & 1) == 0) { // draw plain triangle path = "M" + (centerx2) + "," + (centery2) + " L" + (centerx2 + (xx * cosangle) + (yy * -sinangle)) + "," + @@ -1997,28 +2037,38 @@ dotg.append("path") .attr("class", legend ? "ipcmarkl" :"ipcmark") .attr("d", path) - .attr("fill", ipc_really_llc ? "#FFC080" : "#FFFFFF") // white (orangle llc) + .attr("fill", (ipcd < 0) ? "#FFC080" : "#FFFFFF") // white (orangle llc) .attr("stroke-width", strokewidth) - .attr("stroke", ipc_color[ipcd >> 2]); // gray/blue/red + .attr("stroke", ipc_color[ipcllcd >> 2]); // gray/blue/red +} + +// Rough duration of memory activity (seconds) +function memdur(ipcd) { + return kLlcNsec[ipcd] / 1000000000.0; } // Draw a line centered at centerx roughly indicating memory-bus busy -function draw_llcmark(dotg, centerx, centery, size, d, legend) { - var ipcd = ipc(d); - if (ipcd == 0) {return;} +// Note that 5th arg is event d, not just its 4-bit IPC/LLC value +function draw_llcmarks(dotg, centerx, centery, size, d, legend) { + var ipcd = realllc(d); + // Draw line underneath the timespan // Rough second duration of memory activity, but <= the timespan duration - 60ns - var duration = kLlcNsec[ipcd] / 1000000000.0; + var duration = memdur(ipcd); var toobig = false; if (dur(d) < duration) { duration = dur(d) - 0.000000060; toobig = true; } + + // Put in small speedometer triangle. ipcd-16 marks as LLC colors, not IPC + draw_ipcmark(dotg, centerx, centery, size * 0.75, ipcd-16, legend); + // seconds duration to pixels var llcpx = Rnd5(duration / xsecperpix); if (llcpx < 2) {return;} - - var offset = size * 0.833; + + var offset = size * 0.833; // Draw line at 5/6 of row size below centerline var strokewidth = Rnd1(size / 20); path = "M" + (centerx - llcpx/2) + "," + (centery + offset) + " h" + (llcpx); dotg.append("path") @@ -2027,8 +2077,6 @@ .attr("stroke-width", strokewidth) .attr("stroke", toobig ? "#FF0080" : "#FF8000"); // orange (red if too big) - // Put in small speedometer arrow - draw_ipcmark(dotg, centerx, centery, size * 0.75, ipc(d), legend); } @@ -2045,7 +2093,7 @@ } -function draw_ipclegend(lx, ly, lheight, lwidth) { +function draw_ipcllclegend(lx, ly, lheight, lwidth) { d3.selectAll(".ipclegend").remove(); svgdotg.append("rect") .attr("class", "ipclegend") @@ -2062,6 +2110,73 @@ ////var txtmul = textmultiplier_tbl[state.textmultiplier_value]; var txtmul = 1.0; + // Draw combined IPC and LLC legend + // When combined, there are just 2 bits for IPC and two for LLC, packed into 4 bits + if (has_both) { + svgdotg.append("text") + .attr("class", "ipclegend") + .attr("transform", "translate(" + (centerx + 8) + "," + + (centery + 2) + ")scale(1,1)") + .attr("font-size", textsize.smalltick + "px") + .attr("fill", "black") + .attr("font-family", "sans-serif") + .style("text-anchor", "left") + .text("IPC"); + + // Only draw four IPC labels: 1, 5, 9, 13 + for (var i = 0; i < 4; ++i) { + var fulli = i*4 + 1; + var centerx_i = centerx + ipctextoffset[i >> 2] + 10; + var centery_i = centery + (i + (i >> 2) + 1) * lheight / 20; + draw_ipcmark(svgdotg, centerx, centery_i, 20 * txtmul, fulli, true); + + svgdotg.append("text") + .attr("class", "ipclegend") + .attr("transform", "translate(" + (centerx_i) + "," + + (centery_i + 2) + ")scale(1,1)") + .attr("font-size", textsize.smalltick + "px") + .attr("fill", "black") + .attr("font-family", "sans-serif") + .style("text-anchor", "left") + .text(ipcvalues[fulli]); + } + + //// Now draw four LLC labels: 2, 6, 10, 14 + // Now draw four LLC labels: 0, 1, 3, 7 + var lowery = centery + (4 + (4 >> 2) + 1) * lheight / 20; + svgdotg.append("text") + .attr("class", "ipclegend") + .attr("transform", "translate(" + (centerx + 8) + "," + + (lowery + 2) + ")scale(1,1)") + .attr("font-size", textsize.smalltick + "px") + .attr("fill", "black") + .attr("font-family", "sans-serif") + .style("text-anchor", "left") + .text("Miss"); + + for (var i = 0; i < 4; ++i) { + var fulli = kLlcSmall[i]; + var centerx_i = centerx + ipctextoffset[i >> 2] + 10; + var centery_i = lowery + (i + (i >> 2) + 1) * lheight / 20; + draw_ipcmark(svgdotg, centerx, centery_i, 20 * txtmul, fulli-16, true); + + svgdotg.append("text") + .attr("class", "ipclegend") + .attr("transform", "translate(" + (centerx_i) + "," + + (centery_i + 2) + ")scale(1,1)") + .attr("font-size", textsize.smalltick + "px") + .attr("fill", "black") + .attr("font-family", "sans-serif") + .style("text-anchor", "left") + .text(llcvalues[fulli]); + } + + + return; + } + + // Draw either IPC or LLC legend + var doing_llc = has_llc & !has_ipc; svgdotg.append("text") .attr("class", "ipclegend") .attr("transform", "translate(" + (centerx + 8) + "," + @@ -2070,14 +2185,14 @@ .attr("fill", "black") .attr("font-family", "sans-serif") .style("text-anchor", "left") - .text(ipc_really_llc ? "Miss" : "IPC"); + .text(doing_llc ? "Miss" : "IPC"); var iincr = (txtmul >= 1.5) ? 2 : 1; for (var i = 0; i < 16; i += iincr) { var centerx_i = centerx + ipctextoffset[i >> 2] + 10; var centery_i = centery + (i + (i >> 2) + 1) * lheight / 20; - draw_ipcmark(svgdotg, centerx, centery_i, 20 * txtmul, i, true); + draw_ipcmark(svgdotg, centerx, centery_i, 20 * txtmul, doing_llc ? i-16 : i, true); svgdotg.append("text") .attr("class", "ipclegend") @@ -2087,7 +2202,7 @@ .attr("fill", "black") .attr("font-family", "sans-serif") .style("text-anchor", "left") - .text(ipc_really_llc ? llcvalues[i] : ipcvalues[i]); + .text(doing_llc ? llcvalues[i] : ipcvalues[i]); } } @@ -2222,6 +2337,7 @@ state.annotated_d = []; state2.annotated_one_d = -1; state.hilite_evnum = 0; + state.hilite_evnum2 = 0; dont_annotate = []; dont_annotate[0x10000] = true; // Never label -idle- event @@ -2235,7 +2351,7 @@ var d = data.events[i]; var gray = !eventHilite(i); var skip = gray || dont_annotate[ev(d)] || is_mark(d) || is_pc_samp(d) || - is_pstate(d) || is_arc(d) || is_callout(d) || is_rpcpkt(d) || + is_pstate(d) || is_arc(d) || is_ipi(d) || is_callout(d) || is_rpcpkt(d) || !strictly_startsonscreen_x(d) || !onscreen_all_y(d); if (skip) {continue;} // PC samples use right end, not left @@ -2287,23 +2403,30 @@ } } -function draw_one_ipc(d, x0, y0, e_height) { +function draw_one_ipcllc(d, x0, y0, e_height) { var do_kernel = (state2.ipc_value & 2) != 0; var do_user = (state2.ipc_value & 1) != 0; // Since IPC for idle is always 0, omit it to avoid clutter if ((do_kernel && is_kernel(d)) || (do_user && is_user(d))) { var centerx = x0; var centery = y0; - var ipcd = ipc(d); - if(ipc_really_llc) { - draw_llcmark(innersvgdotg, centerx, centery, e_height, d, false); - } else { - draw_ipcmark(innersvgdotg, centerx, centery, e_height, ipcd, false); - } + if (has_ipc) {draw_ipcmark(innersvgdotg, centerx, centery, e_height, realipc(d), false);} + if (has_llc) {draw_llcmarks(innersvgdotg, centerx, centery, e_height, d, false);} } } +// Cycyle through drawing mark_a/c and/or mark_b/d function draw_one_mark(row, d, x0, y0) { + var draw_bd = (state2.marks_value & 1) != 0; + var draw_ac = (state2.marks_value & 2) != 0; + var is_ac = (ev(d) == 0x20A) || (ev(d) == 0x20C); + var is_bd = (ev(d) == 0x20B) || (ev(d) == 0x20D); + if ((is_ac && draw_ac) || (is_bd && draw_bd)) { + draw_mark(row, d, x0, y0); + } +} + +function draw_one_mark_old(row, d, x0, y0) { var draw_numeric = (state2.marks_value & 1) != 0; var draw_text = (state2.marks_value & 2) != 0; if ((draw_text && ev(d) != 0x20D) || (draw_numeric && ev(d) == 0x20D)) { @@ -2469,10 +2592,8 @@ return xyresult; } -// Draw wakeup arc from x0 y0 to x1 y1 -function draw_arc(d, x0, y0, x1, y1) { - if (state2.arcs_value == 0) {return;} - +// Set up arc path without drawing it yet +function make_arc_path(x0, y0, x1, y1) { var left_x = x0; var right_x = x1; @@ -2483,7 +2604,7 @@ var bold = (state2.arcs_value == 1); var short_span = ((right_x - left_x) < (region3width * arcfraction)); var long_window = (xdomainwidth > 0.005); - if (short_span && long_window && !force_annot && !bold && (state2.hack_value == 0)) {return;} + if (short_span && long_window && !force_annot && !bold && (state2.hack_value == 0)) {return "";} var left_y = y0; var right_y = y1; @@ -2513,14 +2634,46 @@ Rnd1(mid_y + ctl_rot.y) + "," + Rnd1(right_x) + "," + Rnd1(right_y) + " l" + Rnd1(arrow_rot.x) + "," + Rnd1(arrow_rot.y); + return arc_path; +} + +// Draw wakeup arc from x0 y0 to x1 y1 +function draw_arc_wake(x0, y0, x1, y1) { + if (state2.arcs_value == 0) {return;} + + var arcpath = make_arc_path(x0, y0, x1, y1); + if (arcpath == "") {return;} + + var bold = (state2.arcs_value == 1); innersvgdotg.append("path") .attr("class", "graphlinex") - .attr("d", arc_path) + .attr("d", arcpath) .attr("fill", "none") .attr("stroke-width", bold ? 3.0 : 2.0) .attr("stroke-dasharray", bold ? [4,4] : [3,3]) .attr("stroke", bold ? "#0055AA" : "#0080FF"); // dark/light Blue-green -// .attr("stroke", "#AA00FF"); +} + +// Draw IPI arc from x0 y0 to x1 y1 +function draw_arc_ipi(x0, y0, x1, y1) { + // Only show the IPI arcs if bold is set + if (state2.arcs_value != 1) {return;} + + var arcpath = make_arc_path(x0, y0, x1, y1); + if (arcpath == "") {return;} + + innersvgdotg.append("path") + .attr("class", "graphlinex") + .attr("d", arcpath) + .attr("fill", "none") + .attr("stroke-width", 2) + .attr("stroke-dasharray", [9,3]) + .attr("stroke", "#C0C0C0"); // light gray +} + +function draw_arc(d, x0, y0, x1, y1) { + if (is_arc(d)) {draw_arc_wake(x0, y0, x1, y1);} + else if (is_ipi(d)) {draw_arc_ipi(x0, y0, x1, y1);} } // Names for things... @@ -2669,10 +2822,10 @@ draw_dots(d, left_t, right_t); } else if (is_callout(d)) { draw_callout(d, left_t, right_t); - } else if(!gray && is_arc(d)) { + } else if (!gray && (is_arc(d) || is_ipi(d))) { // SOON draw_arc(d, left_t, right_t); // Arc starts at and goes to , where - // Arc starts at and goes to , where + // Arc 2 starts at and goes to , where // cpu2 is stored in the arg0 field, pid2 in the ret field var x0 = x_zoomed(ts(d)); var x1 = x_zoomed(tsend(d)); @@ -2687,9 +2840,9 @@ var e_height1 = perTracksize[t_height1].eventheight; var y1 = y_zoomed(track1) + perTracksize[t_height1].eventoffset - (e_height1 / 2); var valid_arc = (0 <= row0) && (0 <= row1) && (t_height0 != 0)&& (t_height1 != 0); - if (valid_arc) {draw_arc( d, x0, y0, x1, y1);} + if (valid_arc) {draw_arc(d, x0, y0, x1, y1);} - // Draw pid to pid2 arc if PIDs are being shown and both rows are valid + // Also draw pid to pid2 arc if PIDs are being shown and both rows are valid if (state2.groupcompress[1] == 0) {return;} var row2 = getrow_pid(d, prefixPid); var row3 = getrow_pid2(d, prefixPid); @@ -2823,7 +2976,8 @@ // Draw one PC sample function draw_pc_samp(d, x0, y0, x1, gray, height) { if (state2.samp_value <= 0) {return;} // PC samples off or unavailable - if (pid(d) == 0) {return;} // Event is pc_samp, but pid 0 = idle + if ((state2.samp_value == 2) && (pid(d) == 0)) {return;} // Event is pc_samp, but pid 0 = idle + if ((state2.samp_value == 1) && (pid(d) != 0)) {return;} // Event is pc_samp, and pid 0 = idle var samp_px = x1 - x0; if (samp_px < 2) {return}; // Avoid short pixel clutter if ((3 * height) < 0.5) {return;} // Avoid too thin to see @@ -3382,7 +3536,7 @@ // Layer on top the IPC triangle if (!gray && (0 < state2.ipc_value)) { - draw_one_ipc(d, (x0 + x1) / 2, y0, e_height * 0.67); + draw_one_ipcllc(d, (x0 + x1) / 2, y0, e_height * 0.67); } } @@ -3543,7 +3697,12 @@ function eventHilite(i) { var d = data.events[i]; if ((0 < state.fade) && is_kui(d)) {return false;} - if (state.hilite_evnum != 0) {return (ev(d) == state.hilite_evnum);} + if (state.hilite_evnum != 0) { + // One or two right-clicked events + if ((state.hilite_evnum != 0) && (ev(d) == state.hilite_evnum)) {return true;} + if ((state.hilite_evnum2 != 0) && (ev(d) == state.hilite_evnum2)) {return true;} + return false; + } if (hilite_event_set.size == 0) {return true;} return hilite_event_set.has(i); } @@ -3551,7 +3710,7 @@ // Full height if in set, treating empty set as highlight-all function rowFullsize(row) { - if (state2.grouphashilite[getGroup(row)] == 0) return true; + if (state2.grouphashilite[getGroup(row)] == false) return true; return state2.rowToHilite[row]; } @@ -3643,6 +3802,7 @@ } // Accumulate all on-screen events that match hilite_evnum + // Do not count secondary evnum2 matches // (follow logic in annotatesearch2) if ((ev(d) == state.hilite_evnum) && strictly_startsonscreen_x(d) && onscreen_all_y(d)) { @@ -3872,13 +4032,36 @@ //console.log("end do_zoomed_y ----------"); } +function CheckHilites(label, hilite) { + var ok = true; + for (var i = 0; i < hilite.length; ++i) { + if (1 < hilite[i]) {ok = false;} + if (hilite[i] < 0) {ok = false;} + } + if (!ok) {console.log(label, "FAIL", hilite);} +} + +// Expecting two equal arrays +function CheckSame(a, b) { + if (a.length != b.length) { + console.log("CheckSame length mismatch:", a.length, b.length); + console.log(a, b); + return; + } + for (var i = 0; i < a.length; ++i) { + if (a[i] != b[i]) { + console.log("CheckSame element mismatch:", i, a[i], b[i]); + } + } +} + // Recalculate event highlights from just the highlighted rows function RecalcEventHilites() { hilite_event_set.clear(); for (var row = 0; row < sortNumSize; ++row) { if (state2.rowToHilite[row]) { - setEventHilites(row, 1); + setEventHilites(row, true); } } } @@ -3893,6 +4076,7 @@ // Recalculates globals derived from just-changed main state function RecalcDerivedState() { + CheckHilites("Recalc", state2.rowToHilite); calc_regionheightwidth(); currentcolor = (state2.cb_value == 0) ? normalcolor : colorblindcolor; RecalcEventHilites(); // from rowToHilite @@ -3928,7 +4112,7 @@ if (hilite[i] != 0) { InsertZerocount(zerocount, retval); zerocount = 0; - retval.push(hilite[i]); + retval.push(+hilite[i]); } else { ++zerocount; } @@ -3937,16 +4121,17 @@ return retval; } -// Replace values >= 2 with that many zero elements. Idempotent if already decompressed. +// Replace values >= 2 with that many false elements. Idempotent if already decompressed. function DecompressHilite(hilite) { var retval = []; for (var i = 0; i < hilite.length; ++i) { if (2 <= hilite[i]) { - for (var j = 0; j < hilite[i]; ++j) {retval.push(0);} + for (var j = 0; j < hilite[i]; ++j) {retval.push(false);} } else { - retval.push(hilite[i]); + retval.push(hilite[i] != 0); } } + CheckHilites("Decomp", retval); return retval; } @@ -3960,9 +4145,16 @@ } else { inval = stateobj; } - inval.rowToHilite = CompressHilite(inval.rowToHilite); + // NOTE: if the argument is state2,state2.rowToHilite is MODIFIED here ! + var temp = inval.rowToHilite; + var temp1 = CompressHilite(inval.rowToHilite); + var temp2 = DecompressHilite(temp); +CheckSame(temp, temp2); + + inval.rowToHilite = temp1; var retval = stringifyState(inval); //console.log("CompressStringify", retval); + inval.rowToHilite = temp; // Restore original return retval; } @@ -3976,7 +4168,7 @@ retval = stateobj; } retval.rowToHilite = DecompressHilite(retval.rowToHilite); -//console.log("DecompressUnstringify", retval); + //console.log("DecompressUnstringify", retval); return retval; } @@ -3988,7 +4180,9 @@ // After restoring state, put Sets and derived main state variables back function unpackState(savedstr) { +//console.log("unpackState", savedstr); state2 = DecompressUnstringify(savedstr); + CheckHilites("Unpack", state2.rowToHilite); RecalcDerivedState(); } @@ -4032,7 +4226,7 @@ function ZoomToLeftWidth(xleft, xwidth) { //console.log("ZoomToLeftWidth", xleft, xwidth); // Avoid zdiv if tinier than 10 nsec full screen width - if (xwidth < 0.000000010) {xwidth = 0.000000010;} + if (xwidth < NSEC10) {xwidth =NSEC10;} // Calculate new scale based on desired width vs. scale=1.0 width // x is a function that maps times to pixels: @@ -4143,7 +4337,6 @@ ZoomToLeftWidth(target - sidewidth, 2 * sidewidth); } - const ten_nsec = 0.000000010; // Convert the current position and width into the nearest encompassing // value for SeekTime @@ -4153,7 +4346,7 @@ var ts_half_width = (realxright - realxleft) / 2; var center = realxleft + ts_half_width; - var atleast = ten_nsec; // There will be 2.5% slop on both ends in SeekTime + var atleast = NSEC10; // There will be 2.5% slop on both ends in SeekTime var i; // Round up here to 3% to make multiple @@'s stable for (i = 0; i < 8; ++i) { if (ts_half_width <= atleast * 5 * 1.03) {break;} @@ -4226,6 +4419,7 @@ state.annotated_d = []; state2.annotated_one_d = -1; state.hilite_evnum = 0; + state.hilite_evnum2 = 0; resetRotatingLabelk(); @@ -4239,8 +4433,19 @@ var d = data.events[i]; if(strictly_startsonscreen_x(d) && onscreen_all_y(d)) { // On screen var hit = (fullname(d, false).search(needle) >= 0); // Name match + // 2024.04.01 also match on ipc=xxx or llc=xxx if + // ipc(d) nonzero and item duration is > 10ns (skips markers, etc.) + // Note that this match is case-senstive and a regex, so use + // ipc=3\. to distinguish from ipc=3/8 + // or llc=64$ to distinguish from llc=64K + if ((ipc(d) > 0) && (dur(d) > NSEC10) && (needle[3] == '=')) { + var tmptext = ""; + if (has_ipc) {tmptext += " ipc=" + ipcvalues[realipc(d)];} + if (has_llc) {tmptext += " llc=" + llcvalues[realllc(d)];} + hit |= (tmptext.search(needle) >= 0); + } hit &= ((name(d)[0] != '-') || needle_hyphen); // But not initial hyphen unless in needle - ////hit |= (rpc(d).toString().search(needle) >= 0); // Or rpcid (not in fullname) + ////hit |= (rpc(d).toString().search(needle) >= 0); // Or rpcid (not in fullname) hit &= (mindurval <= dur(d)) && (dur(d) <= maxdurval); // And within duration range // Invert search match if state2.searchnot_value = true if (hit != state2.searchnot_value) { @@ -4604,6 +4809,9 @@ ]; // Create full event name +// short: name(arg) +// long, simple annot: name +// long, normal annot: name(arg)=ret function fullname(d, short) { var fulltext; var arg = arg0(d); @@ -4697,15 +4905,22 @@ } } -// Create complet text for d. Includes ipc/llc. +// xx.xxus fullname; dur ipc= llc= +// Create complete text for d. Includes ipc/llc value. function complete_text(d) { + // Diddle state2.annottype_value so e always see fsyscall arg/ret in fullname + // TODO: rationalize all the display choices + var temp = state2.annottype_value; + state2.annottype_value = 0; var fulltext = shortnum5(tsrel(d)) + " " + fullname(d, false) + "; " + shortnum(dur(d), data.thousandsX) + data.shortUnitsX; + state2.annottype_value = temp; if ((0 <= state2.ipc_value) && (is_executable(d))) { // available and real execution span - if (ipc_really_llc) { - fulltext += " llc=" + llcvalues[ipc(d)]; - } else { - fulltext += " ipc=" + ipcvalues[ipc(d)]; + if (has_ipc) { + fulltext += " ipc=" + ipcvalues[realipc(d)]; + } + if (has_llc) { + fulltext += " llc=" + llcvalues[realllc(d)]; } } return fulltext; @@ -4774,19 +4989,23 @@ if (rotate) {rotateRow(row, maxannot);} // Create text string + // short: fullname + // simple: fullname + // long: xx.xxus fullname ipc= llc= var timetxt = shortnum5(tsrel(d)); var fulltext = fullname(d, short); if (!short) { - // Long form includes start time, duration, and IPC + // Long form includes start time, duration, and IPC/LLC // Except if simple annot, just full name if (!state2.annottype_value) { fulltext = timetxt + " " + fulltext + "; " + shortnum(dur(d), data.thousandsX) + data.shortUnitsX; if ((0 <= state2.ipc_value) && (is_executable(d))) { // available and real execution span - if (ipc_really_llc) { - fulltext += " llc=" + llcvalues[ipc(d)]; - } else { - fulltext += " ipc=" + ipcvalues[ipc(d)]; + if (has_ipc) { + fulltext += " ipc=" + ipcvalues[realipc(d)]; + } + if (has_llc) { + fulltext += " llc=" + llcvalues[realllc(d)]; } } } @@ -4894,6 +5113,7 @@ // Shift-RIGHT-click highights all same-event-number items, fades others if (0 < d3.event.button) { + state.hilite_evnum2 = state.hilite_evnum; state.hilite_evnum = ev(d1); resetText(document.getElementById("SearchText"), name(d1)); // Draw all events onscreen, plus marks, plus IPC @@ -5012,13 +5232,14 @@ state2.annotated_one_d = -1; if (state.hilite_evnum != 0) { state.hilite_evnum = 0; + state.hilite_evnum2 = 0; // Draw all events onscreen, plus marks, plus IPC redrawEvents(); } } } -// Display name of current item in lower left corner of region 3 +// Display live name of current mouseover item in lower left corner of region 3 function delayed_mousemove_event(xpx, ypx) { // Find nearest data object, use hilo var i = FindNearestEvent(xpx, ypx, true); @@ -5053,7 +5274,7 @@ } // Fires continuously with mouse movement in region 3 -// If over a timespan, display it +// If mouseover a timespan, display it function mousemove_region3() { d3.event.stopPropagation(); var m = d3.mouse(this); @@ -5316,7 +5537,8 @@ // Backmap and turn on highlights here var hilite_row = doSnap_y(m[1]); //console.log(" hilite_row", hilite_row, sortName[hilite_row], state2.rowToHilite[hilite_row]); - var newhilite = state2.rowToHilite[hilite_row] ^ 1; + var newhilite = !state2.rowToHilite[hilite_row]; + //if ((newhilite < 0) || (1 < newhilite)) {newhilite = 0;} // Make robust // Shift-click highlights one row // Shift-RIGHT-click highlights all rows with matching name prefix @@ -5335,6 +5557,8 @@ } } } + CheckHilites("Click", state2.rowToHilite); + // Now highlight all the events in currently-highlighted rows RecalcEventHilites(); // from rowToHilite @@ -5686,7 +5910,7 @@ xaxisfmt.ovflnext = Math.floor(baseleft * 1000000 + 1) % 1000; xaxisfmt.ovflformat = "03d"; xaxisfmt.deltaformat = "05.1f"; - if (0.000000010 <= xaxisspan) {xaxisfmt.deltaformat = "03d";} + if (NSEC10 <= xaxisspan) {xaxisfmt.deltaformat = "03d";} document.getElementById("xaxislabel").innerHTML = "Time (nsec)"; } // If bare, suppress basetime text @@ -6436,7 +6660,7 @@ decorateButton3(document.getElementById("showfreq"), state2.freq_value); decorateButton4(document.getElementById("showipc"), state2.ipc_value); - decorateButton(document.getElementById("showsamp"), state2.samp_value); + decorateButton3(document.getElementById("showsamp"), state2.samp_value); decorateButton(document.getElementById("showcb"), state2.cb_value); ////decorateButton(document.getElementById("AddAnnot"), 0); @@ -6500,7 +6724,7 @@ function redrawIpcLegend() { var legendwidth = svgWidth - region2width - region4width; if (state2.ipc_value > 0) { - draw_ipclegend(legendwidth, 0, region234height, region4width); + draw_ipcllclegend(legendwidth, 0, region234height, region4width); } else { draw_emptylegend(legendwidth, 0, region234height, region4width); } @@ -6585,6 +6809,7 @@ } // end UNUSED +// Use shift key to get to the hidden show idle PC state function doToggleSamp(e) { if (state2.samp_value < 0) {return;} // unavailable state2.samp_value = doToggle(e.shiftKey, state2.samp_value, samp_value_max); @@ -7411,7 +7636,7 @@ //console.log("X: ", realxleft, "..", realxright); // Initialize rowToHighlighted - state2.rowToHilite = new Array(sortNum.length).fill(0); + state2.rowToHilite = new Array(sortNum.length).fill(false); // Now fill in rowToHeight and rowToTrack rowToHeight = new Array(sortNum.length).fill(10); @@ -7518,19 +7743,21 @@ data.extra = []; } - // Grab the IPC flag; ipc_value=-1 means no IPC data available + // Grab the IPC and LLC flags + has_ipc = (data.flags & 128) != 0; + has_llc = (data.flags & 32) != 0; + has_both = has_ipc & has_llc; + + // ipc_value=-1 means no IPC or LLC data available state2.ipc_value = 0; - if ((data.flags & 128) == 0) {state2.ipc_value = -1;} - ipc_really_llc = false; - // LLC misses hack - if ((data.flags & 32) != 0) { - ipc_really_llc = true; - state2.ipc_value = 0; - document.getElementById("showipc").textContent = "LLC"; -console.log("ipc_really_llc = true"); - } + if (!has_ipc & !has_llc) {state2.ipc_value = -1;} + + // Set the IPC/LLC button text + document.getElementById("showipc").textContent = "IPC" + if (!has_ipc & has_llc) {document.getElementById("showipc").textContent = "LLC";} + if (has_ipc & has_llc) {document.getElementById("showipc").textContent = "Both";} - // Remember if this is from a high-overhead RISC-V CPU + // Remember if this is from a high-overhead RISC-V CPU is_riscv = false; if ((typeof data.cpuModelName !== 'undefined') && (data.cpuModelName.search("u74-mc") >= 0)) { @@ -7996,12 +8223,12 @@ // xx(d, x0, y0, x1, gray, e_height) draw_user(d, x0, y0, x1, false, height); var oldfade = fade_value; fade_value = 0; - draw_one_ipc(d, x0 + (widthpx/2), y0, height * 0.67); + draw_one_ipcllc(d, x0 + (widthpx/2), y0, height * 0.67); fade_value = oldfade; } else if (is_kernel(d) && !is_ovhd(d) && !is_rxtx(d)) { draw_kernel(d, x0, y0, x1, false, height); var oldfade = fade_value; fade_value = 0; - draw_one_ipc(d, x0 + (widthpx/2), y0, height * 0.67); + draw_one_ipcllc(d, x0 + (widthpx/2), y0, height * 0.67); fade_value = oldfade; } else if (is_idle(d)) { draw_idle(d, x0, y0, x1, false, height); diff --git a/postproc/time_getpid.cc b/postproc/time_getpid.cc index 246fbc8e3403..3b042ff66fdf 100644 --- a/postproc/time_getpid.cc +++ b/postproc/time_getpid.cc @@ -53,7 +53,9 @@ #include #include // gettimeofday #include "basetypes.h" + #include "kutrace_lib.h" +#include "timecounters.h" // On ARM-32 /usr/include/arm-linux-gnueabihf/asm/unistd-common.h // On ARM-64 linux/arch/arm64/include/asm/unistd32.h @@ -65,25 +67,16 @@ #define __NR_getpid 20 #elif defined(__x86_64__) #define __NR_getpid 39 -#elif defined(__riscv) -#define __NR_getpid 172 #else BUILD_BUG_ON_MSG(1, "Define NR_getpid for your architecture"); #endif -#if 1 -// Return current time of day as microseconds since January 1, 1970 -inline int64_t GetUsec() { - struct timeval tv; - gettimeofday(&tv, NULL); - return (tv.tv_sec * 1000000l) + tv.tv_usec; -} -#endif - +// Useful utility routines +//int64 inline GetUsec() {struct timeval tv; gettimeofday(&tv, NULL); +// return (tv.tv_sec * 1000000l) + tv.tv_usec;} -// getpid doesn't actually have any arguments, -// but I want to compare time to two-arg gettimeofday +// getpid doesn't actually have any arguments, but I want to compare time to two-arg gettimeofday inline int64 DoGP(struct timeval* arg1, void* arg2) { #if defined(__ARM_ARCH_ISA_ARM) && !defined(__aarch64__) @@ -108,7 +101,6 @@ inline int64 DoGP(struct timeval* arg1, void* arg2) #endif -// Possible faster version // #if defined(__x86_64__) // asm volatile // ( @@ -132,8 +124,7 @@ int main (int argc, const char** argv) { bogus += DoGP(&tv, NULL); bogus += DoGP(&tv, NULL); } - - // Now time 100K getpid calls + int64 start_usec = GetUsec(); for (int i = 0; i < 100000 / 4; ++ i) { struct timeval tv; @@ -148,7 +139,7 @@ int main (int argc, const char** argv) { if (stop_usec == 0) {printf("bogus %d\n", (int)bogus);} - // Now time 100K marker inserts + // Now time marker inserts int64 start_usec2 = GetUsec(); for (int i = 0; i < 100000 / 4; ++ i) { kutrace::mark_a("hello"); @@ -159,7 +150,7 @@ int main (int argc, const char** argv) { int64 stop_usec2 = GetUsec(); - // Print last to avoid printing messing up timing + // Print last to avoid printing extending timing int delta = stop_usec - start_usec; fprintf(stdout, "100000 calls to getpid() took %d us (%d ns each)\n", delta, delta / 100); fprintf(stdout, " Note that each call generates TWO KUtrace events\n"); diff --git a/postproc/timecounters.h b/postproc/timecounters.h new file mode 100644 index 000000000000..5f67f9c6c89f --- /dev/null +++ b/postproc/timecounters.h @@ -0,0 +1,62 @@ +// timercounters.h +// +// Reading cycle counter and gettimeofday counter, on various architectures +// Also Pause() to slow down speculation in spin loops and give cycles ot any hyperthread +// +// Copyright 2021 Richard L. Sites + + +#ifndef __TIMERCOUNTERS_H__ +#define __TIMERCOUNTERS_H__ + +/* Add others as you find and test them */ +#define Isx86_64 defined(__x86_64) +#define IsAmd_64 Isx86_64 && defined(__znver1) +#define IsIntel_64 Isx86_64 && !defined(__znver1) + +#define IsArm_64 defined(__aarch64__) +#define IsRPi4 defined(__ARM_ARCH) && (__ARM_ARCH == 8) +#define IsRPi4_64 IsRPi4 && IsArm_64 + +#include // gettimeofday + +#if Isx86_64 +#include // __rdtsc() +#endif + +// Return a constant-rate "cycle" counter +inline int64_t GetCycles() { +#if Isx86_64 + // Increments once per cycle, implemented as increment by N every N (~35) cycles + return __rdtsc(); + +#elif IsRPi4_64 + // Increments once per 27.778 cycles for RPi4-B at 54 MHz counter and 1.5GHz CPU clock + // Call it 28 cycles + uint64_t counter_value; + asm volatile("mrs %x0, cntvct_el0" : "=r"(counter_value)); + return counter_value * 28; + +#else +#error Need cycle counter defines for your architecture +#endif + +} + +// Return current time of day as microseconds since January 1, 1970 +inline int64_t GetUsec() { + struct timeval tv; + gettimeofday(&tv, NULL); + return (tv.tv_sec * 1000000l) + tv.tv_usec; +} + +inline void Pause() { +#if Isx86_64 + __pause(); +#else + // Nothing on Arm, etc. +#endif +} + + +#endif // __TIMERCOUNTERS_H__