Skip to content

Commit 4c76f90

Browse files
committed
Update build process to use kmutil rather than kextload, and add some debugging commands
1 parent ab8676f commit 4c76f90

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

doc/MAC_HOWTO.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,14 @@ PCM Execution
5151
Now you can run ./pcm utility.
5252
See description of other built utilities in LINUX_HOWTO.txt
5353

54+
Logging/Debugging
55+
----------------------
56+
57+
Sometimes you will get errors while running utilities that may come from the kernel, and you can use something like this DTrace script to correlate it with user-land behavior:
58+
59+
$ sudo dtrace -n 'fbt:mach_kernel:_ZN*IOUser*:return /execname == "pcm"/ { @hgram[probefunc, arg1, ustack(20)] = count(); }' -c ./pcm
60+
61+
Various commands that can help diagnose errors:
62+
63+
$ kmutil log stream
64+
$ kmutil inspect -b com.intel.driver.PcmMsr

src/MacMSRDriver/PcmMsr/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ target_link_libraries(PcmMsrDriver PRIVATE ${IOKIT_LIBRARY}
4141
# PcmMsrDriver.kext is built here and located in 'build/bin'
4242
set(LIB_EXT_PATH "/Library/Extensions")
4343
install(TARGETS PcmMsrDriver DESTINATION "${LIB_EXT_PATH}/")
44-
install(CODE "execute_process(COMMAND kextload ${LIB_EXT_PATH}/PcmMsrDriver.kext)")
44+
install(CODE "execute_process(COMMAND kmutil load ${LIB_EXT_PATH}/PcmMsrDriver.kext)")

0 commit comments

Comments
 (0)