From 589d0d33fc0d2bdc75f4d2bd06fbe48e991acc45 Mon Sep 17 00:00:00 2001 From: Bernd Hufmann Date: Mon, 19 Aug 2013 12:59:04 -0400 Subject: [PATCH] lttng: Add snapshot support - LTTng Tools v2.3 Support for commands - lttng create --snapshot OPTIONS - lttng snapshot list-output - lttng snapshot record Not supported - lttng snapshot del-output - lttng snapshot add-output - lttng snapshot record OPTIONS Change-Id: Id8b8a6bc487c0fe792ffe74981f42dbc1d42a81c Signed-off-by: Bernd Hufmann Signed-off-by: Matthew Khouzam Reviewed-on: https://git.eclipse.org/r/16644 Reviewed-by: Marc-Andre Laperle Tested-by: Hudson CI --- .../doc/User-Guide.mediawiki | 24 +- .../LTTng2CreateSessionDialog_Snapshot.png | Bin 0 -> 15579 bytes .../doc/images/LTTng2RecordSnapshotAction.png | Bin 0 -> 32176 bytes .../tests/control/model/impl/AllTests.java | 3 +- .../control/model/impl/ModelImplFactory.java | 22 ++ .../control/model/impl/SessionInfoTest.java | 28 ++- .../control/model/impl/SnapshotInfoTest.java | 229 ++++++++++++++++++ .../core/control/model/ISessionInfo.java | 19 ++ .../core/control/model/ISnapshotInfo.java | 62 +++++ .../core/control/model/impl/SessionInfo.java | 75 +++--- .../core/control/model/impl/SnapshotInfo.java | 150 ++++++++++++ .../control/model/component/AllTests.java | 3 +- .../TraceControlSnapshotSessionTests.java | 220 +++++++++++++++++ .../service/LTTngControlServiceTest.java | 139 +++++++++-- .../dialogs/CreateSessionDialogStub.java | 9 + .../testfiles/CreateSessionTest2.cfg | 158 ++++++++++++ .../testfiles/LTTngServiceTest.cfg | 171 +++++++++++++ .../icons/elcl16/snapshot.gif | Bin 0 -> 613 bytes .../plugin.properties | 3 + org.eclipse.linuxtools.lttng2.ui/plugin.xml | 58 +++++ .../control/dialogs/CreateSessionDialog.java | 27 ++- .../control/dialogs/ICreateSessionDialog.java | 5 + .../views/control/dialogs/ImportDialog.java | 19 +- .../handlers/CreateSessionHandler.java | 4 +- .../views/control/handlers/ImportHandler.java | 2 +- .../control/handlers/SnaphshotHandler.java | 130 ++++++++++ .../ui/views/control/messages/Messages.java | 8 + .../control/messages/messages.properties | 9 + .../model/impl/TargetNodeComponent.java | 8 + .../model/impl/TraceSessionComponent.java | 39 +++ .../control/model/impl/TraceSessionGroup.java | 19 +- .../property/TraceSessionPropertySource.java | 53 +++- .../control/service/ILttngControlService.java | 35 ++- .../control/service/LTTngControlService.java | 120 +++++++-- .../service/LTTngControlServiceConstants.java | 30 ++- 35 files changed, 1782 insertions(+), 99 deletions(-) create mode 100644 org.eclipse.linuxtools.lttng.help/doc/images/LTTng2CreateSessionDialog_Snapshot.png create mode 100644 org.eclipse.linuxtools.lttng.help/doc/images/LTTng2RecordSnapshotAction.png create mode 100644 org.eclipse.linuxtools.lttng2.core.tests/src/org/eclipse/linuxtools/lttng2/core/tests/control/model/impl/SnapshotInfoTest.java create mode 100644 org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/internal/lttng2/core/control/model/ISnapshotInfo.java create mode 100644 org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/internal/lttng2/core/control/model/impl/SnapshotInfo.java create mode 100644 org.eclipse.linuxtools.lttng2.ui.tests/src/org/eclipse/linuxtools/lttng2/ui/tests/control/model/component/TraceControlSnapshotSessionTests.java create mode 100644 org.eclipse.linuxtools.lttng2.ui.tests/testfiles/CreateSessionTest2.cfg create mode 100644 org.eclipse.linuxtools.lttng2.ui/icons/elcl16/snapshot.gif create mode 100644 org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/handlers/SnaphshotHandler.java diff --git a/org.eclipse.linuxtools.lttng.help/doc/User-Guide.mediawiki b/org.eclipse.linuxtools.lttng.help/doc/User-Guide.mediawiki index ccc5d485b1..215e8a0bf1 100644 --- a/org.eclipse.linuxtools.lttng.help/doc/User-Guide.mediawiki +++ b/org.eclipse.linuxtools.lttng.help/doc/User-Guide.mediawiki @@ -938,6 +938,15 @@ The text field '''Trace Path''' allows for specifying the path relative to the l To create a session with advanced options, fill in the relevant parameters and press '''Ok'''. Upon successful operation a new session will be created and added under the tree node '''Sessions'''. +==== Creating a Snapshot Tracing Session ==== +LTTng Tools version v2.3.0 introduces the possibility to create snapshot tracing sessions. After starting tracing the trace events are not stored on disk or over the network. They are only transfered to disk or over the network when the user records a snapshot. To create such a snapshot session, open the trace session dialog as described in chapter [[#Creating a Tracing Session | Creating a Tracing Session]]. + +[[Image:images/LTTng2CreateSessionDialog_Snapshot.png]] + +Fill in all necessary information, select checkbox for '''Snapshot Mode''' and press '''Ok'''. By default, the location for the snapshot output will be on the host where the host is located. + +Refer to chapter [[#Recording a Snapshot | Recording a Snapshot]] for how to create a snapshot. + ==== Enabling Channels - General ==== Enabling channels can be done using a session tree node when the domain hasn't be created in the session or, alternatively on a domain tree node of a session in case the domain is already available. @@ -1199,9 +1208,17 @@ To start tracing, select one or more sessions to start in the Control View and p Upon successful operation, the tracing session will be '''ACTIVE''' and the icon of the session will be updated. +==== Recording a Snapshot ==== + +LTTng Tools version v2.3.0 introduces the possibility to create snapshot tracing sessions. After creating a snapshot session (see [[#Creating a Snapshot Tracing Session | Creating a Snapshot Tracing Session]]) and starting tracing (see [[#Start Tracing | Start Tracing]]) it possible to record snapshots. To record a snapshot select one or more sessions and press the '''Record Snapshot''' button. Alternatively, press the right mouse button on the session tree nodes. A context-sensitive menu will show. Then select the '''Recored Snapshot''' menu item. + +[[Image:images/LTTng2RecordSnapshotAction.png]] + +This action can be executed many times. It is possible to import the recorded snpshots to a tracing project. The trace session might be '''ACTIVE''' or '''INACTIVE''' for that. Refer to section [[#Importing Session Traces to a Tracing Project | Importing Session Traces to a Tracing Project]] on how to import a trace to a tracing project. + ==== Stop Tracing ==== -To stop tracing, select one or more sessions to stop in the Control View and press the '''Stop''' button. Alternatively, click the right mouse button on the session tree nodes. A context-sensitive menu will show. Then select the '''Stop''' menu item. +To stop tracing, select one or more sessions to stop in the Control View and press the '''Stop''' button. Alternatively, click the right mouse button on the session tree node. A context-sensitive menu will show. Then select the '''Stop''' menu item. [[Image:images/LTTng2StopTracingAction.png]] @@ -1288,8 +1305,11 @@ The Control View provides property information of selected tree component. Depen ** '''Log Level''': The log level of the event. * '''Session''' Properties ** '''Session Name''': The name of the Session. -** '''Session Path''': The path on the remote host where the traces will be stored. +** '''Session Path''': The path on the remote host where the traces will be stored. (Not shown for snapshot sessions). ** '''State''': The state of the session ('''ACTIVE''' or '''INACTIVE''') +** '''Snapshot ID''': The snapshot ID. (Only shown for snapshot sessions). +** '''Snapshot Name''': The name of the snapshot output configuration. (Only shown for snapshot sessions). +** '''Snapshot Path''': The path where the snapshot session is located. (Only shown for snapshot sessions). * '''Domain''' Properties ** '''Domain Name''': The name of the domain. ** '''Buffer Type''': The buffer type of the domain. diff --git a/org.eclipse.linuxtools.lttng.help/doc/images/LTTng2CreateSessionDialog_Snapshot.png b/org.eclipse.linuxtools.lttng.help/doc/images/LTTng2CreateSessionDialog_Snapshot.png new file mode 100644 index 0000000000000000000000000000000000000000..7438ab4aca800a26d57a87b1e7fe5f43f7be3837 GIT binary patch literal 15579 zcmc(GWmsI#vnCQCcyNaVf(3#Nu1SF47Cg8Ix8O2JaF+ms210<~790k5cQUxU4GuHx z@Vj@P-Fx@H_jz_d?4A!Z=ggcwr@Fhk-g>L5BUF`TaIq+{kdTmYId1EFFwp)S2hHON51?-LZ+`* zR(7>NGkfK(=F_~iQdY;IX{&eit9&&Gn}ww)04pdGCGzk`KkWzp#CY>wvC7VZPwLH=JyI;fSMF{c6A=0CCbkp~}TTPfvf89z;PvKwv#b zJdF5NwwZKhycgCZJv}>}y<7Lxg11A&=^xcAHj-XpFXBhRa~ zXex%I5$~(D#j-@)lW(B@ALaY2!lm9E!3^{js~4+E*-u&`MTmVn`=!f{NphIEKhqJd-V`nKcuHI{`4MngU}D}!HRxey9wpc9DtdB$ z%+9oYi@`+Or;bz!!#(!PXLvkewwh8Snv+KK{qnP4bNSLG1(gkv;K98B*Dq~FsQ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lVg;S@u{d>aa& z;QzX7f~;azJBk=->_&aH27UL_m5jlO7`e%nO;Oh zL~dzmG^0X_6C(Tu?PrKPoi~efo>CG>h<_0`>#hik>JOA~fp8ye4X58FCPc{3Zg8*U-V(|7p zP6jhQrFp;2xA}>X8GI%1yT5n^wo;+>zcDd2HEp<@)$=<0MaJD5A0PkD)Rexes_HG4 z`MZC%y9kYb0D+XVgw=F(`mfvW4T|x#T!-FDm`)Wa&DSZ-l^fjlNx(X^_xFR#3@6{!fDnPK z&4z0G3?ukDSu~wQ_Tr*GLJPTiPp3qHotoN4UF$tjx;2)#M9hZc1;223hhHOtS$*GE zP71552~&sMblwhk1Y_tnd?AP;<;e3mLHQU*`y?1*gsl+*{gZ3oD9*LY2&tQ!o&BV% z8)Bi`-Q(rlyi_(i`p*tF#Qq;N#3rBr!wA{cBeML$Ii_WJ{_WGIWjSeOsqzoTLH`X% Czr?Tr literal 0 HcmV?d00001 diff --git a/org.eclipse.linuxtools.lttng.help/doc/images/LTTng2RecordSnapshotAction.png b/org.eclipse.linuxtools.lttng.help/doc/images/LTTng2RecordSnapshotAction.png new file mode 100644 index 0000000000000000000000000000000000000000..8c8ae5619c7271a9301cf700222dddcf6b316b5d GIT binary patch literal 32176 zcmbTe1yEdFw=D`G!6mrEN3aC9;I6^l-CY}pMgpO65(qQ|hXi*BPUG(G?%KG^ZNC4V zSLdGlUe&8d71iBq?_PVaHRqaRjA*)Ni6aByz~;o#sMkP%@m zeYWPOu$Q+0aaj#y*q=YLML6s;ipv*W02~}<*XuugA|oa#tdZDVO2=K@*~;C^)Xfsk z+R53`k{Mv`W@+gJuyJ;WBD4y_!Tkd#D=DVoop!YBWstc2(t9=w#FP(XN<@g{5Eqkb zkN6bH%(!Tqq-SSksjHP^YiV`;U^iHmozn1YwPwApW`aPs0beFB{0&Q3pAo3~WR((K z3?AzZ$D<%67KK~+VdDux#>Gx!`5`0`mtLs=nJVc8z5(#b8u$FKF z8a|yr(q@mv`sJbHUlP9V96!DZh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_Db#;A!-vC`$S{g1(=D&X0Usal2aGaKg4LqgR;z9?UFqNB=<4Y`& z0Gv%HX>EOCi6#{sMuPHrOwUhB9k@yg9{Bml0$AtZ>>Txw`eo~2vxz1mB4VL#G=^B> z6Oncu;mgxKYoy=&Au%Oo81OdWIwI8?QzRoJqpzr_ zTi0$tWpcF^6+R6)0K<}2Ry4QHSub}-A?0zB?CtHr$H&B|VMr0eCTv0c!Eo`CB!E3s znhn1J3&!`l(FL@%aWfxg3h$0>yoZ5HTpDkdEQ$c7=kOZ&(}%Nr4}X4qSXfvxN=gIZ zz-r(_(IOIt7~r9XXIL7n*ih&Xfhx+%!a6#5A%grsbyNeaSs4(0u+57xk8%N#h>VuD zu%IAtzV*aWQBhG=R@SEFVO=&;GJ$i{8FY%fv|l0+=`S&h9SYFfc*g zz`FoL{;Gz%aB?rJq3~<^&$zij<;yb^L_Iw&)mj9ZTSNYWhy=kO1M%Yg-UFywg>iT* zhcb!8xHo3L8I?+@_D|C2Yr_kFPW_TB2((#zZRM?yk(eIC?_c+*0HTine`CYxGf(W; XyYFiZ`X0dT>JVZ=(t_puy1xGd?5&%K literal 0 HcmV?d00001 diff --git a/org.eclipse.linuxtools.lttng2.core.tests/src/org/eclipse/linuxtools/lttng2/core/tests/control/model/impl/AllTests.java b/org.eclipse.linuxtools.lttng2.core.tests/src/org/eclipse/linuxtools/lttng2/core/tests/control/model/impl/AllTests.java index fdbf937756..ce0e6e1d80 100644 --- a/org.eclipse.linuxtools.lttng2.core.tests/src/org/eclipse/linuxtools/lttng2/core/tests/control/model/impl/AllTests.java +++ b/org.eclipse.linuxtools.lttng2.core.tests/src/org/eclipse/linuxtools/lttng2/core/tests/control/model/impl/AllTests.java @@ -29,7 +29,8 @@ import org.junit.runners.Suite; ProbeEventInfoTest.class, SessionInfoTest.class, TraceInfoTest.class, - UstProviderInfoTest.class + UstProviderInfoTest.class, + SnapshotInfoTest.class }) public class AllTests { diff --git a/org.eclipse.linuxtools.lttng2.core.tests/src/org/eclipse/linuxtools/lttng2/core/tests/control/model/impl/ModelImplFactory.java b/org.eclipse.linuxtools.lttng2.core.tests/src/org/eclipse/linuxtools/lttng2/core/tests/control/model/impl/ModelImplFactory.java index a756060140..76e340a796 100644 --- a/org.eclipse.linuxtools.lttng2.core.tests/src/org/eclipse/linuxtools/lttng2/core/tests/control/model/impl/ModelImplFactory.java +++ b/org.eclipse.linuxtools.lttng2.core.tests/src/org/eclipse/linuxtools/lttng2/core/tests/control/model/impl/ModelImplFactory.java @@ -19,6 +19,7 @@ import org.eclipse.linuxtools.internal.lttng2.core.control.model.IEventInfo; import org.eclipse.linuxtools.internal.lttng2.core.control.model.IFieldInfo; import org.eclipse.linuxtools.internal.lttng2.core.control.model.IProbeEventInfo; import org.eclipse.linuxtools.internal.lttng2.core.control.model.ISessionInfo; +import org.eclipse.linuxtools.internal.lttng2.core.control.model.ISnapshotInfo; import org.eclipse.linuxtools.internal.lttng2.core.control.model.IUstProviderInfo; import org.eclipse.linuxtools.internal.lttng2.core.control.model.TraceEnablement; import org.eclipse.linuxtools.internal.lttng2.core.control.model.TraceEventType; @@ -31,6 +32,7 @@ import org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.EventInfo; import org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.FieldInfo; import org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.ProbeEventInfo; import org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.SessionInfo; +import org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.SnapshotInfo; import org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.UstProviderInfo; /** @@ -56,6 +58,8 @@ public class ModelImplFactory { private IUstProviderInfo fUstProviderInfo2 = null; private IProbeEventInfo fProbeEventInfo1 = null; private IProbeEventInfo fProbeEventInfo2 = null; + private ISnapshotInfo fSnapshotInfo1 = null; + private ISnapshotInfo fSnapshotInfo2 = null; public ModelImplFactory() { @@ -146,6 +150,16 @@ public class ModelImplFactory { fProbeEventInfo2.setState(TraceEnablement.DISABLED); fProbeEventInfo2.setOffset("0x100"); fProbeEventInfo2.setSymbol("init_post"); + + fSnapshotInfo1 = new SnapshotInfo("snapshot-1"); + fSnapshotInfo1.setId(1); + fSnapshotInfo1.setSnapshotPath("/home/user/lttng-trace/mysession/"); + fSnapshotInfo2 = new SnapshotInfo("other-snapshot"); + fSnapshotInfo2.setId(1); + fSnapshotInfo2.setSnapshotPath("net4://172.0.0.1:1234/"); + fSnapshotInfo2.setStreamedSnapshot(true); + + fSessionInfo1.setSnapshotInfo(fSnapshotInfo1); } public ISessionInfo getSessionInfo1() { @@ -215,4 +229,12 @@ public class ModelImplFactory { public IFieldInfo getFieldInfo2() { return fFieldInfo2; } + + public ISnapshotInfo getSnapshotInfo1() { + return fSnapshotInfo1; + } + + public ISnapshotInfo getSnapshotInfo2() { + return fSnapshotInfo2; + } } diff --git a/org.eclipse.linuxtools.lttng2.core.tests/src/org/eclipse/linuxtools/lttng2/core/tests/control/model/impl/SessionInfoTest.java b/org.eclipse.linuxtools.lttng2.core.tests/src/org/eclipse/linuxtools/lttng2/core/tests/control/model/impl/SessionInfoTest.java index 3a8039c08a..f033772a0d 100644 --- a/org.eclipse.linuxtools.lttng2.core.tests/src/org/eclipse/linuxtools/lttng2/core/tests/control/model/impl/SessionInfoTest.java +++ b/org.eclipse.linuxtools.lttng2.core.tests/src/org/eclipse/linuxtools/lttng2/core/tests/control/model/impl/SessionInfoTest.java @@ -189,7 +189,7 @@ public class SessionInfoTest { String result = fixture.toString(); // add additional test code here - assertEquals("[SessionInfo([TraceInfo(Name=sessionName)],State=INACTIVE,isStreamedTrace=false,Domains=)]", result); + assertEquals("[SessionInfo([TraceInfo(Name=sessionName)],Path=,State=INACTIVE,isStreamedTrace=false,Domains=)]", result); } /** @@ -200,7 +200,31 @@ public class SessionInfoTest { String result = fSessionInfo1.toString(); // add additional test code here - assertEquals("[SessionInfo([TraceInfo(Name=session1)],State=ACTIVE,isStreamedTrace=false,Domains=[DomainInfo([TraceInfo(Name=test1)],Channels=[ChannelInfo([TraceInfo(Name=channel1)],State=DISABLED,OverwriteMode=true,SubBuffersSize=13,NumberOfSubBuffers=12,SwitchTimer=10,ReadTimer=11,output=splice(),Events=[EventInfo([BaseEventInfo([TraceInfo(Name=event1)],type=TRACEPOINT,level=TRACE_DEBUG)],State=ENABLED)])],isKernel=false)])]", result); + assertEquals("[SessionInfo([TraceInfo(Name=session1)],Path=/home/user/lttng-trace/mysession/,State=ACTIVE,isStreamedTrace=false,snapshotInfo=" + + "[SnapshotInfo([TraceInfo(Name=snapshot-1)],snapshotPath=/home/user/lttng-trace/mysession/,ID=1,isStreamedSnapshot=false)]," + + "Domains=[DomainInfo([TraceInfo(Name=test1)]," + + "Channels=[ChannelInfo([TraceInfo(Name=channel1)],State=DISABLED,OverwriteMode=true,SubBuffersSize=13,NumberOfSubBuffers=12,SwitchTimer=10,ReadTimer=11,output=splice()," + + "Events=[EventInfo([BaseEventInfo([TraceInfo(Name=event1)],type=TRACEPOINT,level=TRACE_DEBUG)],State=ENABLED)])]," + + "isKernel=false)])]", result); + } + + /** + * Run the String toString() method test. + */ + @Test + public void testToString_3() { + SessionInfo info = new SessionInfo((SessionInfo)fSessionInfo1); + info.setSnapshotInfo(null); + info.setSessionPath("/home/user/lttng-trace/mysession/"); + + String result = info.toString(); + + // add additional test code here + assertEquals("[SessionInfo([TraceInfo(Name=session1)],Path=/home/user/lttng-trace/mysession/,State=ACTIVE,isStreamedTrace=false," + + "Domains=[DomainInfo([TraceInfo(Name=test1)]," + + "Channels=[ChannelInfo([TraceInfo(Name=channel1)],State=DISABLED,OverwriteMode=true,SubBuffersSize=13,NumberOfSubBuffers=12,SwitchTimer=10,ReadTimer=11,output=splice()," + + "Events=[EventInfo([BaseEventInfo([TraceInfo(Name=event1)],type=TRACEPOINT,level=TRACE_DEBUG)],State=ENABLED)])]," + + "isKernel=false)])]", result); } // ------------------------------------------------------------------------ diff --git a/org.eclipse.linuxtools.lttng2.core.tests/src/org/eclipse/linuxtools/lttng2/core/tests/control/model/impl/SnapshotInfoTest.java b/org.eclipse.linuxtools.lttng2.core.tests/src/org/eclipse/linuxtools/lttng2/core/tests/control/model/impl/SnapshotInfoTest.java new file mode 100644 index 0000000000..75a285d4fe --- /dev/null +++ b/org.eclipse.linuxtools.lttng2.core.tests/src/org/eclipse/linuxtools/lttng2/core/tests/control/model/impl/SnapshotInfoTest.java @@ -0,0 +1,229 @@ +/********************************************************************** + * Copyright (c) 2013 Ericsson + * + * All rights reserved. This program and the accompanying materials are + * made available under the terms of the Eclipse Public License v1.0 which + * accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Bernd Hufmann - Initial API and implementation + **********************************************************************/ + +package org.eclipse.linuxtools.lttng2.core.tests.control.model.impl; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + +import org.eclipse.linuxtools.internal.lttng2.core.control.model.ISnapshotInfo; +import org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.SnapshotInfo; +import org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.TraceInfo; +import org.junit.Before; +import org.junit.Test; + +/** + * The class SnapshotInfoTest contains test for the class + * {@link SnapshotInfo}. + */ +public class SnapshotInfoTest { + + // ------------------------------------------------------------------------ + // Test data + // ------------------------------------------------------------------------ + + private ISnapshotInfo fSnapshotInfo1 = null; + private ISnapshotInfo fSnapshotInfo2 = null; + + + // ------------------------------------------------------------------------ + // Housekeeping + // ------------------------------------------------------------------------ + + /** + * Perform pre-test initialization. + */ + @Before + public void setUp() { + ModelImplFactory factory = new ModelImplFactory(); + fSnapshotInfo1 = factory.getSnapshotInfo1(); + fSnapshotInfo2 = factory.getSnapshotInfo2(); + } + + // ------------------------------------------------------------------------ + // Tests + // ------------------------------------------------------------------------ + + /** + * Constructor test. + */ + @Test + public void testSnapshotInfo() { + SnapshotInfo fixture = new SnapshotInfo("event"); + assertNotNull(fixture); + assertEquals("event", fixture.getName()); + } + + /** + * Test Copy Constructor + */ + @Test + public void testSnapshotInfo2() { + try { + String name = null; + new SnapshotInfo(name); + fail("null name in custructor"); + } + catch (IllegalArgumentException e) { + // Success + } + } + + /** + * Test Copy Constructor + */ + @Test + public void testSnapshotCopy() { + SnapshotInfo info = new SnapshotInfo((SnapshotInfo)fSnapshotInfo1); + + assertEquals(fSnapshotInfo1.getName(), info.getName()); + } + + /** + * Test Copy Constructor + */ + @Test + public void testTraceCopy2() { + try { + SnapshotInfo info = null; + new SnapshotInfo(info); + fail("null copy"); + } + catch (IllegalArgumentException e) { + // Success + } + } + + /** + * Run the void setEventType(String) method test. + */ + @Test + public void testSetName() { + SnapshotInfo fixture = new SnapshotInfo("event"); + fixture.setName("newName"); + assertEquals("newName", fixture.getName()); + } + + /** + * Run the String toString() method test. + */ + @Test + public void testToString_1() { + String result = fSnapshotInfo1.toString(); + + // add additional test code here + assertEquals("[SnapshotInfo([TraceInfo(Name=snapshot-1)],snapshotPath=/home/user/lttng-trace/mysession/,ID=1,isStreamedSnapshot=false)]", result); + } + + // ------------------------------------------------------------------------ + // equals + // ------------------------------------------------------------------------ + + /** + * Run the equals() method test. + */ + @Test + public void testEqualsReflexivity() { + assertTrue("equals", fSnapshotInfo1.equals(fSnapshotInfo1)); + assertTrue("equals", fSnapshotInfo2.equals(fSnapshotInfo2)); + + assertTrue("equals", !fSnapshotInfo1.equals(fSnapshotInfo2)); + assertTrue("equals", !fSnapshotInfo2.equals(fSnapshotInfo1)); + } + + /** + * Run the equals() method test. + */ + @Test + public void testEqualsSymmetry() { + SnapshotInfo info1 = new SnapshotInfo((SnapshotInfo)fSnapshotInfo1); + SnapshotInfo info2 = new SnapshotInfo((SnapshotInfo)fSnapshotInfo2); + + assertTrue("equals", info1.equals(fSnapshotInfo1)); + assertTrue("equals", fSnapshotInfo1.equals(info1)); + + assertTrue("equals", info2.equals(fSnapshotInfo2)); + assertTrue("equals", fSnapshotInfo2.equals(info2)); + } + /** + * Run the equals() method test. + */ + @Test + public void testEqualsTransivity() { + SnapshotInfo info1 = new SnapshotInfo((SnapshotInfo)fSnapshotInfo1); + SnapshotInfo info2 = new SnapshotInfo((SnapshotInfo)fSnapshotInfo1); + SnapshotInfo info3 = new SnapshotInfo((SnapshotInfo)fSnapshotInfo1); + + assertTrue("equals", info1.equals(info2)); + assertTrue("equals", info2.equals(info3)); + assertTrue("equals", info1.equals(info3)); + } + /** + * Run the equals() method test. + */ + @Test + public void testEqualsNull() { + assertTrue("equals", !fSnapshotInfo1.equals(null)); + assertTrue("equals", !fSnapshotInfo2.equals(null)); + + SnapshotInfo info = new SnapshotInfo("snapshot-1"); + assertTrue("equals", !fSnapshotInfo1.equals(info)); + + info.setSnapshotPath(null); + assertTrue("equals", !fSnapshotInfo1.equals(info)); + + info.setId(fSnapshotInfo1.getId()); + assertTrue("equals", !info.equals(fSnapshotInfo1)); + + info.setSnapshotPath("/home/user/lttng-trace/mysession/"); + assertTrue("equals", fSnapshotInfo1.equals(info)); + info.setId(2); + assertTrue("equals", !fSnapshotInfo1.equals(info)); + + info.setId(fSnapshotInfo1.getId()); + info.setStreamedSnapshot(true); + assertTrue("equals", !fSnapshotInfo1.equals(info)); + + assertTrue("equals", !fSnapshotInfo1.equals(new TraceInfo(fSnapshotInfo1.getName()))); + } + + // ------------------------------------------------------------------------ + // hashCode + // ------------------------------------------------------------------------ + + /** + * Run the hashCode() method test. + */ + @Test + public void testHashCode() { + SnapshotInfo info1 = new SnapshotInfo((SnapshotInfo)fSnapshotInfo1); + SnapshotInfo info2 = new SnapshotInfo((SnapshotInfo)fSnapshotInfo2); + + assertTrue("hashCode", fSnapshotInfo1.hashCode() == info1.hashCode()); + assertTrue("hashCode", fSnapshotInfo2.hashCode() == info2.hashCode()); + + assertTrue("hashCode", fSnapshotInfo1.hashCode() != info2.hashCode()); + assertTrue("hashCode", fSnapshotInfo2.hashCode() != info1.hashCode()); + + // null values + SnapshotInfo info3 = new SnapshotInfo("snapshot-1"); + assertTrue("hashCode", fSnapshotInfo1.hashCode() != info3.hashCode()); + + info3.setSnapshotPath(null); + assertTrue("hashCode", fSnapshotInfo1.hashCode() != info3.hashCode()); + + info3.setSnapshotPath("/home/user/lttng-trace/mysession/"); + assertTrue("hashCode", fSnapshotInfo1.hashCode() != info3.hashCode()); + } +} \ No newline at end of file diff --git a/org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/internal/lttng2/core/control/model/ISessionInfo.java b/org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/internal/lttng2/core/control/model/ISessionInfo.java index cf9d4d9c88..3fff6a2d56 100644 --- a/org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/internal/lttng2/core/control/model/ISessionInfo.java +++ b/org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/internal/lttng2/core/control/model/ISessionInfo.java @@ -78,4 +78,23 @@ public interface ISessionInfo extends ITraceInfo { * @param isStreamedTrace true if streamed over network else false */ void setStreamedTrace(boolean isStreamedTrace); + + /** + * Returns whether the session is snapshot session or not + * @return true if it is snapshot session else false + */ + boolean isSnapshotSession(); + + /** + * Gets the snapshot information the session or null if it is not a + * snapshot session. + * @return snapshot information + */ + ISnapshotInfo getSnapshotInfo(); + + /** + * Sets the snapshot information of the session + * @param setSnapshotInfo - the snapshot data to set. + */ + void setSnapshotInfo(ISnapshotInfo setSnapshotInfo); } diff --git a/org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/internal/lttng2/core/control/model/ISnapshotInfo.java b/org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/internal/lttng2/core/control/model/ISnapshotInfo.java new file mode 100644 index 0000000000..4f9c91f704 --- /dev/null +++ b/org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/internal/lttng2/core/control/model/ISnapshotInfo.java @@ -0,0 +1,62 @@ +/********************************************************************** + * Copyright (c) 2013 Ericsson + * + * All rights reserved. This program and the accompanying materials are + * made available under the terms of the Eclipse Public License v1.0 which + * accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Bernd Hufmann - Initial API and implementation + **********************************************************************/ +package org.eclipse.linuxtools.internal.lttng2.core.control.model; + + +/** + *

+ * Interface for retrieval of snapshot information of a session. + *

+ * + * @author Bernd Hufmann + */ +public interface ISnapshotInfo extends ITraceInfo { + + /** + * @return path string where snapshot is located. + */ + String getSnapshotPath(); + + /** + * Sets the path string (where snapshot is located) to the given value. + * @param path - session path to set. + */ + void setSnapshotPath(String path); + + /** + * @return the snapshot ID. + */ + int getId(); + + /** + * Sets the snapshot ID. + * @param id - the ID to set. + */ + void setId(int id); + + /** + * Sets whether snapshot is streamed over the network or stored locally + * at the tracers host. + * + * @param isStreamed - true if streamed else false + */ + void setStreamedSnapshot(boolean isStreamed); + + /** + * Gets whether snapshot is streamed over the network or stored locally + * at the tracers host. + * + * @return true if streamed else false + */ + boolean isStreamedSnapshot(); + +} diff --git a/org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/internal/lttng2/core/control/model/impl/SessionInfo.java b/org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/internal/lttng2/core/control/model/impl/SessionInfo.java index ec6b953442..ac660757e3 100644 --- a/org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/internal/lttng2/core/control/model/impl/SessionInfo.java +++ b/org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/internal/lttng2/core/control/model/impl/SessionInfo.java @@ -18,6 +18,7 @@ import java.util.List; import org.eclipse.linuxtools.internal.lttng2.core.control.model.IDomainInfo; import org.eclipse.linuxtools.internal.lttng2.core.control.model.ISessionInfo; +import org.eclipse.linuxtools.internal.lttng2.core.control.model.ISnapshotInfo; import org.eclipse.linuxtools.internal.lttng2.core.control.model.TraceSessionState; /** @@ -49,6 +50,11 @@ public class SessionInfo extends TraceInfo implements ISessionInfo { * Flag to indicate whether trace is streamed over network or not. */ private boolean fIsStreamedTrace = false; + /** + * Flag to indicate whether the session is a snapshot session or not. + */ + private ISnapshotInfo fSnapshotInfo = null; + // ------------------------------------------------------------------------ // Constructors @@ -70,6 +76,7 @@ public class SessionInfo extends TraceInfo implements ISessionInfo { fState = other.fState; fSessionPath = other.fSessionPath; fIsStreamedTrace = other.fIsStreamedTrace; + fSnapshotInfo = other.fSnapshotInfo; for (Iterator iterator = other.fDomains.iterator(); iterator.hasNext();) { IDomainInfo domain = iterator.next(); @@ -106,6 +113,9 @@ public class SessionInfo extends TraceInfo implements ISessionInfo { @Override public String getSessionPath() { + if(isSnapshotSession()) { + return fSnapshotInfo.getSnapshotPath(); + } return fSessionPath; } @@ -130,6 +140,9 @@ public class SessionInfo extends TraceInfo implements ISessionInfo { @Override public boolean isStreamedTrace() { + if (isSnapshotSession()) { + return fSnapshotInfo.isStreamedSnapshot(); + } return fIsStreamedTrace; } @@ -138,67 +151,47 @@ public class SessionInfo extends TraceInfo implements ISessionInfo { fIsStreamedTrace = isStreamedTrace; } - // ------------------------------------------------------------------------ - // Operations - // ------------------------------------------------------------------------ + @Override + public boolean isSnapshotSession() { + return fSnapshotInfo != null; + } @Override - public void addDomain(IDomainInfo domainInfo) { - fDomains.add(domainInfo); + public ISnapshotInfo getSnapshotInfo() { + return fSnapshotInfo; } @Override - public int hashCode() { - final int prime = 31; - int result = super.hashCode(); - result = prime * result + fDomains.hashCode(); - result = prime * result + (fIsStreamedTrace ? 1231 : 1237); - result = prime * result + ((fSessionPath == null) ? 0 : fSessionPath.hashCode()); - result = prime * result + ((fState == null) ? 0 : fState.hashCode()); - return result; + public void setSnapshotInfo(ISnapshotInfo info) { + fSnapshotInfo = info; } + // ------------------------------------------------------------------------ + // Operations + // ------------------------------------------------------------------------ + @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (!super.equals(obj)) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - SessionInfo other = (SessionInfo) obj; - if (!fDomains.equals(other.fDomains)) { - return false; - } - if (fIsStreamedTrace != other.fIsStreamedTrace) { - return false; - } - if (fSessionPath == null) { - if (other.fSessionPath != null) { - return false; - } - } else if (!fSessionPath.equals(other.fSessionPath)) { - return false; - } - if (fState != other.fState) { - return false; - } - return true; + public void addDomain(IDomainInfo domainInfo) { + fDomains.add(domainInfo); } + @SuppressWarnings("nls") @Override public String toString() { StringBuffer output = new StringBuffer(); output.append("[SessionInfo("); output.append(super.toString()); + output.append(",Path="); + output.append(getSessionPath()); output.append(",State="); output.append(fState); output.append(",isStreamedTrace="); output.append(fIsStreamedTrace); + if (fSnapshotInfo != null) { + output.append(",snapshotInfo="); + output.append(fSnapshotInfo.toString()); + } output.append(",Domains="); for (Iterator iterator = fDomains.iterator(); iterator.hasNext();) { IDomainInfo domain = iterator.next(); diff --git a/org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/internal/lttng2/core/control/model/impl/SnapshotInfo.java b/org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/internal/lttng2/core/control/model/impl/SnapshotInfo.java new file mode 100644 index 0000000000..352e7f9ce1 --- /dev/null +++ b/org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/internal/lttng2/core/control/model/impl/SnapshotInfo.java @@ -0,0 +1,150 @@ +/********************************************************************** + * Copyright (c) 2013 Ericsson + * + * All rights reserved. This program and the accompanying materials are + * made available under the terms of the Eclipse Public License v1.0 which + * accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Bernd Hufmann - Initial API and implementation + **********************************************************************/ +package org.eclipse.linuxtools.internal.lttng2.core.control.model.impl; + +import org.eclipse.linuxtools.internal.lttng2.core.control.model.ISnapshotInfo; + +/** + *

