Skip to content

Commit 456641f

Browse files
committed
Add instructions how to profile Aspectator at last
It was suggested by Ilya Schepetkov originally.
1 parent a3e66dc commit 456641f

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
bin/
33
build/
44
build-debug/
5+
build-profiled/
56
# Tests
67
tests/__pycache__
78
tests/backup

README

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ Tracking memory issues of Aspectator
4242

4343
First of all you need to build a debug version of Aspectator.
4444

45-
Then you need to run Aspectator under valgrind:
45+
Then you need to run Aspectator under valgrind (do not specify "--suppressions"
46+
if you do not have them):
4647
-----------------------------------------
4748
LDV_ASPECT_FILE=$PATH_TO_ASPECT_FILE \
4849
LDV_STAGE=$STAGE \
4950
LDV_OUT=$PATH_TO_OUT \
50-
LDV_COMMON_MODEL=$PATH_TO_COMMON_MODEL \
5151
valgrind \
5252
--tool=memcheck \
5353
--leak-check=yes \
@@ -65,3 +65,27 @@ After that you can either inspect output.xml manually or use valkyrie:
6565
valkyrie -l output.xml
6666
----------------------
6767

68+
Tracking CPU time issues of Aspectator
69+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70+
71+
First of all you need to build a debug version of Aspectator but use another
72+
directory "build-profiled" and another build command:
73+
----------------------
74+
make profiledbootstrap
75+
----------------------
76+
77+
Then you need to run Aspectator unber valgrind:
78+
-------------------------------------------
79+
LDV_ASPECT_FILE=$PATH_TO_ASPECT_FILE \
80+
LDV_STAGE=$STAGE \
81+
LDV_OUT=$PATH_TO_OUT \
82+
valgrind \
83+
--tool=callgrind \
84+
$PATH_TO_ASPECTATOR_PROFILED_DEBUG/gcc/cc1 \
85+
$PATH_TO_INPUT_FILE
86+
--------------------------------------------
87+
88+
After that you can either inspect callgrind.out.* manually or use kcachegrind:
89+
------------------------------
90+
kcachegrind -l callgrind.out.*
91+
------------------------------

0 commit comments

Comments
 (0)