Gentoo Archives: gentoo-portage-dev

From: Bastian Balthazar Bux <BastianBalthazarBux@×××××××××.it>
To: gentoo-portage-dev@l.g.o
Subject: [gentoo-portage-dev] src_profile() request for comments
Date: Wed, 28 Sep 2005 14:42:03
Message-Id: 433AABEA.2030705@pnpitalia.it
1 >From man gcc:
2
3 -fprofile-generate
4 Enable options usually used for instrumenting application to produce
5 profile useful for later recompilation with profile
6 feedback based optimization. You must use "-fprofile-generate" both
7 when compiling and when linking your program.
8
9 The following options are enabled: "-fprofile-arcs",
10 "-fprofile-values", "-fvpt".
11
12 -fprofile-use
13 Enable profile feedback directed optimizations, and optimizations
14 generally profitable only with profile feedback available.
15
16 The following options are enabled: "-fbranch-probabilities",
17 "-fvpt", "-funroll-loops", "-fpeel-loops", "-ftracer".
18
19
20 Starting saying that this staff have never been tried by me, make sense
21 to add a specific optional function src_profile() to manage the eventual
22 profiling?
23
24 With this option the flow of an emerge should be something like this:
25
26 --------------
27 | pkg_setup |...src.....
28 -------------- .
29 . .
30 bin --------------
31 . | src_unpack |
32 . --------------
33 . .
34 . --------------
35 . | src_compile |........................
36 . -------------- . .
37 . . . .
38 . . -------------- .
39 . . | src_test |.....
40 . . -------------- .
41 . . . .
42 . . . ################
43 . . . # src_profile #
44 . . . ################
45 . -------------- . .
46 . | src_install |........................
47 . --------------
48 . .
49 -------------- .
50 | pkg_preinst |...........
51 --------------
52 .
53 --------------
54 | pkg_postinst |
55 --------------
56
57
58 with src_profile() responsible to do basically two things:
59 - run the builded app with some fake data
60 - rebuild the source using the gathered profile info.
61
62 The first step within some ebuilds could be done by src_test, the second
63 is basically a reduced src_compile.
64
65 any thoughts ?
66
67 --
68 gentoo-portage-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-portage-dev] src_profile() request for comments Jason Stubbs <jstubbs@g.o>