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

30
Ericsson Internal | 2018-02-21 2019-10-23 | Ericsson 1 EASEly extending Eclipse Trace Compass Bernd Hufmann, Ericsson AB Geneviève Bastien, Polytechnique Montréal 2019-10-23

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

Page 1: EASElyextending Eclipse Trace Compass...2019Ericsson Internal | 2018-10 23 | Ericsson -02-21 4 Eclipse Trace Compassis an open source application to solve performance and reliability

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

Page 2: EASElyextending Eclipse Trace Compass...2019Ericsson Internal | 2018-10 23 | Ericsson -02-21 4 Eclipse Trace Compassis an open source application to solve performance and reliability

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

Agenda

— Background

— Trace Compass and its extensibility

— Trace Compass and EASE

— Demo

— Q&A

Page 3: EASElyextending Eclipse Trace Compass...2019Ericsson Internal | 2018-10 23 | Ericsson -02-21 4 Eclipse Trace Compassis an open source application to solve performance and reliability

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?

Page 4: EASElyextending Eclipse Trace Compass...2019Ericsson Internal | 2018-10 23 | Ericsson -02-21 4 Eclipse Trace Compassis an open source application to solve performance and reliability

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

Page 5: EASElyextending Eclipse Trace Compass...2019Ericsson Internal | 2018-10 23 | Ericsson -02-21 4 Eclipse Trace Compassis an open source application to solve performance and reliability

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

Why is extensibility important for us?

Page 6: EASElyextending Eclipse Trace Compass...2019Ericsson Internal | 2018-10 23 | Ericsson -02-21 4 Eclipse Trace Compassis an open source application to solve performance and reliability

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

Page 7: EASElyextending Eclipse Trace Compass...2019Ericsson Internal | 2018-10 23 | Ericsson -02-21 4 Eclipse Trace Compassis an open source application to solve performance and reliability

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!

Page 8: EASElyextending Eclipse Trace Compass...2019Ericsson Internal | 2018-10 23 | Ericsson -02-21 4 Eclipse Trace Compassis an open source application to solve performance and reliability

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

Page 9: EASElyextending Eclipse Trace Compass...2019Ericsson Internal | 2018-10 23 | Ericsson -02-21 4 Eclipse Trace Compassis an open source application to solve performance and reliability

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

Page 10: EASElyextending Eclipse Trace Compass...2019Ericsson Internal | 2018-10 23 | Ericsson -02-21 4 Eclipse Trace Compassis an open source application to solve performance and reliability

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

Page 11: EASElyextending Eclipse Trace Compass...2019Ericsson Internal | 2018-10 23 | Ericsson -02-21 4 Eclipse Trace Compassis an open source application to solve performance and reliability

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

Page 12: EASElyextending Eclipse Trace Compass...2019Ericsson Internal | 2018-10 23 | Ericsson -02-21 4 Eclipse Trace Compassis an open source application to solve performance and reliability

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

Page 13: EASElyextending Eclipse Trace Compass...2019Ericsson Internal | 2018-10 23 | Ericsson -02-21 4 Eclipse Trace Compassis an open source application to solve performance and reliability

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

Page 14: EASElyextending Eclipse Trace Compass...2019Ericsson Internal | 2018-10 23 | Ericsson -02-21 4 Eclipse Trace Compassis an open source application to solve performance and reliability

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

Page 15: EASElyextending Eclipse Trace Compass...2019Ericsson Internal | 2018-10 23 | Ericsson -02-21 4 Eclipse Trace Compassis an open source application to solve performance and reliability

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

Page 16: EASElyextending Eclipse Trace Compass...2019Ericsson Internal | 2018-10 23 | Ericsson -02-21 4 Eclipse Trace Compassis an open source application to solve performance and reliability

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

Page 17: EASElyextending Eclipse Trace Compass...2019Ericsson Internal | 2018-10 23 | Ericsson -02-21 4 Eclipse Trace Compassis an open source application to solve performance and reliability

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

Page 18: EASElyextending Eclipse Trace Compass...2019Ericsson Internal | 2018-10 23 | Ericsson -02-21 4 Eclipse Trace Compassis an open source application to solve performance and reliability

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

Page 19: EASElyextending Eclipse Trace Compass...2019Ericsson Internal | 2018-10 23 | Ericsson -02-21 4 Eclipse Trace Compassis an open source application to solve performance and reliability

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

Example scripts: Demo

Instrumented application with custom tracepoints

Page 20: EASElyextending Eclipse Trace Compass...2019Ericsson Internal | 2018-10 23 | Ericsson -02-21 4 Eclipse Trace Compassis an open source application to solve performance and reliability

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

Example scripts: Demo

The view we want to get

Page 21: EASElyextending Eclipse Trace Compass...2019Ericsson Internal | 2018-10 23 | Ericsson -02-21 4 Eclipse Trace Compassis an open source application to solve performance and reliability

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

Example scripts: Demo

Step 1:Read events from the trace

Page 22: EASElyextending Eclipse Trace Compass...2019Ericsson Internal | 2018-10 23 | Ericsson -02-21 4 Eclipse Trace Compassis an open source application to solve performance and reliability

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

Example scripts: Demo

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

Page 23: EASElyextending Eclipse Trace Compass...2019Ericsson Internal | 2018-10 23 | Ericsson -02-21 4 Eclipse Trace Compassis an open source application to solve performance and reliability

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)

Page 24: EASElyextending Eclipse Trace Compass...2019Ericsson Internal | 2018-10 23 | Ericsson -02-21 4 Eclipse Trace Compassis an open source application to solve performance and reliability

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

Example scripts: Demo

Step 4:Show a time graph view for the states

Page 25: EASElyextending Eclipse Trace Compass...2019Ericsson Internal | 2018-10 23 | Ericsson -02-21 4 Eclipse Trace Compassis an open source application to solve performance and reliability

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

Page 26: EASElyextending Eclipse Trace Compass...2019Ericsson Internal | 2018-10 23 | Ericsson -02-21 4 Eclipse Trace Compassis an open source application to solve performance and reliability

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

Page 27: EASElyextending Eclipse Trace Compass...2019Ericsson Internal | 2018-10 23 | Ericsson -02-21 4 Eclipse Trace Compassis an open source application to solve performance and reliability

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 ☺)

Page 28: EASElyextending Eclipse Trace Compass...2019Ericsson Internal | 2018-10 23 | Ericsson -02-21 4 Eclipse Trace Compassis an open source application to solve performance and reliability

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

Page 29: EASElyextending Eclipse Trace Compass...2019Ericsson Internal | 2018-10 23 | Ericsson -02-21 4 Eclipse Trace Compassis an open source application to solve performance and reliability

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

— Presenter

— Geneviève Bastien: [email protected]

— Bernd Hufmann: [email protected]

— Mailing list

[email protected]

— IRC

— oftc.net #tracecompass

Contacts

Page 30: EASElyextending Eclipse Trace Compass...2019Ericsson Internal | 2018-10 23 | Ericsson -02-21 4 Eclipse Trace Compassis an open source application to solve performance and reliability

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

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

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

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