Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
b2693e00
Kaydet (Commit)
b2693e00
authored
Nis 13, 2008
tarafından
Gregory P. Smith
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Adds a profile-opt target for easy compilation of a python binary using
gcc's profile guided optimization.
üst
e9746890
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
1 deletion
+29
-1
Makefile.pre.in
Makefile.pre.in
+29
-1
No files found.
Makefile.pre.in
Dosyayı görüntüle @
b2693e00
...
...
@@ -176,6 +176,10 @@ UNICODE_OBJS= @UNICODE_OBJS@
PYTHON
=
python
$(EXE)
BUILDPYTHON
=
python
$(BUILDEXE)
# The task to run while instrument when building the profile-opt target
PROFILE_TASK
=
Tools/pybench/pybench.py
-n
2
--with-gc
--with-syscheck
#PROFILE_TASK= Lib/test/regrtest.py
# === Definitions added by makesetup ===
...
...
@@ -349,6 +353,27 @@ LIBRARY_OBJS= \
all
:
build_all
build_all
:
$(BUILDPYTHON) oldsharedmods sharedmods
# Compile a binary with gcc profile guided optimization.
profile-opt
:
@
echo
"Building with support for profile generation:"
$(MAKE)
clean
$(MAKE)
build_all_generate_profile
@
echo
"Running benchmark to generate profile data:"
$(MAKE)
profile-removal
$(MAKE)
run_profile_task
@
echo
"Rebuilding with profile guided optimizations:"
$(MAKE)
clean
$(MAKE)
build_all_use_profile
build_all_generate_profile
:
$(MAKE)
all
CFLAGS
=
"
$(CFLAGS)
-fprofile-generate"
LIBS
=
"
$(LIBS)
-lgcov"
run_profile_task
:
./
$(BUILDPYTHON)
$(PROFILE_TASK)
build_all_use_profile
:
$(MAKE)
all
CFLAGS
=
"
$(CFLAGS)
-fprofile-use"
# Build the interpreter
$(BUILDPYTHON)
:
Modules/python.o $(LIBRARY) $(LDLIBRARY)
$(LINKCC)
$(LDFLAGS)
$(LINKFORSHARED)
-o
$@
\
...
...
@@ -1099,7 +1124,10 @@ clean: pycremoval
find
$(srcdir)
/build
-name
'fficonfig.h'
-exec
rm
-f
{}
';'
||
true
find
$(srcdir)
/build
-name
'fficonfig.py'
-exec
rm
-f
{}
';'
||
true
clobber
:
clean
profile-removal
:
find
.
-name
'*.gc??'
-exec
rm
-f
{}
';'
clobber
:
clean profile-removal
-
rm
-f
$(BUILDPYTHON)
$(PGEN)
$(LIBRARY)
$(LDLIBRARY)
$(DLLLIBRARY)
\
tags TAGS
\
config.cache config.log pyconfig.h Modules/config.c
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment