[ltt-dev] Getting writeTraceNetwork to work

Thibault, Daniel Daniel.Thibault at drdc-rddc.gc.ca
Fri Sep 23 15:58:08 EDT 2011


   Back in May I asked about writeTraceNetwork, which stubbornly and ungracefully refused to work, raising an exception fatal for the tcf client.  I've tracked the problem down to invocations of flush_stream, which has been withdrawn from the code base for a long time now.  The last implementation seen in streams.c actually assigned an empty function to flush_stream, so it never actually did anything.

 

   Between versions 72ea7d0 (2011-Mar-23) and 7a8767c (2011-Aug-12) of lttng-agent, some of the errant calls to flush_stream have been deleted, but some still remain.  They must also be deleted in order to get writeTraceNetwork to work.

 

   The two small diffs I propose follow:

 

############################## lttctlustlibustdcallbacks.c ##############################

--- a/agent/lttctlustlibustdcallbacks.c   2011-08-12 11:02:15.000000000 -0400

+++ b/agent/lttctlustlibustdcallbacks.c   2011-09-22 16:51:06.000000000 -0400

@@ -85,7 +85,7 @@

     write_stream(out, 0);

 

     write_stream(out, MARKER_EOM);

-    flush_stream(out);

+//      flush_stream(out);

 

     pthread_barrier_wait(tcf_data->barrier);

 }

############################## lttctlclient.c ##############################

--- a/client/lttctlclient.c    2011-08-12 11:02:15.000000000 -0400

+++ b/client/lttctlclient.c    2011-09-22 17:10:40.000000000 -0400

@@ -480,9 +480,9 @@

             write_stringz(&c->out, args[i]);

     }

     write_stream(&c->out, MARKER_EOM);

-    flush_stream(&c->out);

+//  flush_stream(&c->out);

 

     /* fprintf(stderr, "lttctlclient : Just sent a cmd!\n"); */

 

############################## (end) ##############################

 

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 <http://www.travelgis.com/map.asp?addr=918V%20QSDJ> 
Gouvernement du Canada / Government of Canada
<http://www.valcartier.drdc-rddc.gc.ca/ <http://www.valcartier.drdc-rddc.gc.ca/> >

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20110923/1e592da6/attachment-0002.htm>


More information about the lttng-dev mailing list