Skip to content

Why the "OS-agnostic" driver function cannot be probed #675

Answered by mtijanic
PGKANG asked this question in Q&A
Discussion options

You must be logged in to vote

Hey there, I think something like this should make it easier to profile:

diff --git a/src/nvidia/Makefile b/src/nvidia/Makefile
index 423414af..22f98fea 100644
--- a/src/nvidia/Makefile
+++ b/src/nvidia/Makefile
@@ -151,6 +151,12 @@ CFLAGS += -fdata-sections
 NV_KERNEL_O_LDFLAGS += --gc-sections
 EXPORTS_LINK_COMMAND = exports_link_command.txt
 
+CFLAGS += -pg
+CFLAGS += -mfentry
+CFLAGS += -mrecord-mcount
+CFLAGS += -fno-omit-frame-pointer
+CFLAGS += -fno-optimize-sibling-calls
+
 ifeq ($(TARGET_ARCH),x86_64)
   COMPILER_TYPE := $(call GET_COMPILER_TYPE, $(CC))
   ENDBR_SUPPORTED := $(call AS_HAS_INSTR, endbr64)
diff --git a/src/nvidia/nv-kernel.ld b/src/nvidia/nv-kernel.ld
index 89ce366…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@mtijanic
Comment options

@PGKANG
Comment options

@mtijanic
Comment options

@PGKANG
Comment options

@PGKANG
Comment options

Answer selected by PGKANG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants