Tracing the innards of YOUR application Alexandre Montplaisir, - - PowerPoint PPT Presentation

tracing the innards of your application
SMART_READER_LITE
LIVE PREVIEW

Tracing the innards of YOUR application Alexandre Montplaisir, - - PowerPoint PPT Presentation

Tracing the innards of YOUR application Alexandre Montplaisir, Ericsson Florian Wininger, Polytechnique EclipseCon 2014, PolarSys Day pRESENTERS Alexandre Montplaisir Software Developer, Ericsson Committer on the Eclipse Linux


slide-1
SLIDE 1

Tracing the innards of YOUR application

Alexandre Montplaisir, Ericsson Florian Wininger, Polytechnique EclipseCon 2014, PolarSys Day

slide-2
SLIDE 2

2

pRESENTERS

› Alexandre Montplaisir

– Software Developer, Ericsson – Committer on the Eclipse Linux Tools project

› Florian Wininger

– Master student at the École Polytechnique de Montréal – Contributor to the Eclipse Linux Tools project

› Both work on the TMF/LTTng component

slide-3
SLIDE 3

EclipseCon 2014, PolarSys Day 3

plan

› What is TMF, brief overview › Advantage of data-driven components › Data-driven views

– Examples

› Future work › Conclusion › Questions

slide-4
SLIDE 4

EclipseCon 2014, PolarSys Day 4

tracing and monitoring framework

› Open-source (EPL) framework to implement trace analyzers

Generic interfaces, classes, views

Part of the Eclipse Linux Tools project (http://eclipse.org/linuxtools/ )

› Reference views for:

LTTng kernel and UST traces

GDB traces

Custom text or XML logs

› Can be used as Eclipse plugins, or as a stand-alone application (RCP)

slide-5
SLIDE 5

EclipseCon 2014, PolarSys Day 5

Tracing and monitoring framework

slide-6
SLIDE 6

EclipseCon 2014, PolarSys Day 6

Current Views – Time Graph

slide-7
SLIDE 7

EclipseCon 2014, PolarSys Day 7

Current views – Time Graph

~1800 LoC, almost none shared with the CFV/RV !

slide-8
SLIDE 8

EclipseCon 2014, PolarSys Day 8

Current views – XY charts

slide-9
SLIDE 9

EclipseCon 2014, PolarSys Day 9

Current views – sequence diagrams

slide-10
SLIDE 10

EclipseCon 2014, PolarSys Day 10

state providers

› Traces and log typically contain events –“punctual”, specific timestamp but no duration › We often want to also track states –Start time –End time (duration) –State value › Specific events indicate state transitions › State provider : part of the framework that “converts” events to states

slide-11
SLIDE 11

EclipseCon 2014, PolarSys Day 11

State providers

slide-12
SLIDE 12

EclipseCon 2014, PolarSys Day 12

Data-driven components

› Advantages of using data-driven state providers and views

– Much lower barrier of entry, easier to add support for new traces, analyses and views – Less code to maintain (especially for views) – No need to recompile to modify the output

› Making it easier to trace your application!

slide-13
SLIDE 13

EclipseCon 2014, PolarSys Day 13

Data-driven state providers

› Describe state changes with an XML definition

– Provide a way to convert events in states

slide-14
SLIDE 14

EclipseCon 2014, PolarSys Day 14

Data-driven views

› Views are longer to develop

– Data-driven views provide an easy way to configure a view for your

  • wn data.

› Currently, only the Time Graph View › Easy to extend to XY Chart, Sequences diagrams…

slide-15
SLIDE 15

EclipseCon 2014, PolarSys Day 15

Data-driven views

slide-16
SLIDE 16

EclipseCon 2014, PolarSys Day 16

Example 1 : Network connections

› 3 events types :

– ust_myprog:connection_wait – ust_myprog:connection_start – ust_myprog:connection_end

› 3 states :

– Connecting – Established – Null (Closed)

› 2 XML files, 20 lines

slide-17
SLIDE 17

EclipseCon 2014, PolarSys Day 17

Example 1 : Network connections

slide-18
SLIDE 18

EclipseCon 2014, PolarSys Day 18

Example 1 : Network connections

slide-19
SLIDE 19

EclipseCon 2014, PolarSys Day 19

Example 2 : GDB

› We want to show when threads are blocked or running for a GDB debug instance. › 4 event types :

– gdb:inf_forked  INF_RUNNING – gdb:inf_stop  INF_STOPPED – gdb:inf_cont  INF_RUNNING – gdb:inf_step  INF_RUNNING

slide-20
SLIDE 20

EclipseCon 2014, PolarSys Day 20

Example 2 : GDB

slide-21
SLIDE 21

EclipseCon 2014, PolarSys Day 21

Example 3 : Chromium Browser

› Merge UST and Kernel events in a single view. › Another operating system, another tracer (ETW) › See Kernel events, Chromium tasks stack, messages between Chromium thread. › XML file : 500 lines

slide-22
SLIDE 22

EclipseCon 2014, PolarSys Day 22

Example 3 : Chromium Browser

slide-23
SLIDE 23

EclipseCon 2014, PolarSys Day 23

Example 3 : Chromium Browser

slide-24
SLIDE 24

EclipseCon 2014, PolarSys Day 24

Example 3 : Chromium Browser

› Example : Detecting bad “Wait for CPU”

slide-25
SLIDE 25

EclipseCon 2014, PolarSys Day 25

Future Work

› Data-driven sequence diagram

– Message between threads can be converted in a sequence diagram

slide-26
SLIDE 26

EclipseCon 2014, PolarSys Day 26

Future Work

› Data-driven XY charts

– State attribute can contain an integer that change during the time

slide-27
SLIDE 27

EclipseCon 2014, PolarSys Day 27

Future Work

› The XML format should be seen as a configuration file. › We are studying the possibility of using modeling software to generate the XML state provider

slide-28
SLIDE 28

EclipseCon 2014, PolarSys Day 28

Conclusion

› Data-driven analyses have several advantages

– Lower effort for the user to create its own analyses – Less code to do new views – No need to install the developer version, just enjoy the product with the RCP

› Making it easier to trace your application!

slide-29
SLIDE 29

EclipseCon 2014, PolarSys Day 29

References

› http://eclipse.org/linuxtools/projectPages/lttng/ › http://lttng.org/eclipse

› http://wiki.eclipse.org/index.php/Linux_Tools_Project/LTTng2/User_Guide

› Mailing list: linuxtools-dev@eclipse.org › IRC

#lttng on OFTC

#eclipse-linux on Freenode

slide-30
SLIDE 30

EclipseCon 2014, PolarSys Day 30

slide-31
SLIDE 31

EclipseCon 2014, PolarSys Day 31

Questions?