Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
5142 Discussions

Vtune Can't find source but debug info is present

kaplannp
Novice
550 Views

Hi,

I'm running the Vtune uarch analysis, and I'm trying to double click from a function in the bottom up analysis to the source code location, but instead of showing the source code, it shows only the assembly.

 

Things I've already tried:

- I've compiled with -g, -g3, -ggdb and all combinations therein.

- Verified that the files have dwarf 4 debug information

- Run other programs that also have dwarf 4 debug information, and had no problems finding the src

- run using the gui analysis configure play button

- run using command line

- tried differnent -O levels

- tried different compiler versions (gcc9 and gcc11)

 

os is ubuntu 20.04. Vtune is 2024.1.0. Compiler is gcc/g++. Appreciate your help! Here's the makefile:

1 VTUNE_HOME=/opt/intel/oneapi/vtune/latest
2
3 SRC_DIR:=src
4 BIN_DIR:=bin
5 OBJ_DIR:=obj
6
7 CXX = g++-11
8 CC = gcc-11
9 EXE:=gwfa
10
11
12 PROF_UTILS=$(CWD)/../ProfileScripts/RoiCppHeaders
13 MINIGRAPH_DIR=$(CWD)/deps/minigraphKernel
14 CWD:=$(shell pwd)
15 CXXFLAGS:= -O3 -ggdb -g -fopenmp
16 CFLAGS:= -O3 -ggdb -g -fopenmp
17 INCLUDE_FLAGS :=-I$(PROF_UTILS)/include -I$(SRC_DIR) -I$(MINIGRAPH_DIR) -I$(VTUNE_HOME)/include
18 LD_LIB_DIR_FLAGS := -L$(PROF_UTILS)/lib -L$(VTUNE_HOME)/lib64
19 LD_LIB_FLAGS := -lprofileUtils -littnotify -fopenmp -ldl -lz -lpthread -ldl
20 CPP_FILES := main.cpp loadParams.cpp eval.cpp
21 C_FILES := kalloc.c gfa-io.c gfa-ed.c gfa-base.c
22 C_OBJ_FILES := $(patsubst %, $(OBJ_DIR)/%.o, $(C_FILES))
23 CPP_OBJ_FILES_PROF := $(patsubst %, $(OBJ_DIR)/%.prof.o, $(CPP_FILES))
24
25 all:$(OBJ_DIR) $(BIN_DIR) $(BIN_DIR)/$(EXE).prof
26
27 $(OBJ_DIR):
28 mkdir -p $(OBJ_DIR)
29
30 $(BIN_DIR):
31 mkdir -p $(BIN_DIR)
32
33 $(OBJ_DIR)/%.cpp.prof.o: $(SRC_DIR)/%.cpp
34 $(CXX) $(CXXFLAGS) $(INCLUDE_FLAGS) -c -o $@ $^ -DTIMER_ENABLED=1 -DVTUNE_ENABLED=1 -DPIN_ENABLED=1
35
36 $(OBJ_DIR)/%.c.o: $(MINIGRAPH_DIR)/%.c
37 $(CC) $(CCFLAGS) $(INCLUDE_FLAGS) -c -o $@ $^
38
39 $(BIN_DIR)/$(EXE).prof: $(CPP_OBJ_FILES_PROF) $(C_OBJ_FILES)
40 $(CXX) $(INCLUDE_FLAGS) -o $@ $^ $(LD_LIB_DIR_FLAGS) $(LD_LIB_FLAGS)

Labels (1)
0 Kudos
1 Solution
yuzhang3_intel
Moderator
396 Views

By default, uarch-exploration doesn't enable call stack.  You need to click the plus button on the top right corner below and select the box.

 

yuzhang3_intel_1-1731128540270.png

 

 

 

View solution in original post

0 Kudos
2 Replies
yuzhang3_intel
Moderator
397 Views

By default, uarch-exploration doesn't enable call stack.  You need to click the plus button on the top right corner below and select the box.

 

yuzhang3_intel_1-1731128540270.png

 

 

 

0 Kudos
kaplannp
Novice
346 Views

Ah, I see. thank you!

0 Kudos
Reply