Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[linuxtools-dev] Trying to get the eclipse linuxtools to work

----------------------------------------------------------------------
Date: Tue, 11 Oct 2011 14:01:40 -0400
From: Patrick Tasse <patrick.tasse@xxxxxxxxx>

> For the Files subsystem, I see the same behavior. This is untouched
> functionality provided by the Target Management / Remote Systems Explorer
> plugins. I tried to debug a little to see what is happening, it seems that
> when you expand the "Home" filter, the filter string is "." which gets
> somehow translated to "root", and what you end up seeing is the contents of
> "/root". On my machine that directory only contains hidden files so the
> expanded "Home" filter is empty. When I expand the "Root" filter which is
> "/", I see one of the items is the "root" subdirectory, and it is also empty
> if I expand it. Personally I just don't use the "Home" filter...

   Yeah, best ignored for now, and let the TM/RSE folks fix it at leisure.

> For your problems with trace control, I suspect that when you create the new
> trace there is an exception thrown, since if it were successful a
> RemoteResourceChangedEvent would have been fired at the end and the new
> trace should appear under the target "0".
>
> The error should be logged in
> <workspace>/.metadata/.plugins/org.eclipse.rse.ui/.log, or perhaps
> <workspace>/.metadata/.log. It should also be displayed in the General >
> Error Log view in Eclipse.
>
> We probably should enhance the error handling so that a message is shown to
> the user on such errors...

   Normally the shell which is running the tcf-agent on the traced machine displays the stderr from the tcf-agent or its lttng plugins, but in this case there is no feedback (from tcf-agent and its lttng plugins) at all.
   Eclipse's error view has a "Create new trace failed", a series of "Set Channel Enable failed"/"Set Channel Overwrite failed" pairs, and a "Start tracing failed".  I was expecting an error dialog to pop up, or maybe an advisory alert offering me the possibility of switching to the error view (which was not open by default).  Something like "One or more errors occurred; would you like to open the Error view?".
   <workspace>/.metadata/.plugins/org.eclipse.rse.ui/.log showed me what was going wrong.  agent/lttctlservice contains several TODO tags that read "Send some kind of status" for several successful outcomes of commands; foolishly, my lttng tcf plugins filled those tags out with 'write_string(&c->out, "Action succeeded");'.  This leads to org.eclipse.rse.services.clientserver.messages.SystemMessageException: TCF task aborted (JSON syntax error).  Changing those calls to json_write_string fixes the problems and makes the LTTng LinuxTools fully functional.

> When you refresh the "All Providers" node, the command getTraces is used.
> This only returns the name of the traces from the LTT control directory (ex:
> /mnt/debugfs/ltt/control), but it has no information about the trace
> configuration, this is why you must reconfigure it. The configuration can
> only be retrieved for active traces, which are those that have a lttd daemon
> currently running (this is triggered by a successful writeTraceLocal or
> writeTraceNetwork).

   Part of the misbehaviour reported earlier was because some of the modifications I had made to the lttng tcf plugins were crashing the Eclipse connection (see above).  I now see I don't have to Refresh the All Providers node: I just need to redeploy it.  And the trace's properties don't need to be reiterated.  An improvement, but there is room for further improvement:

   Current procedure to reach channel configuration dialog:
1) Obtain contextual menu of the target, select New Trace
2) Fill out trace name and path
3) Click OK
4) Redeploy All Providers down to the trace
5) Obtain contextual menu of trace, select Configure Trace
6) Click Next

   Proposed procedure to reach channel configuration dialog:
1') Obtain contextual menu of the target, select New Trace
2') Fill out trace name and path
3') Click Next

   On step 3', Eclipse would redeploy the Remote Systems view down to the newly-created trace and select it.  This improved work flow saves three steps.

> I guess your Start is also failing, let's see what the .log says?
>
> Are you by any chance reusing an old trace name which is not properly
> cleaned up on your target?

   Nope, that was never a problem.

> The command getActiveTraces doesn't tell us if the trace is running or not
> (ie. started or paused). I have a working solution for that in my
> development code, but it requires a modification of the interface to
> lttng-agent. That is not available yet.

   Ah yes, it is true that a trace is "active" as soon as the writeTrace* is issued, so a comparison of getTraces with getActiveTraces is not as informative as it should be.  Eventually lltng-control will add proper query APIs and this will be fixed.

> For the terminology (stop, pause, destroy, etc..), we agree it's confusing
> especially if you are familiar with the underlying ltt control commands, but
> we tried to make it as intuitive as possible...

> Streaming to the host (writeTraceNetwork) should be working now, I'm not
> sure what state it was in before you fixed and recompiled it, what did you
> need to change? I know that it wasn't handling properly high load situations
> before.

   In agent/lttctlustlibustdcallbacks and client/lttctlclient, delete the calls to flush_stream (one each; they are not resolvable at runtime and did nothing anyway).  Otherwise writeTraceNetwork crashes the tcf-agent.

   The network streaming capability suggests one ought to have a third option, where the machine that sets up the trace assigns a third machine's file system as the trace target directory.  It would boil down to using TCF to tell the third party's tcf-agent to issue the writeTraceNetwork command to the traced machine.

   I appreciate the help, Patrick.

Daniel U. Thibault
R & D pour la défense Canada - Valcartier (RDDC Valcartier) / Defence R&D Canada - Valcartier (DRDC Valcartier)
Système de systèmes (SdS) / System of Systems (SoS)
Solutions informatiques et expérimentations (SIE) / Computing Solutions and Experimentations (CSE)
2459 Boul. Pie XI Nord
Québec, QC  G3J 1X5
CANADA
Vox : (418) 844-4000 x4245
Fax : (418) 844-4538
NAC: 918V QSDJ
Gouvernement du Canada / Government of Canada
<http://www.valcartier.drdc-rddc.gc.ca/>


Back to the top