+ * Implementation of the snapshot interface (ISnapshotInfo) to store snapshot + * related data. + *

+ * + * @author Bernd Hufmann + */ +public class SnapshotInfo extends TraceInfo implements ISnapshotInfo { + + // ------------------------------------------------------------------------ + // Attributes + // ------------------------------------------------------------------------ + /** The snapshot path for storing traces. */ + private String fPath = ""; //$NON-NLS-1$ + /** The snapshot ID */ + private int fId = -1; + /** Flag whether snapshot is stored over the network or locally */ + private boolean fIsStreamed = false; + + // ------------------------------------------------------------------------ + // Constructors + // ------------------------------------------------------------------------ + /** + * Constructor + * @param name - name of base event + */ + public SnapshotInfo(String name) { + super(name); + } + + /** + * Copy constructor + * @param other - the instance to copy + */ + public SnapshotInfo(SnapshotInfo other) { + super(other); + fPath = other.fPath; + fId = other.fId; + fIsStreamed = other.fIsStreamed; + } + + // ------------------------------------------------------------------------ + // Accessors + // ------------------------------------------------------------------------ + + @Override + public String getSnapshotPath() { + return fPath; + } + + @Override + public void setSnapshotPath(String path) { + fPath = path; + } + + @Override + public int getId() { + return fId; + } + + @Override + public void setId(int id) { + fId = id; + } + + @Override + public void setStreamedSnapshot(boolean isStreamed) { + fIsStreamed = isStreamed; + } + + @Override + public boolean isStreamedSnapshot() { + return fIsStreamed; + } + + // ------------------------------------------------------------------------ + // Operations + // ------------------------------------------------------------------------ + + @Override + public int hashCode() { + final int prime = 31; + int result = super.hashCode(); + result = prime * result + fId; + result = prime * result + (fIsStreamed ? 1231 : 1237); + result = prime * result + ((fPath == null) ? 0 : fPath.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!super.equals(obj)) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + SnapshotInfo other = (SnapshotInfo) obj; + if (fId != other.fId) { + return false; + } + if (fIsStreamed != other.fIsStreamed) { + return false; + } + if (fPath == null) { + if (other.fPath != null) { + return false; + } + } else if (!fPath.equals(other.fPath)) { + return false; + } + return true; + } + + @SuppressWarnings("nls") + @Override + public String toString() { + StringBuffer output = new StringBuffer(); + output.append("[SnapshotInfo("); + output.append(super.toString()); + output.append(",snapshotPath="); + output.append(fPath); + output.append(",ID="); + output.append(fId); + output.append(",isStreamedSnapshot="); + output.append(fIsStreamed); + output.append(")]"); + return output.toString(); + } + +} diff --git a/org.eclipse.linuxtools.lttng2.ui.tests/src/org/eclipse/linuxtools/lttng2/ui/tests/control/model/component/AllTests.java b/org.eclipse.linuxtools.lttng2.ui.tests/src/org/eclipse/linuxtools/lttng2/ui/tests/control/model/component/AllTests.java index dcca208ac9..86d433445a 100644 --- a/org.eclipse.linuxtools.lttng2.ui.tests/src/org/eclipse/linuxtools/lttng2/ui/tests/control/model/component/AllTests.java +++ b/org.eclipse.linuxtools.lttng2.ui.tests/src/org/eclipse/linuxtools/lttng2/ui/tests/control/model/component/AllTests.java @@ -30,7 +30,8 @@ import org.junit.runners.Suite; TraceControlTreeModelTest.class, TraceControlUstProviderTests.class, TraceControlUstSessionTests.class, - TraceControlUstSessionTests2.class + TraceControlUstSessionTests2.class, + TraceControlSnapshotSessionTests.class }) public class AllTests { diff --git a/org.eclipse.linuxtools.lttng2.ui.tests/src/org/eclipse/linuxtools/lttng2/ui/tests/control/model/component/TraceControlSnapshotSessionTests.java b/org.eclipse.linuxtools.lttng2.ui.tests/src/org/eclipse/linuxtools/lttng2/ui/tests/control/model/component/TraceControlSnapshotSessionTests.java new file mode 100644 index 0000000000..e3a147e8d7 --- /dev/null +++ b/org.eclipse.linuxtools.lttng2.ui.tests/src/org/eclipse/linuxtools/lttng2/ui/tests/control/model/component/TraceControlSnapshotSessionTests.java @@ -0,0 +1,220 @@ +/********************************************************************** + * Copyright (c) 2013 Ericsson + * + * All rights reserved. This program and the accompanying materials are + * made available under the terms of the Eclipse Public License v1.0 which + * accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Bernd Hufmann - Initial API and implementation + **********************************************************************/ + +package org.eclipse.linuxtools.lttng2.ui.tests.control.model.component; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.io.File; +import java.net.URL; +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.core.runtime.FileLocator; +import org.eclipse.core.runtime.Path; +import org.eclipse.linuxtools.internal.lttng2.core.control.model.TargetNodeState; +import org.eclipse.linuxtools.internal.lttng2.core.control.model.TraceSessionState; +import org.eclipse.linuxtools.internal.lttng2.stubs.dialogs.CreateSessionDialogStub; +import org.eclipse.linuxtools.internal.lttng2.stubs.dialogs.DestroyConfirmDialogStub; +import org.eclipse.linuxtools.internal.lttng2.stubs.dialogs.GetEventInfoDialogStub; +import org.eclipse.linuxtools.internal.lttng2.stubs.service.TestRemoteSystemProxy; +import org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.TraceControlDialogFactory; +import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent; +import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TargetNodeComponent; +import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceSessionComponent; +import org.eclipse.linuxtools.internal.lttng2.ui.views.control.property.TraceSessionPropertySource; +import org.eclipse.rse.core.RSECorePlugin; +import org.eclipse.rse.core.model.IHost; +import org.eclipse.rse.core.model.ISystemProfile; +import org.eclipse.rse.core.model.ISystemRegistry; +import org.eclipse.ui.views.properties.IPropertyDescriptor; +import org.eclipse.ui.views.properties.IPropertySource; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.osgi.framework.FrameworkUtil; + +/** + * The class TraceControlSnapshotSessionTests contains Snapshot + * session test cases for support of LTTng Tools 2.3. + */ +public class TraceControlSnapshotSessionTests { + + // ------------------------------------------------------------------------ + // Constants + // ------------------------------------------------------------------------ + + private static final String TEST_STREAM = "CreateSessionTest2.cfg"; + private static final String SCEN_CREATE_SESSION = "ScenCreateSession"; + + // ------------------------------------------------------------------------ + // Test data + // ------------------------------------------------------------------------ + + private TraceControlTestFacility fFacility; + private TestRemoteSystemProxy fProxy; + private String fTestFile; + + // ------------------------------------------------------------------------ + // Housekeeping + // ------------------------------------------------------------------------ + + /** + * Perform pre-test initialization. + * + * @throws Exception + * if the initialization fails for some reason + */ + @Before + public void setUp() throws Exception { + fFacility = TraceControlTestFacility.getInstance(); + fFacility.init(); + fProxy = new TestRemoteSystemProxy(); + URL location = FileLocator.find(FrameworkUtil.getBundle(this.getClass()), new Path(TraceControlTestFacility.DIRECTORY + File.separator + TEST_STREAM), null); + File testfile = new File(FileLocator.toFileURL(location).toURI()); + fTestFile = testfile.getAbsolutePath(); + } + + /** + * Perform post-test clean-up. + */ + @After + public void tearDown() { + fFacility.waitForJobs(); + fFacility.dispose(); + } + + /** + * Run the TraceControlComponent. + * + * @throws Exception + * This will fail the test + */ + @Test + public void testTraceSessionTree() throws Exception { + + fProxy.setTestFile(fTestFile); + fProxy.setScenario(TraceControlTestFacility.SCEN_INIT_TEST); + + ITraceControlComponent root = fFacility.getControlView().getTraceControlRoot(); + + ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry(); + ISystemProfile profile = registry.createSystemProfile("myProfile", true); + IHost host = registry.createLocalHost(profile, "myProfile", "user"); + + TargetNodeComponent node = new TargetNodeComponent("myNode", root, host, fProxy); + + root.addChild(node); + fFacility.waitForJobs(); + + fFacility.executeCommand(node, "connect"); + int i = 0; + while ((i < 10) && (node.getTargetNodeState() != TargetNodeState.CONNECTED)) { + i++; + fFacility.delay(TraceControlTestFacility.GUI_REFESH_DELAY); + } + + // Get provider groups + ITraceControlComponent[] groups = node.getChildren(); + assertNotNull(groups); + assertEquals(2, groups.length); + + // Initialize dialog implementations for command execution + // --- snapshot session --- + CreateSessionDialogStub sessionDialog = new CreateSessionDialogStub(); + sessionDialog.setSnapshot(true); + + TraceControlDialogFactory.getInstance().setCreateSessionDialog(sessionDialog); + TraceControlDialogFactory.getInstance().setGetEventInfoDialog(new GetEventInfoDialogStub()); + TraceControlDialogFactory.getInstance().setConfirmDialog(new DestroyConfirmDialogStub()); + + // Initialize scenario + fProxy.setScenario(SCEN_CREATE_SESSION); + + // ------------------------------------------------------------------------ + // Create session + // ------------------------------------------------------------------------ + TraceSessionComponent session = fFacility.createSession(groups[1]); + + // Verify that session was created + assertNotNull(session); + assertEquals("mysession", session.getName()); + assertTrue(session.isSnapshotSession()); + assertNotNull(session.getSnapshotInfo()); + assertEquals("snapshot-1", session.getSnapshotInfo().getName()); + assertEquals("/home/user/lttng-traces/mysession-20130913-141651", session.getSnapshotInfo().getSnapshotPath()); + assertEquals(1, session.getSnapshotInfo().getId()); + + // ------------------------------------------------------------------------ + // Start session + // ------------------------------------------------------------------------ + fFacility.startSession(session); + assertEquals(TraceSessionState.ACTIVE, session.getSessionState()); + + // verify properties + Object adapter = session.getAdapter(IPropertySource.class); + assertNotNull(adapter); + assertTrue(adapter instanceof TraceSessionPropertySource); + + TraceSessionPropertySource sessionSource = (TraceSessionPropertySource)adapter; + IPropertyDescriptor[] descriptors = sessionSource.getPropertyDescriptors(); + assertNotNull(descriptors); + + Map map = new HashMap(); + map.put(TraceSessionPropertySource.TRACE_SESSION_NAME_PROPERTY_ID, "mysession"); + map.put(TraceSessionPropertySource.TRACE_SNAPSHOT_NAME_PROPERTY_ID, "snapshot-1"); + map.put(TraceSessionPropertySource.TRACE_SNAPSHOT_PATH_PROPERTY_ID, "/home/user/lttng-traces/mysession-20130913-141651"); + map.put(TraceSessionPropertySource.TRACE_SNAPSHOT_ID_PROPERTY_ID, "1"); + map.put(TraceSessionPropertySource.TRACE_SESSION_STATE_PROPERTY_ID, TraceSessionState.ACTIVE.name()); + + for (int j = 0; j < descriptors.length; j++) { + String expected = map.get(descriptors[j].getId()); + assertNotNull(expected); + assertEquals(expected, sessionSource.getPropertyValue(descriptors[j].getId()).toString()); + } + + // ------------------------------------------------------------------------ + // Record snapshot + // ------------------------------------------------------------------------ + fFacility.executeCommand(session, "snapshot"); + + // ------------------------------------------------------------------------ + // Stop snapshot + // ------------------------------------------------------------------------ + fFacility.stopSession(session); + assertEquals(TraceSessionState.INACTIVE, session.getSessionState()); + + // ------------------------------------------------------------------------ + // Destroy session + // ------------------------------------------------------------------------ + fFacility.destroySession(session); + + // Verify that no more session components exist + assertEquals(0, groups[1].getChildren().length); + + //------------------------------------------------------------------------- + // Disconnect node + //------------------------------------------------------------------------- + fFacility.executeCommand(node, "disconnect"); + assertEquals(TargetNodeState.DISCONNECTED, node.getTargetNodeState()); + + //------------------------------------------------------------------------- + // Delete node + //------------------------------------------------------------------------- + + fFacility.executeCommand(node, "delete"); + + assertEquals(0,fFacility.getControlView().getTraceControlRoot().getChildren().length); + } +} \ No newline at end of file diff --git a/org.eclipse.linuxtools.lttng2.ui.tests/src/org/eclipse/linuxtools/lttng2/ui/tests/control/service/LTTngControlServiceTest.java b/org.eclipse.linuxtools.lttng2.ui.tests/src/org/eclipse/linuxtools/lttng2/ui/tests/control/service/LTTngControlServiceTest.java index d4fd95a874..ddf7ee811f 100644 --- a/org.eclipse.linuxtools.lttng2.ui.tests/src/org/eclipse/linuxtools/lttng2/ui/tests/control/service/LTTngControlServiceTest.java +++ b/org.eclipse.linuxtools.lttng2.ui.tests/src/org/eclipse/linuxtools/lttng2/ui/tests/control/service/LTTngControlServiceTest.java @@ -35,6 +35,7 @@ import org.eclipse.linuxtools.internal.lttng2.core.control.model.IDomainInfo; import org.eclipse.linuxtools.internal.lttng2.core.control.model.IEventInfo; import org.eclipse.linuxtools.internal.lttng2.core.control.model.IFieldInfo; import org.eclipse.linuxtools.internal.lttng2.core.control.model.ISessionInfo; +import org.eclipse.linuxtools.internal.lttng2.core.control.model.ISnapshotInfo; import org.eclipse.linuxtools.internal.lttng2.core.control.model.IUstProviderInfo; import org.eclipse.linuxtools.internal.lttng2.core.control.model.LogLevelType; import org.eclipse.linuxtools.internal.lttng2.core.control.model.TraceEnablement; @@ -100,6 +101,9 @@ public class LTTngControlServiceTest { private static final String SCEN_CALIBRATE_HANDLING = "CalibrateHandling"; private static final String SCEN_CREATE_SESSION_2_1 = "CreateSessionLttng2.1"; private static final String SCEN_CREATE_SESSION_VERBOSE_2_1 = "CreateSessionLttngVerbose2.1"; + private static final String SCEN_CREATE_SNAPSHOT_SESSION = "CreateSessionSnapshot"; + private static final String SCEN_CREATE_STREAMED_SNAPSHOT_SESSION = "CreateSessionStreamedSnapshot"; + private static final String SCEN_CREATE_SNAPSHOT_SESSION_ERRORS = "CreateSessionSnapshotErrors"; // ------------------------------------------------------------------------ // Test data @@ -707,7 +711,7 @@ public class LTTngControlServiceTest { try { fShell.setScenario(SCEN_CREATE_SESSION1); - ISessionInfo info = fService.createSession("mysession2", null, new NullProgressMonitor()); + ISessionInfo info = fService.createSession("mysession2", null, false, new NullProgressMonitor()); assertNotNull(info); assertEquals("mysession2", info.getName()); assertNotNull(info.getSessionPath()); @@ -726,7 +730,7 @@ public class LTTngControlServiceTest { fShell.setScenario(SCEN_CREATE_SESSION_WITH_PROMPT); // First line has no shell prompt before the output - ISessionInfo info = fService.createSession("mysession2", null, new NullProgressMonitor()); + ISessionInfo info = fService.createSession("mysession2", null, false, new NullProgressMonitor()); assertNotNull(info); assertEquals("mysession2", info.getName()); assertNotNull(info.getSessionPath()); @@ -743,28 +747,28 @@ public class LTTngControlServiceTest { fShell.setScenario(SCEN_CREATE_SESSION_VARIANTS); try { - fService.createSession("alreadyExist", null, new NullProgressMonitor()); + fService.createSession("alreadyExist", null, false, new NullProgressMonitor()); fail("No exeption thrown"); } catch (ExecutionException e) { // success } try { - fService.createSession("wrongName", null, new NullProgressMonitor()); + fService.createSession("wrongName", null, false, new NullProgressMonitor()); fail("No exeption thrown"); } catch (ExecutionException e) { // success } try { - fService.createSession("withPath", "/home/user/hallo", new NullProgressMonitor()); + fService.createSession("withPath", "/home/user/hallo", false, new NullProgressMonitor()); fail("No exeption thrown"); } catch (ExecutionException e) { // success } try { - ISessionInfo info = fService.createSession("session with spaces", null, new NullProgressMonitor()); + ISessionInfo info = fService.createSession("session with spaces", null, false, new NullProgressMonitor()); assertNotNull(info); assertEquals("session with spaces", info.getName()); assertNotNull(info.getSessionPath()); @@ -776,7 +780,7 @@ public class LTTngControlServiceTest { } try { - ISessionInfo info = fService.createSession("pathWithSpaces", "/home/user/hallo user/here", new NullProgressMonitor()); + ISessionInfo info = fService.createSession("pathWithSpaces", "/home/user/hallo user/here", false, new NullProgressMonitor()); assertNotNull(info); assertEquals("pathWithSpaces", info.getName()); assertNotNull(info.getSessionPath()); @@ -1162,35 +1166,35 @@ public class LTTngControlServiceTest { try { fShell.setScenario(SCEN_CREATE_SESSION_2_1); - ISessionInfo info = fService.createSession("mysession", "net://172.0.0.1", null, null, new NullProgressMonitor()); + ISessionInfo info = fService.createSession("mysession", "net://172.0.0.1", null, null, false, new NullProgressMonitor()); assertNotNull(info); assertEquals("mysession", info.getName()); assertEquals("net://172.0.0.1", info.getSessionPath()); assertTrue(info.isStreamedTrace()); fService.destroySession("mysession", new NullProgressMonitor()); - info = fService.createSession("mysession", "file:///tmp", null, null, new NullProgressMonitor()); + info = fService.createSession("mysession", "file:///tmp", null, null, false, new NullProgressMonitor()); assertNotNull(info); assertEquals("mysession", info.getName()); assertEquals("file:///tmp", info.getSessionPath()); assertTrue(!info.isStreamedTrace()); fService.destroySession("mysession", new NullProgressMonitor()); - info = fService.createSession("mysession", "file:///tmp", null, null, new NullProgressMonitor()); + info = fService.createSession("mysession", "file:///tmp", null, null, false, new NullProgressMonitor()); assertNotNull(info); assertEquals("mysession", info.getName()); assertEquals("file:///tmp", info.getSessionPath()); assertTrue(!info.isStreamedTrace()); fService.destroySession("mysession", new NullProgressMonitor()); - info = fService.createSession("mysession", null, "tcp://172.0.0.1", "tcp://172.0.0.1:5343", new NullProgressMonitor()); + info = fService.createSession("mysession", null, "tcp://172.0.0.1", "tcp://172.0.0.1:5343", false, new NullProgressMonitor()); assertNotNull(info); assertEquals("mysession", info.getName()); assertEquals("", info.getSessionPath()); // the complete network path is not available at this point assertTrue(info.isStreamedTrace()); fService.destroySession("mysession", new NullProgressMonitor()); - info = fService.createSession("mysession", "net://172.0.0.1:1234:2345", null, null, new NullProgressMonitor()); + info = fService.createSession("mysession", "net://172.0.0.1:1234:2345", null, null, false, new NullProgressMonitor()); assertNotNull(info); assertEquals("mysession", info.getName()); assertEquals("net://172.0.0.1:1234:2345", info.getSessionPath()); @@ -1199,7 +1203,7 @@ public class LTTngControlServiceTest { // verbose enableVerbose(); - info = fService.createSession("mysession", "net://172.0.0.1", null, null, new NullProgressMonitor()); + info = fService.createSession("mysession", "net://172.0.0.1", null, null, false, new NullProgressMonitor()); assertNotNull(info); assertEquals("mysession", info.getName()); assertEquals("net://172.0.0.1", info.getSessionPath()); @@ -1219,7 +1223,7 @@ public class LTTngControlServiceTest { fShell.setScenario(SCEN_CREATE_SESSION_VERBOSE_2_1); enableVerbose(); - ISessionInfo info = fService.createSession("mysession", "net://172.0.0.1", null, null, new NullProgressMonitor()); + ISessionInfo info = fService.createSession("mysession", "net://172.0.0.1", null, null, false, new NullProgressMonitor()); assertNotNull(info); assertEquals("mysession", info.getName()); assertEquals("net://172.0.0.1", info.getSessionPath()); @@ -1232,6 +1236,113 @@ public class LTTngControlServiceTest { } } + @Test + public void testCreateSnapshotSession() { + try { + fShell.setScenario(SCEN_CREATE_SNAPSHOT_SESSION); + + ISessionInfo sessionInfo = fService.createSession("mysession", null, true, new NullProgressMonitor()); + assertNotNull(sessionInfo); + assertEquals("mysession", sessionInfo.getName()); + assertTrue(sessionInfo.isSnapshotSession()); + assertEquals("", sessionInfo.getSessionPath()); + assertTrue(!sessionInfo.isStreamedTrace()); + + assertEquals(TraceSessionState.INACTIVE, sessionInfo.getSessionState()); + + String[] names = fService.getSessionNames(new NullProgressMonitor()); + assertEquals(names[0], "mysession"); + + ISnapshotInfo snapshotInfo = fService.getSnapshotInfo("mysession", new NullProgressMonitor()); + assertNotNull(snapshotInfo); + assertEquals("snapshot-1", snapshotInfo.getName()); + assertEquals("/home/user/lttng-traces/mysession-20130913-141651", snapshotInfo.getSnapshotPath()); + assertEquals(1, snapshotInfo.getId()); + assertTrue(!snapshotInfo.isStreamedSnapshot()); + + // we need to set the snapshotInfo to so that the session path is set correctly + sessionInfo.setSnapshotInfo(snapshotInfo); + assertEquals("/home/user/lttng-traces/mysession-20130913-141651", sessionInfo.getSessionPath()); + + fService.recordSnapshot("mysession", new NullProgressMonitor()); + + fService.destroySession("mysession", new NullProgressMonitor()); + + } catch (ExecutionException e) { + fail(e.toString()); + } + } + + public void testCreateStreamedSnapshotSession() { + try { + fShell.setScenario(SCEN_CREATE_STREAMED_SNAPSHOT_SESSION); + + ISessionInfo sessionInfo = fService.createSession("mysession", "net://172.0.0.1", null, null, false, new NullProgressMonitor()); + assertNotNull(sessionInfo); + assertEquals("mysession", sessionInfo.getName()); + assertTrue(sessionInfo.isSnapshotSession()); + + assertEquals(TraceSessionState.INACTIVE, sessionInfo.getSessionState()); + assertTrue(sessionInfo.isStreamedTrace()); + + String[] names = fService.getSessionNames(new NullProgressMonitor()); + assertEquals(names[0], "mysession"); + + + ISnapshotInfo snapshotInfo = sessionInfo.getSnapshotInfo(); + assertNotNull(sessionInfo); + assertEquals("snapshot-2", snapshotInfo.getName()); + assertEquals("net4://172.0.0.1:5342/", snapshotInfo.getSnapshotPath()); + assertEquals(2, snapshotInfo.getId()); + assertTrue(snapshotInfo.isStreamedSnapshot()); + + // we need to set the snapshotInfo to so that the session path is set correctly + sessionInfo.setSnapshotInfo(snapshotInfo); + assertEquals("net4://172.0.0.1:5342/", sessionInfo.getSessionPath()); + + fService.recordSnapshot("mysession", new NullProgressMonitor()); + + fService.destroySession("mysession", new NullProgressMonitor()); + + } catch (ExecutionException e) { + fail(e.toString()); + } + } + + + @Test + public void testCreateSnapshotSessionErrors() { + try { + fShell.setScenario(SCEN_CREATE_SNAPSHOT_SESSION_ERRORS); + + String[] names = fService.getSessionNames(new NullProgressMonitor()); + assertEquals(names[0], "mysession"); + } catch (ExecutionException e) { + fail(e.toString()); + } + + try { + fService.getSnapshotInfo("blabla", new NullProgressMonitor()); + fail("getSnapshoInfo() didn't fail"); + } catch (ExecutionException e) { + // successful + } + + try { + fService.recordSnapshot("blabla", new NullProgressMonitor()); + fail("getSnapshoInfo() didn't fail"); + } catch (ExecutionException e) { + // successful + } + + try { + fService.recordSnapshot("mysession", new NullProgressMonitor()); + fail("getSnapshoInfo() didn't fail"); + } catch (ExecutionException e) { + // successful + } + } + private static void enableVerbose() { // verbose ControlCommandLogger.init(ControlPreferences.getInstance().getLogfilePath(), false); diff --git a/org.eclipse.linuxtools.lttng2.ui.tests/stubs/org/eclipse/linuxtools/internal/lttng2/stubs/dialogs/CreateSessionDialogStub.java b/org.eclipse.linuxtools.lttng2.ui.tests/stubs/org/eclipse/linuxtools/internal/lttng2/stubs/dialogs/CreateSessionDialogStub.java index 673021cd07..599e24a61c 100644 --- a/org.eclipse.linuxtools.lttng2.ui.tests/stubs/org/eclipse/linuxtools/internal/lttng2/stubs/dialogs/CreateSessionDialogStub.java +++ b/org.eclipse.linuxtools.lttng2.ui.tests/stubs/org/eclipse/linuxtools/internal/lttng2/stubs/dialogs/CreateSessionDialogStub.java @@ -27,6 +27,7 @@ public class CreateSessionDialogStub implements ICreateSessionDialog { private String fNetworkUrl = null; private String fControlUrl = null; private String fDataUrl = null; + private boolean fIsSnapshot; @Override public String getSessionName() { @@ -97,4 +98,12 @@ public class CreateSessionDialogStub implements ICreateSessionDialog { this.fDataUrl = fDataUrl; } + @Override + public boolean isSnapshot() { + return fIsSnapshot; + } + + public void setSnapshot(boolean isSnapshot) { + fIsSnapshot = isSnapshot; + } } diff --git a/org.eclipse.linuxtools.lttng2.ui.tests/testfiles/CreateSessionTest2.cfg b/org.eclipse.linuxtools.lttng2.ui.tests/testfiles/CreateSessionTest2.cfg new file mode 100644 index 0000000000..808a51f369 --- /dev/null +++ b/org.eclipse.linuxtools.lttng2.ui.tests/testfiles/CreateSessionTest2.cfg @@ -0,0 +1,158 @@ +#################################################################### +# Copyright (c) 2013 Ericsson +# +# All rights reserved. This program and the accompanying materials are +# made available under the terms of the Eclipse Public License v1.0 which +# accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Bernd Hufmann - Initial API and implementation +#################################################################### +#################################################################### +# Scenario: Initialize +#################################################################### + +Initialize + +lttng version + + +0 + + +lttng version 2.3.0 - Dominus Vobiscum + +A very succulent line-up of beers brewed at Microbrasserie Charlevoix. Elaborated starting from special malts and fermented with a Belgian yeast. These beers are refermented in bottle and will make you discover the richness of wheat, amber and triple styles. + +Web site: http://lttng.org + +lttng is free software and under the GPL license and part LGPL + + + +lttng list + + +0 + + +Currently no available tracing session + + + +lttng list -k + + +0 + + +Kernel events +------------- + sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) + sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) + sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) + + + + +lttng list -u -f + + +0 + + +UST events: +------------- + +PID: 9379 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello + ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint) + ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint) + +PID: 4852 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello + ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint) + ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint) + + + + +#################################################################### +# Scenario: Test "lttng create --snapshot" LTTng 2.3 +#################################################################### + +ScenCreateSession + +lttng create mysession --snapshot + + +0 + + +Session mysession created. +Default snapshot output set to: /home/user/lttng-traces/mysession-20130913-141651 +Snapshot mode set. Every channel enabled for that session will be set in overwrite mode and mmap output. + +#------------------------------------------------------------------------------ + +lttng list mysession + + +0 + + +Tracing session mysession: [inactive snapshot] + Trace path: + + +#------------------------------------------------------------------------------ + +lttng snapshot list-output -s mysession + + +0 + + +Snapshot output list for session mysession + [1] snapshot-1: /home/user/lttng-traces/mysession-20130913-141651 + +#------------------------------------------------------------------------------ + +lttng start mysession + + +0 + + +Tracing started for session mysession. + +#------------------------------------------------------------------------------ + +lttng snapshot record -s mysession + + +0 + + + Snapshot recorded successfully for session mysession + +#------------------------------------------------------------------------------ + +lttng stop mysession + + +0 + + +Tracing stopped for session mysession. + +#------------------------------------------------------------------------------ + +lttng destroy mysession + + +0 + + +Session mysession destroyed. + + diff --git a/org.eclipse.linuxtools.lttng2.ui.tests/testfiles/LTTngServiceTest.cfg b/org.eclipse.linuxtools.lttng2.ui.tests/testfiles/LTTngServiceTest.cfg index 58b65afdc7..1775717198 100644 --- a/org.eclipse.linuxtools.lttng2.ui.tests/testfiles/LTTngServiceTest.cfg +++ b/org.eclipse.linuxtools.lttng2.ui.tests/testfiles/LTTngServiceTest.cfg @@ -1137,5 +1137,176 @@ lttng -vvv destroy mysession Session mysession destroyed. + + +#################################################################### +# Scenario: Test "lttng create --snapshot (LTTng 2.3) +#################################################################### + +CreateSessionSnapshot + +lttng create mysession --snapshot + + +0 + + +Session mysession created. +Default snapshot output set to: /home/user/lttng-traces/mysession-20130913-141651 +Snapshot mode set. Every channel enabled for that session will be set in overwrite mode and mmap output. + +#------------------------------------------------------------------------------ + +lttng snapshot list-output -s mysession + + +0 + + +Snapshot output list for session mysession + [1] snapshot-1: /home/user/lttng-traces/mysession-20130913-141651 + +#------------------------------------------------------------------------------ + +lttng list + + +0 + + + 1) mysession () [inactive snapshot] + + +#------------------------------------------------------------------------------ + +lttng snapshot record -s mysession + + +0 + + + Snapshot recorded successfully for session mysession + +#------------------------------------------------------------------------------ + +lttng destroy mysession + + +0 + + +Session mysession destroyed. + + + +#################################################################### +# Scenario: Test "lttng create --snapshot -U (LTTng 2.3) +#################################################################### + +CreateSessionStreamedSnapshot + +lttng create mysession --snapshot -U net://172.0.0.1 + + +0 + + +Session mysession created. +Default snapshot output set to: net://172.0.0.1 +Snapshot mode set. Every channel enabled for that session will be set in overwrite mode and mmap output. + +#------------------------------------------------------------------------------ + +lttng snapshot list-output -s mysession + + +0 + + +Snapshot output list for session mysession + [2] snapshot-2: net4://172.0.0.1:5342/ + +#------------------------------------------------------------------------------ + +lttng list + + +0 + + + 1) mysession () [inactive snapshot] + + +#------------------------------------------------------------------------------ + +lttng snapshot record -s mysession + + +0 + + + Snapshot recorded successfully for session mysession + +#------------------------------------------------------------------------------ + +lttng destroy mysession + + +0 + + +Session mysession destroyed. + + + + + + +#################################################################### +# Scenario: Test "lttng create --snapshot (LTTng 2.3) +#################################################################### + +CreateSessionSnapshotErrors + +lttng snapshot list-output -s blabla + + +1 + + +Error: Session name not found + +#------------------------------------------------------------------------------ +#next is not an error case but good to be tested + +lttng list + + +0 + + + 1) mysession () [active snapshot] + + +#------------------------------------------------------------------------------ + +lttng snapshot record -s blabla + + +1 + + + Error: Session name not found + +#------------------------------------------------------------------------------ + +lttng snapshot record -s mysession + + +1 + + + Error: Session needs to be started once + \ No newline at end of file diff --git a/org.eclipse.linuxtools.lttng2.ui/icons/elcl16/snapshot.gif b/org.eclipse.linuxtools.lttng2.ui/icons/elcl16/snapshot.gif new file mode 100644 index 0000000000000000000000000000000000000000..176830af2dc8be87218c4dd944ba7dc6ffb79756 GIT binary patch literal 613 zcmZ?wbhEHb6krfwc*ejG8XNPy-;@B))Bvy4{LHqJg1*@^*1I`p zx;kgZMAg^T&W?>!j5)mh7Ifc-N{eCwCscapK~W)=8^Y zY&p4p*STFsZ#;Yd@8X>|@4o;4{qxb^$IQRK?)!0*@6Yp)Kd-X?zRv&iD*q3VeAoNu z{gmIIR{!~W{Li-&zkfXX3l#sj`p*T{e}8}e|Noz1=m5o^EQ|~cZVWmgCxhaIf&EZ} zTT^qht%HlTOM6RCyNJ0+R}T}zRELQsE+P(Yj67~k#twEiPA)F4%dJ>gnc3Lbxi(EV zb1|FEVzi4(f3Ki}#YA%>2M!}`uHBrXZS9svdG)nUaw#gBDsl;O*>LlU=xXu_a;iG& zDR3I`Idh9hYN+!+(K9g6d&O_hEh(Xu)*L_a|;KPu*w6~$4s5v vVhR-k4;h=+aqNvt_~0PK#Lg=nw8-b=Bvp1d8LJa-K1`Z;c6JjJBZD;nYnQoH literal 0 HcmV?d00001 diff --git a/org.eclipse.linuxtools.lttng2.ui/plugin.properties b/org.eclipse.linuxtools.lttng2.ui/plugin.properties index 5769f0f07f..8b85752b6d 100644 --- a/org.eclipse.linuxtools.lttng2.ui/plugin.properties +++ b/org.eclipse.linuxtools.lttng2.ui/plugin.properties @@ -134,4 +134,7 @@ commands.control.import.description=Import Traces to LTTng Project commands.control.calibrate=Calibrate commands.control.calibrate.description=Quantify LTTng overhead +commands.control.snapshot=Record Snapshot +commands.control.snapshot.description=Record a snapshot + preference.page.control.name=LTTng Tracer Control Preferences \ No newline at end of file diff --git a/org.eclipse.linuxtools.lttng2.ui/plugin.xml b/org.eclipse.linuxtools.lttng2.ui/plugin.xml index 6f4180f3d3..3b03b07d04 100644 --- a/org.eclipse.linuxtools.lttng2.ui/plugin.xml +++ b/org.eclipse.linuxtools.lttng2.ui/plugin.xml @@ -182,6 +182,13 @@ name="%commands.control.calibrate"> + + + @@ -244,6 +251,16 @@ name="org.eclipse.linuxtools.internal.lttng2.ui.views.control.toolbar.separator2" visible="true"> + + + + + + + + + + + + + + + + + + + @@ -968,6 +1009,23 @@ + + + + + + + + + + + + diff --git a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/CreateSessionDialog.java b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/CreateSessionDialog.java index f6c1845f32..c92a92da7d 100644 --- a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/CreateSessionDialog.java +++ b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/CreateSessionDialog.java @@ -111,6 +111,10 @@ public class CreateSessionDialog extends Dialog implements ICreateSessionDialog * The text widget for the session path. */ private Text fSessionPathText = null; + /** + * The button widget to select a snapshot session + */ + private Button fSnapshotButton = null; /** * The Group for stream configuration. */ @@ -183,6 +187,10 @@ public class CreateSessionDialog extends Dialog implements ICreateSessionDialog * The session path string. */ private String fSessionPath = null; + /** + * The session path string. + */ + private boolean fIsSnapshot = false; /** * Flag whether default location (path) shall be used or not */ @@ -248,6 +256,7 @@ public class CreateSessionDialog extends Dialog implements ICreateSessionDialog fStreamingComposite = null; fSessionName = null; fSessionPath = null; + fIsSnapshot = false; fIsDefaultPath = true; fIsStreamedTrace = false; fNetworkUrl = null; @@ -271,7 +280,10 @@ public class CreateSessionDialog extends Dialog implements ICreateSessionDialog public String getDataUrl() { return fDataUrl; } - + @Override + public boolean isSnapshot() { + return fIsSnapshot; + } // ------------------------------------------------------------------------ // Operations // ------------------------------------------------------------------------ @@ -318,6 +330,15 @@ public class CreateSessionDialog extends Dialog implements ICreateSessionDialog fSessionPathText = new Text(sessionGroup, SWT.NONE); fSessionPathText.setToolTipText(Messages.TraceControl_CreateSessionPathTooltip); + if (fParent.isSnapshotSupported()) { + fSnapshotButton = new Button(sessionGroup, SWT.CHECK); + fSnapshotButton.setText(Messages.TraceControl_CreateSessionSnapshotLabel); + fSnapshotButton.setToolTipText(Messages.TraceControl_CreateSessionSnapshotTooltip); + GridData data = new GridData(GridData.FILL_HORIZONTAL); + data.horizontalSpan = 4; + fSnapshotButton.setData(data); + } + // layout widgets GridData data = new GridData(GridData.FILL_HORIZONTAL); data.horizontalSpan = 3; @@ -636,6 +657,10 @@ public class CreateSessionDialog extends Dialog implements ICreateSessionDialog fIsDefaultPath = false; } + if(fParent.isSnapshotSupported()) { + fIsSnapshot = fSnapshotButton.getSelection(); + } + fNetworkUrl = null; fControlUrl = null; fDataUrl = null; diff --git a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/ICreateSessionDialog.java b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/ICreateSessionDialog.java index 141325fc99..d73de0abe4 100644 --- a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/ICreateSessionDialog.java +++ b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/ICreateSessionDialog.java @@ -77,6 +77,11 @@ public interface ICreateSessionDialog { */ String getDataUrl(); + /** + * @return true if is a snapshot session else false + */ + boolean isSnapshot(); + // ------------------------------------------------------------------------ // Operations // ------------------------------------------------------------------------ diff --git a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/ImportDialog.java b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/ImportDialog.java index 941dbf29f4..03eae31441 100644 --- a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/ImportDialog.java +++ b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/ImportDialog.java @@ -240,7 +240,9 @@ public class ImportDialog extends Dialog implements IImportDialog { traceName.append(trace.getName()); traceName.insert(0, '-'); - while (!parent.getAbsolutePath().equals(fSession.getSessionPath())) { + String path = fSession.isSnapshotSession() ? fSession.getSnapshotInfo().getSnapshotPath() : fSession.getSessionPath(); + + while (!parent.getAbsolutePath().equals(path)) { traceName.insert(0, parent.getName()); traceName.insert(0, '-'); parent = parent.getParentRemoteFile(); @@ -342,7 +344,10 @@ public class ImportDialog extends Dialog implements IImportDialog { IFileServiceSubSystem fsss = proxy.getFileServiceSubSystem(); - final IRemoteFile remoteFolder = fsss.getRemoteFileObject(fSession.getSessionPath(), new NullProgressMonitor()); + final String path = fSession.isSnapshotSession() ? fSession.getSnapshotInfo().getSnapshotPath() : fSession.getSessionPath(); + final IRemoteFile remoteFolder = fsss.getRemoteFileObject(path, new NullProgressMonitor()); + // make sure that remote directory is read and not cached + remoteFolder.markStale(true, true); fFolderViewer = new CheckboxTreeViewer(contextGroup, SWT.BORDER); GridData data = new GridData(GridData.FILL_BOTH); @@ -375,10 +380,14 @@ public class ImportDialog extends Dialog implements IImportDialog { }); fFolderViewer.setInput(remoteFolder); - // Select all traces by default Object[] children = remoteFolder.getContents(RemoteChildrenContentsType.getInstance()); - for (int i = 0; i < children.length; i++) { - fFolderViewer.setSubtreeChecked(children[i], true); + // children can be null if there the path doesn't exist. This happens when a trace + // session hadn't been started and no output was created. + if (children != null) { + // Select all traces by default + for (int i = 0; i < children.length; i++) { + fFolderViewer.setSubtreeChecked(children[i], true); + } } Group projectGroup = new Group(fDialogComposite, SWT.SHADOW_NONE); diff --git a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/handlers/CreateSessionHandler.java b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/handlers/CreateSessionHandler.java index ac0521d533..327f901c57 100644 --- a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/handlers/CreateSessionHandler.java +++ b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/handlers/CreateSessionHandler.java @@ -72,10 +72,10 @@ public class CreateSessionHandler extends BaseControlViewHandler { try { if (dialog.isStreamedTrace()) { sessionGroup.createSession(dialog.getSessionName(), dialog.getNetworkUrl(), dialog.getControlUrl(), - dialog.getDataUrl(), monitor); + dialog.getDataUrl(), dialog.isSnapshot(), monitor); } else { String sessionPath = dialog.isDefaultSessionPath() ? null : dialog.getSessionPath(); - sessionGroup.createSession(dialog.getSessionName(), sessionPath, monitor); + sessionGroup.createSession(dialog.getSessionName(), sessionPath, dialog.isSnapshot(), monitor); } } catch (ExecutionException e) { return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_CreateSessionFailure, e); diff --git a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/handlers/ImportHandler.java b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/handlers/ImportHandler.java index db6b9a6d0a..32b7a8b7bd 100644 --- a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/handlers/ImportHandler.java +++ b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/handlers/ImportHandler.java @@ -189,7 +189,7 @@ public class ImportHandler extends BaseControlViewHandler { if (element instanceof TraceSessionComponent) { // Add only TraceSessionComponents that are inactive and not destroyed TraceSessionComponent tmpSession = (TraceSessionComponent) element; - if ((tmpSession.getSessionState() == TraceSessionState.INACTIVE) && (!tmpSession.isDestroyed())) { + if (((tmpSession.isSnapshotSession()) || (tmpSession.getSessionState() == TraceSessionState.INACTIVE)) && (!tmpSession.isDestroyed())) { session = tmpSession; } } diff --git a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/handlers/SnaphshotHandler.java b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/handlers/SnaphshotHandler.java new file mode 100644 index 0000000000..40046a7c9f --- /dev/null +++ b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/handlers/SnaphshotHandler.java @@ -0,0 +1,130 @@ +/********************************************************************** + * Copyright (c) 2013 Ericsson + * + * All rights reserved. This program and the accompanying materials are + * made available under the terms of the Eclipse Public License v1.0 which + * accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Bernd Hufmann - Initial API and implementation + **********************************************************************/ +package org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.MultiStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.jobs.Job; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.linuxtools.internal.lttng2.core.control.model.TraceSessionState; +import org.eclipse.linuxtools.internal.lttng2.ui.Activator; +import org.eclipse.linuxtools.internal.lttng2.ui.views.control.ControlView; +import org.eclipse.linuxtools.internal.lttng2.ui.views.control.messages.Messages; +import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceSessionComponent; +import org.eclipse.ui.IWorkbenchPage; + +/** + *

+ * Command handler implementation to record a snapshot. + *

+ * + * @author Bernd Hufmann + */ +public class SnaphshotHandler extends BaseControlViewHandler { + + // ------------------------------------------------------------------------ + // Attributes + // ------------------------------------------------------------------------ + /** + * The list of session components the command is to be executed on. + */ + protected List fSessions = new ArrayList(); + + // ------------------------------------------------------------------------ + // Operations + // ------------------------------------------------------------------------ + + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + fLock.lock(); + try { + // Make a copy for thread safety + final List sessions = new ArrayList(); + sessions.addAll(fSessions); + + Job job = new Job(Messages.TraceControl_RecordSnapshotJob) { + @Override + protected IStatus run(IProgressMonitor monitor) { + MultiStatus status = new MultiStatus(Activator.PLUGIN_ID, IStatus.OK, null, null); + for (Iterator iterator = sessions.iterator(); iterator.hasNext();) { + try { + // record snapshot for all selected sessions sequentially + TraceSessionComponent session = iterator.next(); + session.recordSnapshot(monitor); + if (monitor.isCanceled()) { + status.add(Status.CANCEL_STATUS); + break; + } + } catch (ExecutionException e) { + status.add(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_RecordSnapshotFailure, e)); + } + } + return status; + } + }; + job.setUser(true); + job.schedule(); + } finally { + fLock.unlock(); + } + return null; + } + + @Override + public boolean isEnabled() { + // Get workbench page for the Control View + IWorkbenchPage page = getWorkbenchPage(); + if (page == null) { + return false; + } + + List sessions = new ArrayList(0); + + // Check if one session is selected + ISelection selection = page.getSelection(ControlView.ID); + if (selection instanceof StructuredSelection) { + StructuredSelection structered = ((StructuredSelection) selection); + for (Iterator iterator = structered.iterator(); iterator.hasNext();) { + Object element = iterator.next(); + if (element instanceof TraceSessionComponent) { + // Add only if corresponding TraceSessionComponent is an active snapshot session and not destroyed + TraceSessionComponent session = (TraceSessionComponent) element; + if(session.isSnapshotSession() && + session.getSessionState() == TraceSessionState.ACTIVE && + !session.isDestroyed()) { + sessions.add(session); + } + } + } + } + boolean isEnabled = !sessions.isEmpty(); + fLock.lock(); + try { + fSessions = null; + if (isEnabled) { + fSessions = sessions; + } + } finally { + fLock.unlock(); + } + return isEnabled; + } +} \ No newline at end of file diff --git a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/messages/Messages.java b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/messages/Messages.java index 58de393183..1afd989485 100644 --- a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/messages/Messages.java +++ b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/messages/Messages.java @@ -86,6 +86,9 @@ final public class Messages extends NLS { public static String TraceControl_AddCalibrateJob; public static String TraceControl_AddCalibrateFailure; + public static String TraceControl_RecordSnapshotJob; + public static String TraceControl_RecordSnapshotFailure; + // Dialogs public static String TraceControl_NewDialogTitle; public static String TraceControl_NewNodeExistingConnectionGroupName; @@ -104,6 +107,8 @@ final public class Messages extends NLS { public static String TraceControl_CreateSessionNameTooltip; public static String TraceControl_CreateSessionPathLabel; public static String TraceControl_CreateSessionPathTooltip; + public static String TraceControl_CreateSessionSnapshotLabel; + public static String TraceControl_CreateSessionSnapshotTooltip; public static String TraceControl_CreateSessionConfigureStreamingButtonText; public static String TraceControl_CreateSessionConfigureStreamingButtonTooltip; @@ -257,6 +262,9 @@ final public class Messages extends NLS { public static String TraceControl_HostNamePropertyName; public static String TraceControl_HostAddressPropertyName; public static String TraceControl_SessionPathPropertyName; + public static String TraceControl_SnapshotPathPropertyName; + public static String TraceControl_SnapshotNamePropertyName; + public static String TraceControl_SnapshotIdPropertyName; public static String TraceControl_ProviderNamePropertyName; public static String TraceControl_ProcessIdPropertyName; public static String TraceControl_ProbeAddressPropertyName; diff --git a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/messages/messages.properties b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/messages/messages.properties index 89de0b4eed..b6db6a98fb 100644 --- a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/messages/messages.properties +++ b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/messages/messages.properties @@ -68,6 +68,9 @@ TraceControl_AddContextFailure=Command to add contexts failed TraceControl_AddCalibrateJob=Calibrating... TraceControl_AddCalibrateFailure=Command to calibrate failed +TraceControl_RecordSnapshotJob=Record snapshot... +TraceControl_RecordSnapshotFailure=Command to snapshot record failed + # Dialogs TraceControl_NewDialogTitle=New Connection TraceControl_NewNodeExistingConnectionGroupName=Existing Connections @@ -86,6 +89,9 @@ TraceControl_CreateSessionNameLabel=Session Name TraceControl_CreateSessionNameTooltip=The name of the session to be created. TraceControl_CreateSessionPathLabel=Session Path TraceControl_CreateSessionPathTooltip=The session path (keep empty for default location) +TraceControl_CreateSessionSnapshotLabel=Snapshot Mode +TraceControl_CreateSessionSnapshotTooltip=Configure session in snapshot mode + TraceControl_CreateSessionConfigureStreamingButtonText=Advanced TraceControl_CreateSessionConfigureStreamingButtonTooltip=Configure advanced options @@ -244,6 +250,9 @@ TraceControl_OutputTypePropertyName=Output Type TraceControl_HostNamePropertyName=Connection Name TraceControl_HostAddressPropertyName=Host Name TraceControl_SessionPathPropertyName=Session Path +TraceControl_SnapshotPathPropertyName=Snapshot Path +TraceControl_SnapshotNamePropertyName=Snapshot Name +TraceControl_SnapshotIdPropertyName=Snapshot ID TraceControl_ProviderNamePropertyName=Provider Name TraceControl_ProcessIdPropertyName=Process ID TraceControl_ProbeAddressPropertyName=Address diff --git a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/model/impl/TargetNodeComponent.java b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/model/impl/TargetNodeComponent.java index 634bee6f25..964456b8c2 100644 --- a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/model/impl/TargetNodeComponent.java +++ b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/model/impl/TargetNodeComponent.java @@ -256,6 +256,14 @@ public class TargetNodeComponent extends TraceControlComponent implements ICommu public boolean isPeriodicalMetadataFlushSupported() { return getControlService().isVersionSupported("2.2.0"); //$NON-NLS-1$ } + /** + * Returns if node supports snapshots or not + * @return true if it supports snapshots else false + * + */ + public boolean isSnapshotSupported() { + return getControlService().isVersionSupported("2.3.0"); //$NON-NLS-1$ + } // ------------------------------------------------------------------------ // Operations diff --git a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/model/impl/TraceSessionComponent.java b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/model/impl/TraceSessionComponent.java index 86de1fa590..471c60cc5a 100644 --- a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/model/impl/TraceSessionComponent.java +++ b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/model/impl/TraceSessionComponent.java @@ -19,6 +19,7 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.linuxtools.internal.lttng2.core.control.model.IChannelInfo; import org.eclipse.linuxtools.internal.lttng2.core.control.model.IDomainInfo; import org.eclipse.linuxtools.internal.lttng2.core.control.model.ISessionInfo; +import org.eclipse.linuxtools.internal.lttng2.core.control.model.ISnapshotInfo; import org.eclipse.linuxtools.internal.lttng2.core.control.model.LogLevelType; import org.eclipse.linuxtools.internal.lttng2.core.control.model.TraceLogLevel; import org.eclipse.linuxtools.internal.lttng2.core.control.model.TraceSessionState; @@ -178,6 +179,22 @@ public class TraceSessionComponent extends TraceControlComponent { fSessionInfo.setStreamedTrace(isStreamedTrace); } + /** + * Returns whether the session is snapshot session or not + * @return true if it is snapshot session else false + */ + public boolean isSnapshotSession() { + return fSessionInfo.isSnapshotSession(); + } + + /** + * Gets the snapshot information if available whether the session is a snapshot session or not + * @return the snapshot information or null if it is not a snapshot session + */ + public ISnapshotInfo getSnapshotInfo() { + return fSessionInfo.getSnapshotInfo(); + } + @Override public Object getAdapter(Class adapter) { if (adapter == IPropertySource.class) { @@ -218,6 +235,15 @@ public class TraceSessionComponent extends TraceControlComponent { return ((TargetNodeComponent)getParent().getParent()).isEventFilteringSupported(); } + /** + * Returns if node supports snapshots or not + * @return true if it supports snapshots else false + * + */ + public boolean isSnapshotSupported() { + return ((TargetNodeComponent)getParent().getParent()).isSnapshotSupported(); + } + // ------------------------------------------------------------------------ // Operations // ------------------------------------------------------------------------ @@ -234,6 +260,7 @@ public class TraceSessionComponent extends TraceControlComponent { throws ExecutionException { removeAllChildren(); fSessionInfo = getControlService().getSession(getName(), monitor); + IDomainInfo[] domains = fSessionInfo.getDomains(); for (int i = 0; i < domains.length; i++) { TraceDomainComponent domainComponent = new TraceDomainComponent( @@ -381,4 +408,16 @@ public class TraceSessionComponent extends TraceControlComponent { throws ExecutionException { return getControlService().getContextList(monitor); } + + /** + * Records a snapshot. + * + * @param monitor + * - a progress monitor + * @throws ExecutionException + * If the command fails + */ + public void recordSnapshot(IProgressMonitor monitor) throws ExecutionException { + getControlService().recordSnapshot(getName(), monitor); + } } diff --git a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/model/impl/TraceSessionGroup.java b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/model/impl/TraceSessionGroup.java index e9d7f6a5b2..66c151edbf 100644 --- a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/model/impl/TraceSessionGroup.java +++ b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/model/impl/TraceSessionGroup.java @@ -69,6 +69,13 @@ public class TraceSessionGroup extends TraceControlComponent { public boolean isNetworkStreamingSupported() { return getTargetNode().isNetworkStreamingSupported(); } + /** + * Returns if node supports snapshots or not + * @return true if it supports snapshots else false + * + */ public boolean isSnapshotSupported() { + return getTargetNode().isSnapshotSupported(); + } // ------------------------------------------------------------------------ // Operations @@ -109,13 +116,15 @@ public class TraceSessionGroup extends TraceControlComponent { * - a session name to create * @param sessionPath * - a path for storing the traces (use null for default) + * @param isSnapshot + * - true for snapshot session else false * @param monitor * - a progress monitor * @throws ExecutionException * If the command fails */ - public void createSession(String sessionName, String sessionPath, IProgressMonitor monitor) throws ExecutionException { - ISessionInfo sessionInfo = getControlService().createSession(sessionName, sessionPath, monitor); + public void createSession(String sessionName, String sessionPath, boolean isSnapshot, IProgressMonitor monitor) throws ExecutionException { + ISessionInfo sessionInfo = getControlService().createSession(sessionName, sessionPath, isSnapshot, monitor); if (sessionInfo != null) { TraceSessionComponent session = new TraceSessionComponent( @@ -137,13 +146,15 @@ public class TraceSessionGroup extends TraceControlComponent { * - a URL for control channel (networkUrl has to be null, dataUrl has to be set) * @param dataUrl * - a URL for data channel (networkUrl has to be null, controlUrl has to be set) + * @param isSnapshot + * - true for snapshot session else false * @param monitor * - a progress monitor * @throws ExecutionException * If the command fails */ - public void createSession(String sessionName, String networkUrl, String controlUrl, String dataUrl, IProgressMonitor monitor) throws ExecutionException { - ISessionInfo sessionInfo = getControlService().createSession(sessionName, networkUrl, controlUrl, dataUrl, monitor); + public void createSession(String sessionName, String networkUrl, String controlUrl, String dataUrl, boolean isSnapshot, IProgressMonitor monitor) throws ExecutionException { + ISessionInfo sessionInfo = getControlService().createSession(sessionName, networkUrl, controlUrl, dataUrl, isSnapshot, monitor); if (sessionInfo != null) { TraceSessionComponent session = new TraceSessionComponent(sessionInfo.getName(), TraceSessionGroup.this); diff --git a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/property/TraceSessionPropertySource.java b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/property/TraceSessionPropertySource.java index 96c7e8f26d..283e6d4a11 100644 --- a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/property/TraceSessionPropertySource.java +++ b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/property/TraceSessionPropertySource.java @@ -11,6 +11,9 @@ **********************************************************************/ package org.eclipse.linuxtools.internal.lttng2.ui.views.control.property; +import java.util.ArrayList; +import java.util.List; + import org.eclipse.linuxtools.internal.lttng2.ui.views.control.messages.Messages; import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceSessionComponent; import org.eclipse.linuxtools.tmf.ui.properties.ReadOnlyTextPropertyDescriptor; @@ -40,6 +43,19 @@ public class TraceSessionPropertySource extends BasePropertySource { * The trace session state ID. */ public static final String TRACE_SESSION_STATE_PROPERTY_ID = "trace.session.state"; //$NON-NLS-1$ + /** + * The trace snapshot path property ID. + */ + public static final String TRACE_SNAPSHOT_PATH_PROPERTY_ID = "trace.snapshot.path"; //$NON-NLS-1$ + /** + * The snapshot name property. + */ + public static final String TRACE_SNAPSHOT_NAME_PROPERTY_ID = "trace.snapshot.name"; //$NON-NLS-1$ + /** + * The snapshot ID property. + */ + public static final String TRACE_SNAPSHOT_ID_PROPERTY_ID = "trace.snapshot.id"; //$NON-NLS-1$ + /** * The trace session name property name. */ @@ -52,6 +68,19 @@ public class TraceSessionPropertySource extends BasePropertySource { * The trace session state property name. */ public static final String TRACE_SESSION_STATE_PROPERTY_NAME = Messages.TraceControl_StatePropertyName; + /** + * The snapshot path property name. + */ + public static final String TRACE_SNAPSHOT_PATH_PROPERTY_NAME = Messages.TraceControl_SnapshotPathPropertyName; + /** + * The trace snapshot name property name. + */ + public static final String TRACE_SNAPSHOT_NAME_PROPERTY_NAME = Messages.TraceControl_SnapshotNamePropertyName; + /** + * The trace snapshot ID property name. + */ + public static final String TRACE_SNAPSHOT_ID_PROPERTY_NAME = Messages.TraceControl_SnapshotIdPropertyName; + // ------------------------------------------------------------------------ // Attributes @@ -80,10 +109,17 @@ public class TraceSessionPropertySource extends BasePropertySource { @Override public IPropertyDescriptor[] getPropertyDescriptors() { - return new IPropertyDescriptor[] { - new ReadOnlyTextPropertyDescriptor(TRACE_SESSION_NAME_PROPERTY_ID, TRACE_SESSION_NAME_PROPERTY_NAME), - new ReadOnlyTextPropertyDescriptor(TRACE_SESSION_PATH_PROPERTY_ID, TRACE_SESSION_PATH_PROPERTY_NAME), - new ReadOnlyTextPropertyDescriptor(TRACE_SESSION_STATE_PROPERTY_ID, TRACE_SESSION_STATE_PROPERTY_NAME)}; + List list = new ArrayList (); + list.add(new ReadOnlyTextPropertyDescriptor(TRACE_SESSION_NAME_PROPERTY_ID, TRACE_SESSION_NAME_PROPERTY_NAME)); + list.add(new ReadOnlyTextPropertyDescriptor(TRACE_SESSION_STATE_PROPERTY_ID, TRACE_SESSION_STATE_PROPERTY_NAME)); + if (fSession.isSnapshotSession()) { + list.add(new ReadOnlyTextPropertyDescriptor(TRACE_SNAPSHOT_NAME_PROPERTY_ID, TRACE_SNAPSHOT_NAME_PROPERTY_NAME)); + list.add(new ReadOnlyTextPropertyDescriptor(TRACE_SNAPSHOT_PATH_PROPERTY_ID, TRACE_SNAPSHOT_PATH_PROPERTY_NAME)); + list.add(new ReadOnlyTextPropertyDescriptor(TRACE_SNAPSHOT_ID_PROPERTY_ID, TRACE_SNAPSHOT_ID_PROPERTY_NAME)); + } else { + list.add(new ReadOnlyTextPropertyDescriptor(TRACE_SESSION_PATH_PROPERTY_ID, TRACE_SESSION_PATH_PROPERTY_NAME)); + } + return(list.toArray(new IPropertyDescriptor[list.size()])); } @Override @@ -97,6 +133,15 @@ public class TraceSessionPropertySource extends BasePropertySource { if (TRACE_SESSION_STATE_PROPERTY_ID.equals(id)) { return fSession.getSessionState().name(); } + if (TRACE_SNAPSHOT_PATH_PROPERTY_ID.equals(id)) { + return (fSession.isSnapshotSession() ? fSession.getSnapshotInfo().getSnapshotPath() : ""); //$NON-NLS-1$ + } + if (TRACE_SNAPSHOT_NAME_PROPERTY_ID.equals(id)) { + return (fSession.isSnapshotSession() ? fSession.getSnapshotInfo().getName() : ""); //$NON-NLS-1$ + } + if (TRACE_SNAPSHOT_ID_PROPERTY_ID.equals(id)) { + return (fSession.isSnapshotSession() ? fSession.getSnapshotInfo().getId() : ""); //$NON-NLS-1$ + } return null; } } diff --git a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/service/ILttngControlService.java b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/service/ILttngControlService.java index 96c4196560..b24bbf91db 100644 --- a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/service/ILttngControlService.java +++ b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/service/ILttngControlService.java @@ -19,6 +19,7 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.linuxtools.internal.lttng2.core.control.model.IBaseEventInfo; import org.eclipse.linuxtools.internal.lttng2.core.control.model.IChannelInfo; import org.eclipse.linuxtools.internal.lttng2.core.control.model.ISessionInfo; +import org.eclipse.linuxtools.internal.lttng2.core.control.model.ISnapshotInfo; import org.eclipse.linuxtools.internal.lttng2.core.control.model.IUstProviderInfo; import org.eclipse.linuxtools.internal.lttng2.core.control.model.LogLevelType; import org.eclipse.linuxtools.internal.lttng2.core.control.model.TraceLogLevel; @@ -72,6 +73,19 @@ public interface ILttngControlService { ISessionInfo getSession(String sessionName, IProgressMonitor monitor) throws ExecutionException; + /** + * Retrieves the snapshot output information from the node + * @param sessionName + * - the session name + * @param monitor + * - a progress monitor + * @return snapshot output information + * @throws ExecutionException + * if command fails + */ + ISnapshotInfo getSnapshotInfo(String sessionName, IProgressMonitor monitor) + throws ExecutionException; + /** * Retrieves the kernel provider information (i.e. the kernel events) * @@ -112,13 +126,15 @@ public interface ILttngControlService { * - a session name to create * @param sessionPath * - a path for storing the traces (use null for default) + * @param isSnapshot + * - true for snapshot session else false * @param monitor * - a progress monitor * @return the session information * @throws ExecutionException * If the command fails */ - ISessionInfo createSession(String sessionName, String sessionPath, IProgressMonitor monitor) throws ExecutionException; + ISessionInfo createSession(String sessionName, String sessionPath, boolean isSnapshot, IProgressMonitor monitor) throws ExecutionException; /** * Creates a session with given session name and location. @@ -132,13 +148,15 @@ public interface ILttngControlService { * - a URL for control channel (networkUrl has to be null, dataUrl has to be set) * @param dataUrl * - a URL for data channel (networkUrl has to be null, controlUrl has to be set) + * @param isSnapshot + * - true for snapshot session else false * @param monitor * - a progress monitor * @return the session information * @throws ExecutionException * If the command fails */ - ISessionInfo createSession(String sessionName, String networkUrl, String controlUrl, String dataUrl, IProgressMonitor monitor) throws ExecutionException; + ISessionInfo createSession(String sessionName, String networkUrl, String controlUrl, String dataUrl, boolean isSnapshot, IProgressMonitor monitor) throws ExecutionException; /** * Destroys a session with given session name. @@ -375,4 +393,17 @@ public interface ILttngControlService { */ void calibrate(boolean isKernel, IProgressMonitor monitor) throws ExecutionException; + + /** + * Records a snapshot. + * + * @param sessionName + * - a session name + * @param monitor + * - a progress monitor + * @throws ExecutionException + * If the command fails + */ + void recordSnapshot(String sessionName, IProgressMonitor monitor) + throws ExecutionException; } diff --git a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/service/LTTngControlService.java b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/service/LTTngControlService.java index e06bae8093..9d82dc9838 100644 --- a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/service/LTTngControlService.java +++ b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/service/LTTngControlService.java @@ -28,6 +28,7 @@ import org.eclipse.linuxtools.internal.lttng2.core.control.model.IEventInfo; import org.eclipse.linuxtools.internal.lttng2.core.control.model.IFieldInfo; import org.eclipse.linuxtools.internal.lttng2.core.control.model.IProbeEventInfo; import org.eclipse.linuxtools.internal.lttng2.core.control.model.ISessionInfo; +import org.eclipse.linuxtools.internal.lttng2.core.control.model.ISnapshotInfo; import org.eclipse.linuxtools.internal.lttng2.core.control.model.IUstProviderInfo; import org.eclipse.linuxtools.internal.lttng2.core.control.model.LogLevelType; import org.eclipse.linuxtools.internal.lttng2.core.control.model.TraceEventType; @@ -40,6 +41,7 @@ import org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.EventInfo; import org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.FieldInfo; import org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.ProbeEventInfo; import org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.SessionInfo; +import org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.SnapshotInfo; import org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.UstProviderInfo; import org.eclipse.linuxtools.internal.lttng2.ui.views.control.logging.ControlCommandLogger; import org.eclipse.linuxtools.internal.lttng2.ui.views.control.messages.Messages; @@ -174,18 +176,30 @@ public class LTTngControlService implements ILttngControlService { continue; } - matcher = LTTngControlServiceConstants.TRACE_NETWORK_PATH_PATTERN.matcher(line); + matcher = LTTngControlServiceConstants.TRACE_SNAPSHOT_SESSION_PATTERN.matcher(line); if (matcher.matches()) { - sessionInfo.setStreamedTrace(true); - } - - matcher = LTTngControlServiceConstants.TRACE_SESSION_PATH_PATTERN.matcher(line); - if (matcher.matches()) { - sessionInfo.setSessionPath(matcher.group(1).trim()); + sessionInfo.setSessionState(matcher.group(2)); + // real name will be set later + ISnapshotInfo snapshotInfo = new SnapshotInfo(""); //$NON-NLS-1$ + sessionInfo.setSnapshotInfo(snapshotInfo); index++; continue; } + if (!sessionInfo.isSnapshotSession()) { + matcher = LTTngControlServiceConstants.TRACE_NETWORK_PATH_PATTERN.matcher(line); + if (matcher.matches()) { + sessionInfo.setStreamedTrace(true); + } + + matcher = LTTngControlServiceConstants.TRACE_SESSION_PATH_PATTERN.matcher(line); + if (matcher.matches()) { + sessionInfo.setSessionPath(matcher.group(1).trim()); + index++; + continue; + } + } + matcher = LTTngControlServiceConstants.DOMAIN_KERNEL_PATTERN.matcher(line); if (matcher.matches()) { // Create Domain @@ -230,9 +244,50 @@ public class LTTngControlService implements ILttngControlService { } index++; } + + if (sessionInfo.isSnapshotSession()) { + ISnapshotInfo snapshot = getSnapshotInfo(sessionName, monitor); + sessionInfo.setSnapshotInfo(snapshot); + } + return sessionInfo; } + @Override + public ISnapshotInfo getSnapshotInfo(String sessionName, IProgressMonitor monitor) throws ExecutionException { + StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_LIST_SNAPSHOT_OUTPUT, LTTngControlServiceConstants.OPTION_SESSION, sessionName); + ICommandResult result = executeCommand(command.toString(), monitor); + + int index = 0; + + // Output: + // [1] snapshot-1: /home/user/lttng-traces/my-20130909-114431 + // or + // [3] snapshot-3: net4://172.0.0.1/ + ISnapshotInfo snapshotInfo = new SnapshotInfo(""); //$NON-NLS-1$ + + while (index < result.getOutput().length) { + String line = result.getOutput()[index]; + Matcher matcher = LTTngControlServiceConstants.LIST_SNAPSHOT_OUTPUT_PATTERN.matcher(line); + if (matcher.matches()) { + snapshotInfo.setId(Integer.valueOf(matcher.group(1))); + snapshotInfo.setName(matcher.group(2)); + snapshotInfo.setSnapshotPath(matcher.group(3)); + + Matcher matcher2 = LTTngControlServiceConstants.SNAPSHOT_NETWORK_PATH_PATTERN.matcher(snapshotInfo.getSnapshotPath()); + if (matcher2.matches()) { + snapshotInfo.setStreamedSnapshot(true); + } + + index++; + break; + } + index++; + } + + return snapshotInfo; + } + @Override public List getKernelProvider(IProgressMonitor monitor) throws ExecutionException { StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_LIST_KERNEL); @@ -357,7 +412,7 @@ public class LTTngControlService implements ILttngControlService { } @Override - public ISessionInfo createSession(String sessionName, String sessionPath, IProgressMonitor monitor) throws ExecutionException { + public ISessionInfo createSession(String sessionName, String sessionPath, boolean isSnapshot, IProgressMonitor monitor) throws ExecutionException { String newName = formatParameter(sessionName); String newPath = formatParameter(sessionPath); @@ -369,6 +424,10 @@ public class LTTngControlService implements ILttngControlService { command.append(newPath); } + if (isSnapshot) { + command.append(LTTngControlServiceConstants.OPTION_SNAPSHOT); + } + ICommandResult result = executeCommand(command.toString(), monitor); //Session myssession2 created. @@ -402,24 +461,35 @@ public class LTTngControlService implements ILttngControlService { SessionInfo sessionInfo = new SessionInfo(name); // Verify session path - if ((path == null) || ((sessionPath != null) && (!path.contains(sessionPath)))) { + if (!isSnapshot && + ((path == null) || ((sessionPath != null) && (!path.contains(sessionPath))))) { // Unexpected path throw new ExecutionException(Messages.TraceControl_CommandError + " " + command + "\n" + //$NON-NLS-1$ //$NON-NLS-2$ Messages.TraceControl_UnexpectedPathError + ": " + name); //$NON-NLS-1$ } - sessionInfo.setSessionPath(path); + if (isSnapshot) { + // Make it a snapshot session - content of snapshot info need to + // set afterwards using getSession() or getSnapshotInfo() + sessionInfo.setSnapshotInfo(new SnapshotInfo("")); //$NON-NLS-1$ + } else { + sessionInfo.setSessionPath(path); + } return sessionInfo; } @Override - public ISessionInfo createSession(String sessionName, String networkUrl, String controlUrl, String dataUrl, IProgressMonitor monitor) throws ExecutionException { + public ISessionInfo createSession(String sessionName, String networkUrl, String controlUrl, String dataUrl, boolean isSnapshot, IProgressMonitor monitor) throws ExecutionException { String newName = formatParameter(sessionName); StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_CREATE_SESSION, newName); + if (isSnapshot) { + command.append(LTTngControlServiceConstants.OPTION_SNAPSHOT); + } + if (networkUrl != null) { command.append(LTTngControlServiceConstants.OPTION_NETWORK_URL); command.append(networkUrl); @@ -467,20 +537,24 @@ public class LTTngControlService implements ILttngControlService { // Verify session path if (networkUrl != null) { - if (path == null) { + if (!isSnapshot && (path == null)) { // Unexpected path throw new ExecutionException(Messages.TraceControl_CommandError + " " + command + "\n" + //$NON-NLS-1$ //$NON-NLS-2$ Messages.TraceControl_UnexpectedPathError + ": " + name); //$NON-NLS-1$ } - sessionInfo.setSessionPath(path); - - // Check file protocol - Matcher matcher = LTTngControlServiceConstants.TRACE_FILE_PROTOCOL_PATTERN.matcher(path); - if (matcher.matches()) { + if (isSnapshot) { sessionInfo.setStreamedTrace(false); + } else { + sessionInfo.setSessionPath(path); + // Check file protocol + Matcher matcher = LTTngControlServiceConstants.TRACE_FILE_PROTOCOL_PATTERN.matcher(path); + if (matcher.matches()) { + sessionInfo.setStreamedTrace(false); + } } } + // When using controlUrl and dataUrl the full session path is not known yet // and will be set later on when listing the session @@ -912,6 +986,18 @@ public class LTTngControlService implements ILttngControlService { executeCommand(command.toString(), monitor); } + @Override + public void recordSnapshot(String sessionName, IProgressMonitor monitor) + throws ExecutionException { + StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_RECORD_SNAPSHOT); + + String newSessionName = formatParameter(sessionName); + command.append(LTTngControlServiceConstants.OPTION_SESSION); + command.append(newSessionName); + + executeCommand(command.toString(), monitor); + } + // ------------------------------------------------------------------------ // Helper methods // ------------------------------------------------------------------------ diff --git a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/service/LTTngControlServiceConstants.java b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/service/LTTngControlServiceConstants.java index 8b312bc2b4..7e844f1fb5 100644 --- a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/service/LTTngControlServiceConstants.java +++ b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/service/LTTngControlServiceConstants.java @@ -103,6 +103,14 @@ public interface LTTngControlServiceConstants { * Command to execute calibrate command to quantify LTTng overhead */ static final String COMMAND_CALIBRATE = " calibrate "; //$NON-NLS-1$ + /** + * Command to execute calibrate command to quantify LTTng overhead + */ + static final String COMMAND_LIST_SNAPSHOT_OUTPUT = " snapshot list-output "; //$NON-NLS-1$ + /** + * Command to execute calibrate command to quantify LTTng overhead + */ + static final String COMMAND_RECORD_SNAPSHOT = " snapshot record "; //$NON-NLS-1$ // ------------------------------------------------------------------------ // Command line options constants @@ -127,6 +135,10 @@ public interface LTTngControlServiceConstants { * Command line option for output path. */ static final String OPTION_OUTPUT_PATH = " -o "; //$NON-NLS-1$ + /** + * Command line option for output path. + */ + static final String OPTION_SNAPSHOT = " --snapshot "; //$NON-NLS-1$ /** * Command line option for kernel tracer. */ @@ -254,11 +266,15 @@ public interface LTTngControlServiceConstants { /** * Pattern to match for session information (lttng list) */ - static final Pattern SESSION_PATTERN = Pattern.compile("\\s+(\\d+)\\)\\s+(.*)\\s+\\((.*)\\)\\s+\\[(active|inactive)\\].*"); //$NON-NLS-1$ + static final Pattern SESSION_PATTERN = Pattern.compile("\\s+(\\d+)\\)\\s+(.*)\\s+\\((.*)\\)\\s+\\[(active|inactive).*\\].*"); //$NON-NLS-1$ /** * Pattern to match for session information (lttng list ) */ static final Pattern TRACE_SESSION_PATTERN = Pattern.compile("\\s*Tracing\\s+session\\s+(.*)\\:\\s+\\[(active|inactive)\\].*"); //$NON-NLS-1$ + /** + * Pattern to match for snapshot session information (lttng list ) + */ + static final Pattern TRACE_SNAPSHOT_SESSION_PATTERN = Pattern.compile("\\s*Tracing\\s+session\\s+(.*)\\:\\s+\\[(active|inactive)\\s*snapshot\\].*"); //$NON-NLS-1$ /** * Pattern to match for session path information (lttng list ) */ @@ -267,7 +283,7 @@ public interface LTTngControlServiceConstants { * Pattern to match session path for network tracing (lttng list ) * Note: file for protocol is not considered as network trace since local consumer will be used. */ - static final Pattern TRACE_NETWORK_PATH_PATTERN = Pattern.compile("\\s*Trace\\s+path\\:\\s+(net|net6|tcp|tcp6)\\:\\/\\/(.*)(\\:(\\d*)\\/(.*)\\[data\\:\\s+(\\d*)\\]){0,1}"); //$NON-NLS-1$ + static final Pattern TRACE_NETWORK_PATH_PATTERN = Pattern.compile("\\s*Trace\\s+path\\:\\s+(net|net4|net6|tcp|tcp6)\\:\\/\\/(.*)(\\:(\\d*)\\/(.*)\\[data\\:\\s+(\\d*)\\]){0,1}"); //$NON-NLS-1$ /** * Sub-pattern to pattern TRACE_NETWORK_PATH_PATTERN to match file protocol */ @@ -392,4 +408,14 @@ public interface LTTngControlServiceConstants { * Pattern to match error line if no ust tracer is available or installed. */ static final Pattern LIST_UST_NO_UST_PROVIDER_PATTERN = Pattern.compile(".*Unable\\s*to\\s*list\\s*UST\\s*event.*"); //$NON-NLS-1$; + /** + * Pattern to match for list snapshot information (lttng snapshot list-output) + */ + static final Pattern LIST_SNAPSHOT_OUTPUT_PATTERN = Pattern.compile("\\s+\\[(\\d+)\\]\\s+(.*)\\:\\s+(.*)"); //$NON-NLS-1$ + /** + * Pattern to match snapshot path for network tracing (lttng list ) + * Note: file for protocol is not considered as network trace since local consumer will be used. + */ + static final Pattern SNAPSHOT_NETWORK_PATH_PATTERN = Pattern.compile("(net|net4|net6|tcp|tcp6)\\:\\/\\/(.*)(\\:(\\d*)\\/(.*)\\[data\\:\\s+(\\d*)\\]){0,1}"); //$NON-NLS-1$ + } -- 2.34.1