Project

General

Profile

Google Summer of Code 2014 » History » Version 13

Jérémie Galarneau, 02/12/2014 03:58 PM

1 1 Jérémie Galarneau
h1. Google Summer of Code 2014
2
3
Google Summer of Code is a global program that offers students stipends to write code for open source projects. 
4
5
Following a great first experience last year, the LTTng project will participate in GSoC for a second year.
6
7
h1. Guidelines for students applying to GSoC
8
9
Here a few guidelines and advice for aspiring applicants to GSoC:
10
11
* *Submit* your application to Google by *March 21 2014 19:00 UTC*.
12
13
* *Join* the IRC #lttng channel on OFTC (irc://irc.oftc.net/lttng) to discuss your application and project ideas.
14
  Since IRC and the "mailing list":http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev are our usual means of communications, applicants who have shown initiative in communicating with the community will be favored during the applications review. Please refer to the "Contributor''s guide":http://raw.github.com/jgalar/lttng-doc/master/contributor-guide.txt for guidelines on submitting patches.
15
16
* *Subscribe* to the lttng-dev "mailing list":http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev.
17
18
* *Break the ice!* Try submitting a patch for simple issues such as typos, documentation improvements, simple bug fixes (a good starting point would be to look at the LTTng bug tracker: "issues":http://bugs.lttng.org/projects/lttng/issues?sort=priority%2Cid%3Adesc). Or you could try the complete toolchain on some of your personal projects and come up with a problematic situation (performance issue, ease of debugging, etc.) that *your* project idea could potentially solve. Perhaps you have ideas to improve LTTng''s usability? Discuss them with us, you might just have found yourself a summer project! 
19
20
* *Don''t panic!* Some portions of the LTTng project can be quite complex and technically challenging; we don''t expect applicants to be familiar with all the concepts behind the LTTng codebase.
21
22
Additional tips for a successful application: "The DOs and DON’Ts of Google Summer of Code: Student Edition":http://google-opensource.blogspot.de/2011/03/dos-and-donts-of-google-summer-of-code.html
23
24
h1. Project Ideas
25
26
The following ideas are only a starting point for applicants. Feel free to submit your own project idea!
27
28
h2. Android port
29
30
*Brief explanation*:
31
32
Port the LTTng infrastructure to the Android platform. The exact scope of this project will need to be reassessed based on the conclusions of the team currently working on this project as part of their undergrad project at École Polytechnique de Montréal.
33
34
This project presents a number of uncertain technical hurdles but some effort has already been made in most key areas.
35
36
* The userspace part of the LTTng project relies on glibc features not present in Bionic -- Google''s libc implementation used on Android.
37
  - Glibc is now available on Android thanks to the efforts made by the cyborgstack project.
38
39
* System V IPC mechanisms are heavily relied-upon.
40
  - The Ericsson port makes use of temporary files.
41
  - Glibc on Android should provide such mechanisms.
42
43
* Userspace RCU must be ported and tested on the Android platform.
44
  - Ported by Ericsson, not mainlined.
45
46
*Expected results*: A working port of LTTng''s tracers running on an Android device.
47
48
*Complementary information*:
49
http://lists.lttng.org/pipermail/lttng-dev/2012-February/017626.html
50
51
*Skill level*: Hard
52
53
*Prerequisite Knowledge*: C development, Android development
54
55
*Mentors*: Christian Babeux (cbab), Jérémie Galarneau (jgalar)
56 2 Jérémie Galarneau
57
h2. Clang plugin providing automatic application instrumentation
58
59
*Brief explanation:*
60
61
The LTTng userspace tracer relies on static tracepoint probes manually inserted in the traced application’s source code. This project aims at developing a compiler plugin that would automatically instrument an application at build time following a set of criteria.
62
63
At this time, LTTng provides only one solution to the automatic instrumentation problem. By using GCC and LLVM’s -finstrument-functions code generation option and LTTng’s cyg-profile library, it is possible for developers to trace every function entry and exit in their program. While this has proved useful in the past, this mechanism introduces a significant amount of overhead.
64
65
A more refined automatic instrumentation solution is necessary to uphold LTTng’s objective of providing a low-intrusiveness tracing solution. A compiler plugin seems to be one of the most flexible solution to this problem. Such a plug-in could allow the instrumentation of functions whose name match a certain expression, instrumentation of all calls made to a particular library, instrumentation of functions listed in a separate file, etc.
66
67
A natural extension of this project is the development of analysis scripts using the Babeltrace Python API to detect resource leaks, dead code, hot paths and so on.
68 1 Jérémie Galarneau
69 3 Jérémie Galarneau
*Expected results:* A compiler plugin processing rules to automatically instrument an application at build time.
70
71 2 Jérémie Galarneau
*Skill level:* Hard
72 3 Jérémie Galarneau
73 2 Jérémie Galarneau
*Prerequisite Knowledge:* C++ development, C development, Assembly
74 3 Jérémie Galarneau
75 2 Jérémie Galarneau
*Mentors:* Christian Babeux (cbab)
76 4 Jérémie Galarneau
77
h2. Easing the integration of tracepoints in user space applications
78
79
*Brief explanation:*
80
81 6 Jérémie Galarneau
The LTTng userspace tracer relies on static tracepoint probes manually added to an application’s source code to generate events.
82 5 Jérémie Galarneau
83 1 Jérémie Galarneau
The currently privileged instrumentation method consists in creating a C header which contains a description of an LTTng event and declares a tracepoint. This header is then included by the application developer and called the same way a function would.
84 5 Jérémie Galarneau
85 8 Jérémie Galarneau
These tracepoint provider headers contain a significant amount of boilerplate code and impose a maintenance cost which is considered unreasonable by certain application developers. The number of files to manage in the project’s tree is also significantly increased since each tracepoint has an associated header and, possibly, implementation file (.c).
86 7 Jérémie Galarneau
87 8 Jérémie Galarneau
We acknowledge the need for a more streamlined instrumentation approach and now ship the lttng-gen-tp script as part of lttng-tools. This script can be used to generate the necessary tracepoint headers and implementation files but still requires the developer to manually create tracepoint declaration files.
88 5 Jérémie Galarneau
89 8 Jérémie Galarneau
Numerous discussions with developers have led us to propose a certain number of improvements to lttng-gen-tp as a Google Summer of Code project.
90 5 Jérémie Galarneau
91 8 Jérémie Galarneau
The first improvement we propose is adding support for the definition of probes as function signatures containing only built-in types.
92 5 Jérémie Galarneau
93 8 Jérémie Galarneau
A slightly more advanced feature would let developers specify which variables they wish to trace. The tool would then analyze the source code and create the appropriate probe signature from the type information. For instance, to create a tracepoint logging variables “session”, “ret” and “len” in a “create_session” function, the user would invoke the tool as:
94 5 Jérémie Galarneau
95
<pre>
96 8 Jérémie Galarneau
lttng-gen-tp -a session, ret, len -f create-session -i my_file.c -n my_tracepoint_name
97 5 Jérémie Galarneau
</pre>
98
99 8 Jérémie Galarneau
Finally, we would like to leverage the existing DTrace probe infrastructures currently deployed in some open source projects such as Node.js and PostgreSQL as LTTng tracepoints. This part of the project would also give the student a chance to contribute to other open source projects that are currently using DTrace to adapt their build systems and add LTTng as a supported tracing back-end.
100 4 Jérémie Galarneau
101 8 Jérémie Galarneau
*Expected results:* An overhauled version of the lttng-gen-tp tool providing multiple ways of assisting developers in the addition of LTTng tracepoints to their application.
102 4 Jérémie Galarneau
103 5 Jérémie Galarneau
*Skill level:* Medium
104 4 Jérémie Galarneau
105
*Prerequisite Knowledge:* C development, Scripting
106
107
*Mentors:* Christian Babeux (cbab), Jérémie Galarneau (jgalar)
108 9 Jérémie Galarneau
109
h2. Strace drop-in replacement based on LTTng
110
111
*Brief explanation:*
112
113
Strace is a ptrace-based debugging utility which lets developers trace syscalls and signals as they occur during a process’ lifetime. With the addition of live tracing and save-and-restore features, we are confident that it would be possible to build a tool that combines both LTTng’s performance characteristics and strace’s ease of use.
114
115
The objective of this project is the development of a tool that would automatically setup tracing sessions, implement a live streaming client based on Babelltrace’s live support and provide the same UI as strace.
116
117
A number of extensions could then be added to this tool such as trace saving capabilities, extended support to display userspace events, kernel event support, etc.
118
119 10 Jérémie Galarneau
*Expected results:* An strace drop-in replacement based on LTTng
120
121 1 Jérémie Galarneau
*Skill level:* Medium
122 10 Jérémie Galarneau
123
*Prerequisite Knowledge:* C development
124
125 9 Jérémie Galarneau
*Mentors:* Christian Babeux (cbab), Jérémie Galarneau (jgalar)
126 11 Jérémie Galarneau
127
h2. Python tracing support
128
129
*Brief explanation:*
130
131 12 Jérémie Galarneau
LTTng’s userspace tracer has supported C applications from its onset. However, as our user base broadens, we have added user space tracing support for both C++ and Java applications. We think the next logical step is Python as our team already has experience in this language and is becoming increasingly familiar with the development of Python code binding to C libraries.
132 11 Jérémie Galarneau
133 12 Jérémie Galarneau
A student choosing this project would integrate a new Python domain to lttng-tools, develop a generic probe provider and add support for LTTng among the standard Python logging infrastructure.
134 11 Jérémie Galarneau
135
We think this project serves as a great introduction to the complete LTTng toolchain and would be a great fit for students looking for long-term involvement in an open source project.
136
137 12 Jérémie Galarneau
*Expected results:* Integration of LTTng amongst Python''s logging infrastructure.
138 11 Jérémie Galarneau
139 13 Jérémie Galarneau
*Complementary information:* "Python Logging Documentation":http://docs.python.org/3.3/library/logging.html
140
141 11 Jérémie Galarneau
*Skill level:* Medium
142
143
*Prerequisite Knowledge:* C and Python development
144
145
*Mentors:* Christian Babeux (cbab), Jérémie Galarneau (jgalar)