EASElyextending Eclipse Trace Compass...2019Ericsson Internal | 2018-10 23 | Ericsson -02-21 4...

Post on 31-Jan-2020

15 views 0 download

Transcript of EASElyextending Eclipse Trace Compass...2019Ericsson Internal | 2018-10 23 | Ericsson -02-21 4...

Ericsson Internal | 2018-02-212019-10-23 | Ericsson 1

EASEly extending Eclipse Trace Compass

Bernd Hufmann, Ericsson ABGeneviève Bastien, Polytechnique Montréal

2019-10-23

Ericsson Internal | 2018-02-212019-10-23 | Ericsson 2

Agenda

— Background

— Trace Compass and its extensibility

— Trace Compass and EASE

— Demo

— Q&A

Ericsson Internal | 2018-02-212019-10-23 | Ericsson 3

— Trace

— Series of events over time

— Event collected at tracepoints during program execution

— Each event has a type and payload

— Use the events as input for analysis

— Create visualization graphs with these analysis

— Tracing use cases

— Profile application

— Find long executions

— Investigate real-time deadlines

— Find memory or load issues

— Investigate concurrency problems

What is tracing?

Ericsson Internal | 2018-02-212019-10-23 | Ericsson 4

Eclipse Trace Compass is an open source application to solve performance and reliability issues by reading and analyzing traces and logs of a system.

Its goal is to provide views, graphs, metrics, and more to help extract useful information from traces, in a way that is more user-friendly and informative than huge text dumps.

Key characteristics

— Handles trace larger than available memory

— Correlates traces from heterogenous system

Ericsson Internal | 2018-02-212019-10-23 | Ericsson 5

Why is extensibility important for us?

Ericsson Internal | 2018-02-212019-10-23 | Ericsson 6

Why is extensibility important for us?

“One of these things is not like the others, one of these things is not the same” (Sesame Street)

Application One ≠ Application Two

Trace format A ≠ Trace format B

Analysis Foo ≠ Analysis Bar

Graph Baz ≠ Graph Qux

Problem X ≠ Problem Y

Ericsson Internal | 2018-02-212019-10-23 | Ericsson 7

Why is extensibility important for us?

“One of these things is not like the others, one of these things is not the same” (Sesame Street)

Application One ≠ Application Two

Trace format A ≠ Trace format B

Analysis Foo ≠ Analysis Bar

Graph Baz ≠ Graph Qux

Problem X ≠ Problem Y

But many re-usable concepts!

Ericsson Internal | 2018-02-212019-10-23 | Ericsson 8

Why is extensibility important for us?

“One of these things is not like the others, one of these things is not the same”

Application One ≠ Application Two

Trace format A ≠ Trace format B

Analysis Foo ≠ Analysis Bar

Graph Baz ≠ Graph Qux

Problem X ≠ Problem Y

But many re-usable concepts!

Give flexibility to the users

Ericsson Internal | 2018-02-212019-10-23 | Ericsson 9

Trace analysis and visualization flow

Trace(s)Stream of

eventsPersistence Views

parse analyze query

Events Table Intermediate Results

Ericsson Internal | 2018-02-212019-10-23 | Ericsson 10

Trace analysis and visualization flow

Trace(s)Stream of

eventsPersistence Views

parse analyze query

Events Table Intermediate Results

Extensions Extensions

Extensions

Ericsson Internal | 2018-02-212019-10-23 | Ericsson 11

— Extension point to define trace parsers

— Automatic trace type detection

— UI to select and manage trace types

— Java APIs for parsers

— Build-in parsers, e.g. Common Trace Format (CTF)

— Custom Text and XML parser wizard

— Create parser on-the-fly from UI

Trace parser extensibility

Trace Type

Extension point

Trace Type 1

Trace Type 2

Trace Type N

Ericsson Internal | 2018-02-212019-10-23 | Ericsson 12

— Extension point to define trace analysis

— Manage analysis in Eclipse

— Show available analysis in UI

— Java APIs

— Data persistence

— state system

— segment store

— XML defined analysis

— Create them on-the-fly

Analysis extensibility

Analysis

Extension point

Analysis 1

Analysis 2

Analysis N

XML definitions

Ericsson Internal | 2018-02-212019-10-23 | Ericsson 13

— Java APIs for common views

— Default implementations

— Re-usable widgets

— XML defined views

— Create them on-the-fly

Visualization extensibility

XML definitions

Ericsson Internal | 2018-02-212019-10-23 | Ericsson 14

— Find a sequence of data within a trace

— Generate state systems

— Do timing analysis

— Define specialized views

— Pattern analysis

In-depth: XML analysis and views

Ericsson Internal | 2018-02-212019-10-23 | Ericsson 15

— Finite number of available analyses

— Some flexibility with XML analyses

— Very verbose

— Hard to read

— Hard to debug

— But it works!

XML analysis and viewsChallenges

Ericsson Internal | 2018-02-212019-10-23 | Ericsson 16

