1And when you drive for hours, arrive to find you nowhere gone, you've just been
2mouthing "brum, brum", rocking wheel, of course you have, the heap is rusted
3through and off the road since you drove drunk through thirteen school yards,
4laughing like Prescott.
5
6Then welcome, ah, oo costrinzi welcome, in OProfile.
7
8Please talk to the list before starting on something. We're not too scary.
9
10You can find some documentation on how OProfile works in doc/internals.html
11
12Here's a short list of some stuff you need to know to get started. Don't forget
13to read doc/CodingStyle
14
15Source organisation
16-------------------
17
18module/
19
20	The 2.4 module code. Sub-directories contain architecture-specific code.
21
22daemon/
23
24	The daemon. liblegacy/ contains the daemon core for 2.4
25
26utils/
27
28	Scripts for managing the daemon etc.
29
30doc/
31
32	User and developer documentation
33
34events/
35
36	Textual performance counter event descriptions.
37
38libpp/
39
40	Classes for handling profiles
41
42pp/
43
44	The post-profiling tools for showing results
45
46libabi/
47
48	opimport and its ABI support library
49
50libdb/
51
52	The sample file access library
53
54libop/
55
56	C language oprofile-specific helper stuff
57
58libopt++/
59
60	A simple C++ library for parsing command lines
61
62libregex/
63
64	C++ demangling pattern matching for smart demangling feature.
65
66libutil/
67libutil++/
68
69	Generic helpers
70
71gui/
72
73	The GUI for starting oprofile
74
75m4/
76
77	Autoconf macros for ./configure stage
78
79Tools
80-----
81
82You'll need autoconf 2.13+ and automake 2.5+ when using CVS. Don't forget to
83autogen.sh first.
84
85We still currently support gcc 2.91.66. Please bear this in mind.
86
87Shell Scripts
88-------------
89
90Any shell scripts should aim to be as compatible as possible with different
91shells and "bashisms" etc. should not be used. Busybox is often used instead 
92of bash on embedded devices for example.
93
94Making patches, commit rights
95-----------------------------
96
97Patches should be in diff -u format, appliable by patch -p1 in the top-level
98source directory. Patches should not include changes to generated files.
99
100Even trivial patches must have a change log entry in the usual format (see
101ChangeLog). Refer to bug numbers in the change log if relevant.
102
103When you submit a patch, we ask that you include a "Signed-off-by"
104line; for example:
105       Signed-off-by: Random J Developer <random@developer.example.org>
106
107Including this line with your patch implies that you have read and comply with
108the "Developer's Certificate of Origin 1.1" (DCO).  This is the same process
109the kernel community uses to try to ensure the originality of patches.  The
110DCO can be found in <kernel-source>/Documentation/SubmittingPatches, item 11,
111"Sign your work".  For convenience, a copy of the DCO is included below.
112
113   Developer's Certificate of Origin 1.1
114
115        By making a contribution to this project, I certify that:
116
117        (a) The contribution was created in whole or in part by me and I
118            have the right to submit it under the open source license
119            indicated in the file; or
120
121        (b) The contribution is based upon previous work that, to the best
122            of my knowledge, is covered under an appropriate open source
123            license and I have the right under that license to submit that
124            work with modifications, whether created in whole or in part
125            by me, under the same open source license (unless I am
126            permitted to submit under a different license), as indicated
127            in the file; or
128
129        (c) The contribution was provided directly to me by some other
130            person who certified (a), (b) or (c) and I have not modified
131            it.
132
133        (d) I understand and agree that this project and the contribution
134            are public and that a record of the contribution (including all
135            personal information I submit with it, including my sign-off) is
136            maintained indefinitely and may be redistributed consistent with
137            this project or the open source license(s) involved.
138
139
140
141If you make a change visible to the user in some way, you should check the
142website for any needed changes. Patches to oprofile-www CVS are preferred
143but a notification of what needs changing is good enough. Any changes that
144affect the docs (man-pages or oprofile.xml) must include documentation updates
145as appropriate. Also see below.
146
147You may after a while be given direct commit rights. You should be
148subscribed to both the main list and the commits mailing list if you do.
149Your cvs commit message only needs to briefly describe what your change
150does - the change log should have the detailed description. Any
151non-trivial change needs approval from either John, Phil or Maynard,
152unless stated otherwise. The CVS tree will freeze occassionally for
153release, in which case no commits are allowed at all without agreement
154of John, Phil, or Maynard. CVS admin changes (-kb, .cvsignore etc.) do
155not need a change log, and neither does changes to TODO. If you make a
156change that affects the user (feature improvement, new feature, bug fix,
157UI change), see the next section.
158
159The oprofile website
160--------------------
161
162The oprofile website source is stored in the oprofile-www CVS module, excepting
163the doc/ and srcdoc/ directories, which are updated by hand at release time.
164The visible website (http://oprofile.sf.net/) must always describe the last
165*released* version of OProfile, but the CVS contents should be up to date with
166the CVS code. This means that if you make a user-visible change as described
167in the last section, you should update the files in oprofile-www and commit.
168You can do "cvs update" in home/groups/o/op/oprofile/htdocs/cvs on sourceforge
169to get http://oprofile.sf.net/cvs/, so you can check your changes work (and
170validate: see http://www.htmlhelp.com/tools/validator/).
171
172Any user-visible change should have a short description in the file
173release-notes/release-<nextversion> in the oprofile-www CVS module.
174Do not document bug fixes that were not in the last released version.
175
176CVS branches
177------------
178
179You may need at some point to do your work on a CVS branch, if it's
180particularly invasive. CVS is a PITA in this respect unfortunately. It's
181strongly recommended that you merge changes from the trunk to your branch at
182regular intervals.
183
184To create a branch, create a branch tag :
185
186	cvs rtag -b BRANCH_WHATEVER oprofile
187
188And add a merge tag (in the trunk repository):
189
190	cvs rtag BRANCH_WHATEVER_MERGE oprofile
191
192Now make your changes on the branch as you wish. When you want to merge some
193fixes from the trunk in your branch, do something like this on a branch
194checkout :
195
196	cvs update -j BRANCH_WHATEVER_MERGE -j HEAD
197
198Fix up any conflicts and commit it the changes to the branch. Now move the
199merge tag along for the next merge (in the trunk repository) :
200
201	cvs rtag -F BRANCH_WHATEVER_MERGE oprofile
202
203When the time comes to merge the branch changes back into the trunk, I
204recommend just doing a diff -Naur on the two trees, which will make sure CVS
205hasn't done anything unusual. Don't forget to list your branch on the website
206CVS page.
207