further updates
[lttv.git] / trunk / masters-pmf / 3rd_gen_viewer / 3rd_gen_viewer_arch.lyx
CommitLineData
1fde1b39 1#LyX 1.5.5 created this file. For more info see http://www.lyx.org/
2\lyxformat 276
3\begin_document
4\begin_header
5\textclass article
6\language english
7\inputencoding auto
8\font_roman default
9\font_sans default
10\font_typewriter default
11\font_default_family default
12\font_sc false
13\font_osf false
14\font_sf_scale 100
15\font_tt_scale 100
16\graphics default
17\paperfontsize default
18\spacing single
19\papersize default
20\use_geometry false
21\use_amsmath 1
22\use_esint 1
23\cite_engine basic
24\use_bibtopic false
25\paperorientation portrait
26\secnumdepth 3
27\tocdepth 3
28\paragraph_separation skip
29\defskip medskip
30\quotes_language english
31\papercolumns 1
32\papersides 1
33\paperpagestyle default
34\tracking_changes false
35\output_changes false
36\author ""
37\author ""
38\end_header
39
40\begin_body
41
42\begin_layout Title
43A Set of APIs for a Third-Generation Trace Viewer
44\end_layout
45
46\begin_layout Author
47\noindent
48Pierre-Marc Fournier, Michel Dagenais, Mathieu Desnoyers
49\newline
50
51\family typewriter
52\size footnotesize
53<pierre-marc.fournier _at_ polymtl.ca>
54\family default
55\size default
56
57\newline
58
59\newline
60CASI Lab
61\newline
62École Polytechnique de Montréal
63\newline
64
65\newline
66WORK IN PROGRESS
67\end_layout
68
69\begin_layout Section
70Introduction
71\end_layout
72
73\begin_layout Standard
74This document proposes some APIs for a trace viewing and analysis infrastructure.
75\end_layout
76
77\begin_layout Standard
78Design choices were made based on the experience acquired by the design,
79 development and use of two previous generations of trace viewers, respectively
80 the Trace Visualizer from the Linux Trace Toolkit and its successor, the
81 LTTV from the LTTng tracing toolkit.
82\end_layout
83
84\begin_layout Section
85Goals
86\end_layout
87
88\begin_layout Itemize
89Provide an infrastructure for fast, interactive visualization and analysis
90 of huge traces (>10 GB) on standard workstations
91\begin_inset Foot
92status open
93
94\begin_layout Standard
95Efficiency is of great importance.
96 It is tempting to think that as computers get faster, it will be possible
97 to run more complex analyses on traces in a shorter time.
98 In fact, the size of the traces grows as computers get more powerful, because
99 they do more operations than before in the same amount of time and therefore
100 generate more events.
101 The current tendency to parallelize systems is another factor that results
102 in bigger traces.
103\end_layout
104
105\end_inset
106
107
108\end_layout
109
110\begin_layout Itemize
b71d449a 111Allow efficient manipulation of traces that are larger than the system memory
112\end_layout
113
114\begin_layout Itemize
115Support processing of live traces
1fde1b39 116\end_layout
117
118\begin_layout Itemize
119Allow merging of traces of different formats
120\end_layout
121
1fde1b39 122\begin_layout Itemize
123Design with both command line utilities (C language) and graphical interfaces
124 (Java and others) in mind, sharing code and standardizing interfaces as
125 much as possible
126\end_layout
127
128\begin_deeper
129\begin_layout Standard
130Both command-line interfaces and graphical interfaces have an important
131 role to play in trace analysis.
132 While graphical interfaces allow for complex views, command-line utilities
133 can be used quickly in more environments; they can also be more convenient
134 in some circumstances.
135 A good design should be such that they can share code and APIs.
136\end_layout
137
138\end_deeper
139\begin_layout Section
140General aspects
141\end_layout
142
143\begin_layout Itemize
144All data structures must be accessed through API methods, in order to allow
145 for internal change without breaking compatibility.
146\end_layout
147
1fde1b39 148\begin_layout Itemize
4414440b 149The APIs in this document are described as C functions and datatypes.
b71d449a 150 When an operation applies to an abstraction that could be an object in
4414440b 151 an object-oriented language, it is specified as the first argument of the
152 function.
1fde1b39 153\end_layout
154
155\begin_layout Subsection
4414440b 156Time
1fde1b39 157\end_layout
158
1fde1b39 159\begin_layout Standard
4414440b 160The framework needs to represent points in the time line and time ranges.
161 This is done by two data structures, respectively:
1fde1b39 162\end_layout
163
164\begin_layout Itemize
4414440b 165struct trace_time
1fde1b39 166\end_layout
167
168\begin_layout Itemize
4414440b 169struct trace_time_range
1fde1b39 170\end_layout
171
1fde1b39 172\begin_layout Standard
4414440b 173The preferred representation for times is seconds.
1fde1b39 174\end_layout
175
4414440b 176\begin_layout Standard
177Ranges are a span between two points in time.
178 They are represented as these two points.
179 One or both of them can have the special value
180\emph on
181infinity
182\emph default
183.
1fde1b39 184\end_layout
185
b71d449a 186\begin_layout Standard
187Each time is accompanied by an uncertainty value.
188\end_layout
189
1fde1b39 190\begin_layout Section
b71d449a 191Low level reading of traces
1fde1b39 192\end_layout
193
194\begin_layout Subsection
195Overview
196\end_layout
197
b71d449a 198\begin_layout Standard
199This API presents a uniform way of accessing traces at a low level, that
200 is to access randomly the events of the trace in an physical-encoding-independa
201nt way.
202\end_layout
203
204\begin_layout Standard
205\begin_inset Note Note
206status open
207
1fde1b39 208\begin_layout Subsubsection
209Timestamps
210\end_layout
211
212\begin_layout Standard
213Timestamps, at the framework level, should be in an architecture-independent
214 format.
215 One possibility would be to have them stored in seconds (with decimals).
216 Offsetting, if necessary, could be handled by the traceset (trace merging)
217 level.
218 An uncertainty value should accompany the timestamp.
219 Timestamps in cycles should be available if they are provided by the tracer.
220\end_layout
221
b71d449a 222\end_inset
223
224
1fde1b39 225\end_layout
226
227\begin_layout Standard
b71d449a 228\begin_inset Note Note
229status open
1fde1b39 230
231\begin_layout Subsubsection
232Factory methods
233\end_layout
234
235\begin_layout Itemize
6e3755ba 236void get_supported_formats(void)
1fde1b39 237\end_layout
238
239\begin_deeper
240\begin_layout Standard
241Arguments: none
242\end_layout
243
244\begin_layout Standard
245Return:
246\end_layout
247
248\begin_layout Itemize
249a list of supported formats
250\end_layout
251
252\end_deeper
253\begin_layout Itemize
254open_trace()
255\end_layout
256
257\begin_deeper
258\begin_layout Standard
259Arguments:
260\end_layout
261
262\begin_layout Itemize
263trace URL
264\end_layout
265
266\begin_deeper
267\begin_layout Itemize
268local file name
269\end_layout
270
271\begin_layout Itemize
272other special url to establish a network connection
273\end_layout
274
275\begin_layout Itemize
276etc...
277\end_layout
278
279\end_deeper
280\begin_layout Itemize
281trace format (optional, for cases where auto detection would not work or
282 be ambiguous)
283\end_layout
284
285\begin_layout Standard
286Return:
287\end_layout
288
289\begin_layout Itemize
290a trace handle
291\end_layout
292
b71d449a 293\end_inset
294
295
296\end_layout
297
298\begin_layout Subsection
299Methods of the Low Level Trace Reading API
1fde1b39 300\end_layout
301
302\begin_layout Itemize
b71d449a 303void close(struct trace *tr)
1fde1b39 304\end_layout
305
b71d449a 306\begin_deeper
307\begin_layout Standard
308Close the trace and unallocate all resources associated to this struct trace
309 including the handle.
310 After this call, tr is invalid and its memory is freed.
311\end_layout
312
313\end_deeper
1fde1b39 314\begin_layout Itemize
b71d449a 315struct event *current_event(struct trace *, struct cursor *cur)
1fde1b39 316\end_layout
317
318\begin_deeper
319\begin_layout Standard
320Arguments: none
321\end_layout
322
323\begin_layout Standard
324Return:
325\end_layout
326
327\begin_layout Itemize
328the event currently pointed by the position pointer
329\end_layout
330
b71d449a 331\begin_layout Itemize
332NULL, if current_event is called on a new cursor that is positioned before
333 the beginning of the trace
334\end_layout
335
1fde1b39 336\end_deeper
337\begin_layout Itemize
b71d449a 338int advance(struct trace *tr, struct trace_cursor *cur)
1fde1b39 339\end_layout
340
341\begin_deeper
342\begin_layout Standard
b71d449a 343Advance the cursor to the next event in the trace.
1fde1b39 344\end_layout
345
346\begin_layout Standard
b71d449a 347Arguments:
348\end_layout
349
350\begin_layout Itemize
351tr: the trace
352\end_layout
353
354\begin_layout Itemize
355cur: the cursor that should be advanced
1fde1b39 356\end_layout
357
358\begin_layout Standard
b71d449a 359Return value:
1fde1b39 360\end_layout
361
362\begin_layout Itemize
363The result:
364\end_layout
365
366\begin_deeper
367\begin_layout Itemize
b71d449a 368Success (TRACE_ADVANCE_OK)
1fde1b39 369\end_layout
370
371\begin_layout Itemize
b71d449a 372The cursor was not advanced because the end of trace is reached (end of
373 a non-live trace or of a completed live trace) (TRACE_ADVANCE_END)
1fde1b39 374\end_layout
375
376\begin_layout Itemize
b71d449a 377The cursor was not advanced because no new events are available at this
378 time (with a live trace that is still running) (TRACE_ADVANCE_TRY_AGAIN)
1fde1b39 379\end_layout
380
381\end_deeper
382\end_deeper
383\begin_layout Itemize
b71d449a 384int seek_time(struct trace *tr, struct trace_cursor *cur, struct trace_time
385 time)
1fde1b39 386\end_layout
387
388\begin_deeper
389\begin_layout Standard
390Arguments:
391\end_layout
392
393\begin_layout Itemize
b71d449a 394tr: the trace that should be seeked
395\end_layout
396
397\begin_layout Itemize
398cur: the cursor to seek
399\end_layout
400
401\begin_layout Itemize
402time: the time to seek to
1fde1b39 403\end_layout
404
405\begin_layout Standard
b71d449a 406Return:
407\end_layout
408
409\begin_layout Itemize
4100: success
411\end_layout
412
413\begin_layout Itemize
414!= 0: time out of range
1fde1b39 415\end_layout
416
417\end_deeper
418\begin_layout Itemize
b71d449a 419struct trace_cursor *trace_new_cursor(struct trace *tr)
1fde1b39 420\end_layout
421
6e3755ba 422\begin_deeper
423\begin_layout Standard
b71d449a 424Return a new cursor associated to the trace.
425 The position of this new cursor is just before the first event, therefore
426 advance() must be called before reading the first event.
6e3755ba 427\end_layout
428
429\end_deeper
1fde1b39 430\begin_layout Itemize
6e3755ba 431struct trace_cursor *trace_cursor_copy(struct trace_cursor *cur)
1fde1b39 432\end_layout
433
b71d449a 434\begin_deeper
435\begin_layout Standard
436Copy a cursor.
437\end_layout
438
439\begin_layout Standard
440Arguments:
441\end_layout
442
443\begin_layout Itemize
444cur: the cursor to copy
445\end_layout
446
447\begin_layout Standard
448Return value:
449\end_layout
450
451\begin_layout Itemize
452a new cursor that is at the same location as cur
453\end_layout
454
455\end_deeper
456\begin_layout Itemize
457void trace_cursor_destroy(struct trace_cursor *cur)
458\end_layout
459
460\begin_deeper
461\begin_layout Standard
462Free all resources associated to a cursor.
463 After this call, cur is invalid.
464\end_layout
465
466\begin_layout Standard
467Arguments:
468\end_layout
469
1fde1b39 470\begin_layout Itemize
b71d449a 471cur: the cursor to destroy
1fde1b39 472\end_layout
473
b71d449a 474\end_deeper
1fde1b39 475\begin_layout Itemize
6e3755ba 476struct trace_time get_time_start(struct trace *tr)
1fde1b39 477\end_layout
478
479\begin_deeper
480\begin_layout Standard
b71d449a 481Arguments:
482\end_layout
483
484\begin_layout Itemize
485tr: the trace
1fde1b39 486\end_layout
487
488\begin_layout Standard
489Return:
490\end_layout
491
492\begin_layout Itemize
493the timestamp of the first event in the trace
494\end_layout
495
496\end_deeper
497\begin_layout Itemize
6e3755ba 498struct trace_time get_time_end(struct trace *tr)
1fde1b39 499\end_layout
500
501\begin_deeper
502\begin_layout Standard
503Arguments: none
504\end_layout
505
506\begin_layout Standard
507Return:
508\end_layout
509
510\begin_layout Itemize
511the timestamp of the last event in the trace
512\end_layout
513
514\end_deeper
515\begin_layout Itemize
6e3755ba 516register_callback_new_event(struct trace *tr, struct trace_time after, void
b71d449a 517 (*cb)(struct trace *))
1fde1b39 518\end_layout
519
520\begin_deeper
521\begin_layout Standard
522Register a callback that is called when a new event becomes available in
523 a live trace.
524 It is also called when the live trace ends.
525\end_layout
526
527\begin_layout Standard
528Arguments:
529\end_layout
530
531\begin_layout Itemize
b71d449a 532after (timestamp) : call only if the timestamp of the event is later than
533
1fde1b39 534\emph on
535after
536\end_layout
537
538\begin_layout Itemize
6e3755ba 539cb: the callback function
1fde1b39 540\begin_inset Note Note
541status open
542
543\begin_layout Standard
544specify its args and return val
545\end_layout
546
547\end_inset
548
549
550\end_layout
551
552\begin_layout Standard
553Return:
554\end_layout
555
556\begin_layout Itemize
557Result (success or failure)
558\end_layout
559
560\end_deeper
b71d449a 561\begin_layout Section
562High level reading of traces
563\end_layout
564
565\begin_layout Standard
566When reading/analyzing/viewing several traces of heterogenous types, these
567 traces are read by translator modules, which export the Low Level Trace
568 Reading API.
569 The traceset service then uses this API to read each of these traces individual
570ly, then merge them.
571 It may apply timestamp offsetting or other synchronization techniques.
572 To allow views and analyses to access events, it in turn exports the High
573 Level Trace Reading API.
1fde1b39 574\end_layout
575
576\begin_layout Standard
577The goal of this API is to provide a uniform way for analyses and views
b71d449a 578 to obtain large sets of trace events from a traceset (merge of many traces
579 or a single trace).
580\end_layout
581
582\begin_layout Subsection
583Methods of the high-level trace reading API
1fde1b39 584\end_layout
585
586\begin_layout Itemize
4414440b 587struct request_handle *traceset_new_event_request(struct traceset *tr, struct
588 trace_time t1, struct trace_time t2, struct event_filter *filter, void
589 (*cb)(void *data, ), void *data)
1fde1b39 590\end_layout
591
592\begin_deeper
593\begin_layout Standard
4414440b 594Request a range of events
1fde1b39 595\end_layout
596
4414440b 597\begin_layout Standard
598Arguments:
1fde1b39 599\end_layout
600
601\begin_layout Itemize
4414440b 602tr: the traceset
1fde1b39 603\end_layout
604
605\begin_layout Itemize
4414440b 606t1: start timestamp
1fde1b39 607\end_layout
608
609\begin_layout Itemize
4414440b 610t2: stop timestamp (special value for infinity, for live traces)
1fde1b39 611\end_layout
612
613\begin_layout Itemize
4414440b 614filter: filter with complex expressions
1fde1b39 615\end_layout
616
617\begin_layout Itemize
4414440b 618data: private pointer to be passed to the callback
1fde1b39 619\end_layout
620
621\begin_layout Standard
622Return:
623\end_layout
624
625\begin_layout Itemize
626handle to the request for cancelling it
627\end_layout
628
629\end_deeper
630\begin_layout Itemize
4414440b 631void event_request_cancel(struct request_handle *req)
1fde1b39 632\end_layout
633
634\begin_deeper
b71d449a 635\begin_layout Standard
636Cancel a request.
637\end_layout
638
1fde1b39 639\begin_layout Standard
640Arguments:
641\end_layout
642
643\begin_layout Itemize
4414440b 644req: the handle to the request
1fde1b39 645\end_layout
646
647\end_deeper
648\begin_layout Subsection
649State management
650\end_layout
651
4414440b 652\begin_layout Standard
653States are key/value pairs associated with a time range.
654 Keys can be (and generally are) duplicated as long as they do not apply
655 to overlapping ranges.
656\end_layout
657
658\begin_layout Standard
659Keys are character strings.
660\end_layout
661
662\begin_layout Standard
663Values may be of various types:
664\end_layout
665
666\begin_layout Itemize
667string
668\end_layout
669
670\begin_layout Itemize
671uint32
672\end_layout
673
674\begin_layout Itemize
675int32
676\end_layout
677
678\begin_layout Itemize
679blob (binary block of arbitrary length)
680\end_layout
681
682\begin_layout Itemize
683float32
684\end_layout
685
686\begin_layout Itemize
687float64
688\end_layout
689
690\begin_layout Standard
691The state information must be persistent between executions of the framework.
692\end_layout
693
694\begin_layout Standard
695It is possible to assign a state to the range -infinity..infinity to indicate
b71d449a 696 that it is global to the trace.
4414440b 697\end_layout
698
699\begin_layout Standard
700The key names should be hierarchical.
701\end_layout
702
1fde1b39 703\begin_layout Subsubsection
704State accessing API
705\end_layout
706
707\begin_layout Itemize
4414440b 708struct state_value *state_get_value_at_time(char *key, struct trace_time
709 time)
1fde1b39 710\end_layout
711
712\begin_deeper
4414440b 713\begin_layout Standard
714Request the value of a given key at a point in time
715\end_layout
716
1fde1b39 717\begin_layout Standard
718Arguments:
719\end_layout
720
721\begin_layout Itemize
4414440b 722var: the state variables (string)
723\end_layout
724
725\begin_layout Itemize
726time: the timestamp
727\end_layout
728
729\begin_layout Standard
730Return value:
1fde1b39 731\end_layout
732
733\begin_layout Itemize
4414440b 734The state value
1fde1b39 735\end_layout
736
737\end_deeper
738\begin_layout Itemize
4414440b 739struct state_value_range **state_get_values_in_range(char *key, struct state_val
740ue *val, struct trace_time_range range)
741\end_layout
742
743\begin_deeper
744\begin_layout Standard
1fde1b39 745Request all the states changes of a given set of state variables between
746 two time indexes
747\end_layout
748
1fde1b39 749\begin_layout Standard
750Arguments:
751\end_layout
752
753\begin_layout Itemize
4414440b 754key: the key
1fde1b39 755\end_layout
756
757\begin_layout Itemize
4414440b 758range: the time range
1fde1b39 759\end_layout
760
4414440b 761\end_deeper
1fde1b39 762\begin_layout Itemize
4414440b 763Other functions for getting values for a set of keys at once?
1fde1b39 764\end_layout
765
1fde1b39 766\begin_layout Subsubsection
767State setting API
768\end_layout
769
4414440b 770\begin_layout Itemize
771set a particular state
772\end_layout
773
774\begin_layout Itemize
775delete some states
776\end_layout
777
1fde1b39 778\begin_layout Section
779Describing event types
780\end_layout
781
782\begin_layout Subsection
783Overview
784\end_layout
785
786\begin_layout Standard
787Because tracepoints may be created dynamically, information about the descriptio
788n of events is just as dynamic.
789 In this context, one simple way to communicate the event description informatio
790n to upper layers would be to send them as events, as it is done in recent
791 versions of LTTV.
792 The core events used to describe other events are the only ones whose descripti
793on is hardcoded in the framework.
794\end_layout
795
796\begin_layout Standard
797These event-type-describing events could then be received and interpreted
4414440b 798 by the Event Description Service, which would be a client to the high-level
799 tracing API at the same level as normal views and analyses.
1fde1b39 800 It would store the information and allow the other views and analyses to
801 access it via this API.
802\end_layout
803
4414440b 804\begin_layout Standard
805Each event has a timestamp, a name and arguments of various types.
806 The framework should support the following types:
807\end_layout
808
809\begin_layout Itemize
810uint32
811\end_layout
812
813\begin_layout Itemize
814uint64
815\end_layout
816
817\begin_layout Itemize
818int32
819\end_layout
820
821\begin_layout Itemize
822int64
823\end_layout
824
825\begin_layout Itemize
826string
827\end_layout
828
1fde1b39 829\begin_layout Subsection
830Events-describing events
831\end_layout
832
833\begin_layout Itemize
834Event type declaration event
835\end_layout
836
837\begin_deeper
838\begin_layout Standard
839Announce the existence of an event type
840\end_layout
841
842\begin_layout Itemize
843event type name
844\end_layout
845
846\end_deeper
847\begin_layout Itemize
848Argument declaration event
849\end_layout
850
851\begin_deeper
852\begin_layout Standard
853Announce the existence of an event argument
854\end_layout
855
856\begin_layout Itemize
857event type name
858\end_layout
859
860\begin_layout Itemize
861name
862\end_layout
863
864\begin_layout Itemize
865type
866\end_layout
867
868\end_deeper
869\begin_layout Itemize
870Event destruction
871\end_layout
872
873\begin_deeper
874\begin_layout Standard
875Announce that an event type ceased to exist
876\end_layout
877
878\begin_layout Itemize
879event type name
880\end_layout
881
882\end_deeper
883\begin_layout Subsection
884Event type description API
885\end_layout
886
4414440b 887\begin_layout Standard
888The event type description service provides the following functions.
889\end_layout
890
1fde1b39 891\begin_layout Itemize
4414440b 892GArray<struct event_type *> *traceset_get_all_event_types(struct traceset
893 *ts)
894\end_layout
895
896\begin_deeper
897\begin_layout Standard
1fde1b39 898Get the list of all the event types
899\end_layout
900
4414440b 901\begin_layout Standard
902Arguments:
903\end_layout
904
1fde1b39 905\begin_layout Itemize
4414440b 906ts: the traceset of which we want the event types
907\end_layout
908
909\begin_layout Standard
910Return value:
911\end_layout
912
913\begin_layout Itemize
914A GArray of of struct event_type.
915 The GArray must be gfree()'d by the caller when it is done reading it.
916\end_layout
917
918\end_deeper
919\begin_layout Itemize
920struct event_type *traceset_get_event_type_by_name(struct traceset *ts,
921 char *name)
922\end_layout
923
924\begin_deeper
925\begin_layout Standard
1fde1b39 926Find an event type by name
927\end_layout
928
4414440b 929\begin_layout Standard
930Arguments:
931\end_layout
932
1fde1b39 933\begin_layout Itemize
4414440b 934ts: the traceset of which we want the event type
1fde1b39 935\end_layout
936
937\begin_layout Itemize
4414440b 938name: the name of the of the event type we are looking for
939\end_layout
940
941\begin_layout Standard
942Return value:
1fde1b39 943\end_layout
944
945\begin_layout Itemize
4414440b 946A pointer to the event type (must not be free'd) or NULL if not found
947\end_layout
948
949\end_deeper
950\begin_layout Itemize
951GArray<struct event arg *> *event_type_get_all_args(struct event_type *evtype)
952\end_layout
953
954\begin_deeper
955\begin_layout Standard
956Get the list of arguments of an event
957\end_layout
958
959\begin_layout Standard
960Arguments:
1fde1b39 961\end_layout
962
963\begin_layout Itemize
4414440b 964eventype: the event type of which we want the arguments
965\end_layout
966
967\begin_layout Standard
968Return value:
1fde1b39 969\end_layout
970
971\begin_layout Itemize
4414440b 972A GArray of struct event_args.
973 The GArray must be gfree()'d by the caller when it is done reading it.
1fde1b39 974\end_layout
975
4414440b 976\end_deeper
1fde1b39 977\begin_layout Itemize
4414440b 978struct event_arg *event_type_get_arg_by_name(struct event_type *evtype)
1fde1b39 979\end_layout
980
4414440b 981\begin_deeper
982\begin_layout Standard
983Find an argument by name
984\end_layout
985
986\end_deeper
1fde1b39 987\begin_layout Itemize
4414440b 988Functions for accessing struct event_arg fields
1fde1b39 989\end_layout
990
991\begin_layout Section
992Inspecting events
993\end_layout
994
995\begin_layout Subsection
996Overview
997\end_layout
998
999\begin_layout Standard
1000Events contain the following information.
1001\end_layout
1002
1003\begin_layout Itemize
1004Timestamp
1005\end_layout
1006
1007\begin_layout Itemize
4414440b 1008Event type identifier - an event id (integer) - hidden to the API users,
1009 manipulated as pointers/references to struct event_type
1010\end_layout
1011
1012\begin_layout Itemize
1013A reference to the trace it was in
1014\end_layout
1015
1016\begin_layout Subsection
1017Event inspecting API
1018\end_layout
1019
1020\begin_layout Itemize
1021struct event_type *event_get_type(struct traceset *ts, struct event *ev)
1fde1b39 1022\end_layout
1023
1024\begin_deeper
1025\begin_layout Standard
4414440b 1026get the event type corresponding to an event
1fde1b39 1027\end_layout
1028
4414440b 1029\begin_layout Standard
1030Arguments:
1fde1b39 1031\end_layout
1032
1033\begin_layout Itemize
4414440b 1034ts:
1fde1b39 1035\end_layout
1036
1fde1b39 1037\begin_layout Itemize
4414440b 1038ev:
1fde1b39 1039\end_layout
1040
4414440b 1041\begin_layout Standard
1042Return value:
1fde1b39 1043\end_layout
1044
1045\begin_layout Itemize
4414440b 1046The event type or NULL if no information
1047\end_layout
1048
1049\end_deeper
1050\begin_layout Itemize
1051struct trace_time event_get_time(struct event *ev)
1052\end_layout
1053
1054\begin_deeper
1055\begin_layout Standard
1056get the event time
1fde1b39 1057\end_layout
1058
4414440b 1059\end_deeper
1fde1b39 1060\begin_layout Itemize
4414440b 1061struct trace *event_get_trace(struct event *ev)
1fde1b39 1062\end_layout
1063
1064\begin_layout Itemize
4414440b 1065get the name of the machine on which the event occured or other location
1066 information
1fde1b39 1067\end_layout
1068
1069\begin_layout Itemize
1070get information on the type of tracing technology that was used
1071\end_layout
1072
1073\begin_layout Itemize
1074get the corresponding tracepoint (machine/tracing technology/name/location
1075 in code(if available))
1076\end_layout
1077
4414440b 1078\begin_layout Itemize
1079uint32 event_read_arg_uint32(struct event *ev, struct event_arg *arg)
1080\end_layout
1081
1082\begin_layout Itemize
1083int32 event_read_arg_int32(struct event *ev, struct event_arg *arg)
1084\end_layout
1085
1086\begin_layout Itemize
1087uint64 event_read_arg_uint64(struct event *ev, struct event_arg *arg)
1088\end_layout
1089
1090\begin_layout Itemize
1091int64 event_read_arg_int64(struct event *ev, struct event_arg *arg)
1092\end_layout
1093
1094\begin_layout Itemize
1095float32 event_read_arg_float32(struct event *ev, struct event_arg *arg)
1096\end_layout
1097
1098\begin_layout Itemize
1099float64 event_read_arg_float64(struct event *ev, struct event_arg *arg)
1100\end_layout
1101
1102\begin_layout Section
1103Filtering events
1104\end_layout
1105
1106\begin_layout Standard
1107A filtering API is proposed.
1108\end_layout
1109
1110\begin_layout Section
1111Controlling the tracing of a system
1112\end_layout
1113
1114\begin_layout Subsection
1115Overview
1116\end_layout
1117
1118\begin_layout Standard
1119The goal of this API is to provide a portable way of controlling tracing
1120 of heterogenous systems.
1121\end_layout
1122
1123\begin_layout Standard
1124It should enable to do the following actions.
1125\end_layout
1126
1127\begin_layout Itemize
1128Set the parameters of a trace (channels, buffering, destination of data
1129 (file, network, process)...)
1130\end_layout
1131
1132\begin_layout Itemize
1133Control the recording of events (start, stop, pause the trace)
1134\end_layout
1135
1136\begin_layout Itemize
1137Create tracepoints (on dynamic tracers) and control which tracepoints are
1138 activated (some may be at trace level, others might only permit system
1139 level)
1140\end_layout
1141
1142\begin_layout Subsection
1143Trace control API
1144\end_layout
1145
1146\begin_layout Itemize
1147List the static tracepoints available on a system
1148\end_layout
1149
1150\begin_deeper
1151\begin_layout Standard
1152These may be static tracepoints (active or inactive) or dynamic tracepoints
1153 (active or proposed).
1154\end_layout
1155
1156\end_deeper
1157\begin_layout Itemize
1158Add a new dynamic tracepoint
1159\end_layout
1160
1161\begin_layout Itemize
1162Activate a tracepoint
1163\end_layout
1164
1165\begin_layout Itemize
1166Deactivate a tracepoint
1167\end_layout
1168
1169\begin_layout Itemize
1170List available probes
1171\end_layout
1172
1173\begin_layout Itemize
1174Connect a probe to a tracepoint
1175\end_layout
1176
1177\begin_layout Itemize
1178Start tracing
1179\end_layout
1180
1181\begin_layout Itemize
1182Stop tracing
1183\end_layout
1184
1185\begin_layout Itemize
1186\begin_inset Note Greyedout
1187status open
1188
1189\begin_layout Standard
1190others missing...
1191\end_layout
1192
1193\end_inset
1194
1195
1196\end_layout
1197
1fde1b39 1198\end_body
1199\end_document
This page took 0.068717 seconds and 4 git commands to generate.