— Finite number of available analyses

— Some flexibility with XML analyses

— Very verbose

— Hard to read

— Hard to debug

— But it works!

— Ultimate flexibility: Scripting

XML analysis and viewsChallenges

Ericsson Internal | 2018-02-212019-10-23 | Ericsson 17

EASE –Eclipse Advanced Scripting Environment

Provided by Trace Compass

EASE Core:Integrates scripting

in Eclipse

Script engines

Nashorn(js)

JRuby

Groovy

Python

Rhino(js)

supports

Modules

provides API for

Analysis Utils

FiltersData Provider

View

Others

Trace/Trace UI

Ericsson Internal | 2018-02-212019-10-23 | Ericsson 18

EASE highlights

— Execute scripts in context of Eclipse

— Supports multiple scripting languages

— Provide access to your application classes ( java)

— Interact with your workbench

— Integrate scripts into UI (e.g. toolbar, menu) using keywords

— Extend easily existing application

— Rapid prototyping

— Plug-in mechanism to add custom modules

— Easily share scripts

Ericsson Internal | 2018-02-212019-10-23 | Ericsson 19

Example scripts: Demo

Instrumented application with custom tracepoints

Ericsson Internal | 2018-02-212019-10-23 | Ericsson 20

Example scripts: Demo

The view we want to get

Ericsson Internal | 2018-02-212019-10-23 | Ericsson 21

Example scripts: Demo

Step 1:Read events from the trace

Ericsson Internal | 2018-02-212019-10-23 | Ericsson 22

Example scripts: Demo

Step 2:For each event, get the event field values

Ericsson Internal | 2018-02-212019-10-23 | Ericsson 23

Example scripts: Demo

Step 3:Save the states in a state system (backend from which views get their data)

Ericsson Internal | 2018-02-212019-10-23 | Ericsson 24

Example scripts: Demo

Step 4:Show a time graph view for the states

Ericsson Internal | 2018-02-212019-10-23 | Ericsson 25

Example scripts: Demo

Step 5:Add the arrows

See the Trace Compass EASE Tutorial labfor complete diff and script

Ericsson Internal | 2018-02-212019-10-23 | Ericsson 26

How-to install

Trace Compass add-ons

— In RCP use” Menu “Tools -> Add-ons…”

— In Eclipse IDE use: Update Site

Ericsson Internal | 2018-02-212019-10-23 | Ericsson 27

Takeaways

— Trace Compass is extensible

— EASE provides scripting capabilities to Eclipse applications

— Perfect match: EASE and Trace Compass

— EASE Scripting is now available for Trace Compass users

— Quickly create your own script and share it with colleagues (and community ☺)

Ericsson Internal | 2018-02-212019-10-23 | Ericsson 28

References

— Trace Compass

— http://tracecompass.org

— https://projects.eclipse.org/projects/tools.tracecompass

— https://projects.eclipse.org/projects/tools.tracecompass.incubator

— Trace Compass Scripting

— https://archive.eclipse.org/tracecompass.incubator/doc/org.eclipse.tracecompass.incubator.scripting.doc.user/User-Guide.html

— http://versatic.net/tracecompass/introducingEase.html

— https://github.com/tahini/tracecompass-ease-scripting

— https://github.com/tuxology/tracevizlab/

— Eclipse EASE

— https://projects.eclipse.org/projects/technology.ease

Ericsson Internal | 2018-02-212019-10-23 | Ericsson 29

— Presenter

— Geneviève Bastien: gbastien@versatic.net

— Bernd Hufmann: bernd.hufmann@ericsson.com

— Mailing list

— tracecompass-dev@eclipse.org

— IRC

— oftc.net #tracecompass

Contacts

Characters for Embedded characters:!"#$%&'()*+,./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~¡¢£¤¥¦§¨©ª«¬®¯°±²³´¶·¸¹º»¼½ÀÁÂÃÄÅÆÇÈËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂăąĆćĊċČčĎďĐđĒĖėĘęĚěĞğĠġĢģĪīĮįİıĶķĹĺĻļĽľŁłŃńŅņŇňŌŐőŒœŔŕŖŗŘřŚśŞşŠšŢţŤťŪūŮůŰűŲųŴŵŶŷŸŹźŻżŽžƒȘșˆˇ˘˙˚˛˜˝ẀẁẃẄẅỲỳ‘’‚“”„†‡•…‰‹›⁄€™ĀĀĂĂĄĄĆĆĊĊČČĎĎĐĐĒĒĖĖĘĘĚĚĞĞĠĠĢĢĪĪĮĮİĶĶĹĹĻĻĽĽŃŃŅŅŇŇŌŌŐŐŔŔŖŖŘŘŚŚŞŞŢŢŤŤŪŪŮŮŰŰŲŲŴŴŶŶŹŹŻŻȘș−≤≥fiflΆΈΉΊΌΎΏΐΑΒΓΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΪΫΆΈΉΊΰαβγδεζηθικλνξορςΣΤΥΦΧΨΩΪΫΌΎΏЁЂЃЄЅІЇЈЉЊЋЌЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯЁЂЃЄЅІЇЈЉЊЋЌЎЏѢѢѲѲѴѴҐҐәǽẀẁẂẃẄẅỲỳ№—–-

!"#$%&'()*+,./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~¡¢£¤¥¦§¨©ª«¬®¯°±²³´¶·¸¹º»¼½ÀÁÂÃÄÅÆÇÈËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂăąĆćĊċČčĎďĐđĒĖėĘęĚěĞğĠġĢģĪīĮįİıĶķĹĺĻļĽľŁłŃńŅņŇňŌŐőŒœŔŕŖŗŘřŚśŞşŠšŢţŤťŪūŮůŰűŲųŴŵŶŷŸŹźŻżŽžƒȘșˆˇ˘˙˚˛˜˝ẀẁẃẄẅỲỳ‘’‚“”„†‡•…‰‹›⁄€™ĀĀĂĂĄĄĆĆĊĊČČĎĎĐĐĒĒĖĖĘĘĚĚĞĞĠĠĢĢĪĪĮĮİĶĶĹĹĻĻĽĽŃŃŅŅŇŇŌŌŐŐŔŔŖŖŘŘŚŚŞŞŢŢŤŤŪŪŮŮŰŰŲŲŴŴŶŶŹŹŻŻȘș−≤≥fiflΆΈΉΊΌΎΏΐΑΒΓΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΪΫΆΈΉΊΰαβγδεζηθικλνξορςΣΤΥΦΧΨΩΪΫΌΎΏЁЂЃЄЅІЇЈЉЊЋЌЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯЁЂЃЄЅІЇЈЉЊЋЌЎЏѢѢѲѲѴѴҐҐәǽẀẁẂẃẄẅỲỳ№—–-

!"#$%&'()*+,./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~¡¢£¤¥¦§¨©ª«¬®¯°±²³´¶·¸¹º»¼½ÀÁÂÃÄÅÆÇÈËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂăąĆćĊċČčĎďĐđĒĖėĘęĚěĞğĠġĢģĪīĮįİıĶķĹĺĻļĽľŁłŃńŅņŇňŌŐőŒœŔŕŖŗŘřŚśŞşŠšŢţŤťŪūŮůŰűŲųŴŵŶŷŸŹźŻżŽžƒȘșˆˇ˘˙˚˛˜˝ẀẁẃẄẅỲỳ‘’‚“”„†‡•…‰‹›⁄€™ĀĀĂĂĄĄĆĆĊĊČČĎĎĐĐĒĒĖĖĘĘĚĚĞĞĠĠĢĢĪĪĮĮİĶĶĹĹĻĻĽĽŃŃŅŅŇŇŌŌŐŐŔŔŖŖŘŘŚŚŞŞŢŢŤŤŪŪŮŮŰŰŲŲŴŴŶŶŹŹŻŻȘș−≤≥fiflΆΈΉΊΌΎΏΐΑΒΓΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΪΫΆΈΉΊΰαβγδεζηθικλνξορςΣΤΥΦΧΨΩΪΫΌΎΏЁЂЃЄЅІЇЈЉЊЋЌЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯЁЂЃЄЅІЇЈЉЊЋЌЎЏѢѢѲѲѴѴҐҐәǽẀẁẂẃẄẅỲỳ№—–-

!"#$%&'()*+,./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~¡¢£¤¥¦§¨©ª«¬®¯°±²³´¶·¸¹º»¼½ÀÁÂÃÄÅÆÇÈËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂăąĆćĊċČčĎďĐđĒĖėĘęĚěĞğĠġĢģĪīĮįİıĶķĹĺĻļĽľŁłŃńŅņŇňŌŐőŒœŔŕŖŗŘřŚśŞşŠšŢţŤťŪūŮůŰűŲųŴŵŶŷŸŹźŻżŽžƒȘșˆˇ˘˙˚˛˜˝ẀẁẃẄẅỲỳ‘’‚“”„†‡•…‰‹›⁄€™ĀĀĂĂĄĄĆĆĊĊČČĎĎĐĐĒĒĖĖĘĘĚĚĞĞĠĠĢĢĪĪĮĮİĶĶĹĹĻĻĽĽŃŃŅŅŇŇŌŌŐŐŔŔŖŖŘŘŚŚŞŞŢŢŤŤŪŪŮŮŰŰŲŲŴŴŶŶŹŹŻŻȘș−≤≥fiflΆΈΉΊΌΎΏΐΑΒΓΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΪΫΆΈΉΊΰαβγδεζηθικλνξορςΣΤΥΦΧΨΩΪΫΌΎΏЁЂЃЄЅІЇЈЉЊЋЌЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯЁЂЃЄЅІЇЈЉЊЋЌЎЏѢѢѲѲѴѴҐҐәǽẀẁẂẃẄẅỲỳ№—–-