Remove duplicated marker id dump
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 4 Mar 2011 14:13:15 +0000 (09:13 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 4 Mar 2011 14:13:15 +0000 (09:13 -0500)
Marker ID is already dumped at:
- trace start (with marker dump)
- when a marker is enabled (probe callback associated with marker).

So this should cover all cases:
- either we have a marker in a lib/program that is already enabled, and start
  tracing after a library is loaded, for which the marker dump will catch the
  marker id.
- or we have a marker in a lib/program that is not enabled, and start tracing
  after a library is loaded. If after that we enable the marker, an event
  describing the marker ID will be generated.
- or if have tracing running, and then we enable a marker (connect probe to
  marker) for a marker located in a yet-unloaded library. In this case, the
  marker ID event is generated when we connect the probe to the marker, even if
  the library is not yet loaded.

The cases are similar for the marker format, except that it is valid to have an
unknown marker format when we connect a marker probe. In that case, the format
will be written into the trace by marker_set_format, called upon library load.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
libust/marker.c
libust/tracer.c

index dc2747f0b17bbc8c613ce3c57fb38194bb877dac..96d140996890c40c5b4a43da45a63a4180aad7d3 100644 (file)
@@ -693,20 +693,6 @@ void marker_update_probe_range(struct marker * const *begin,
                        /*
                         * ignore error, continue
                         */
-
-                       /* This is added for UST. We emit a core_marker_id event
-                        * for markers that are already registered to a probe
-                        * upon library load. Otherwise, no core_marker_id will
-                        * be generated for these markers. Is this the right thing
-                        * to do?
-                        */
-                       trace_mark(metadata, core_marker_id,
-                                  "channel %s name %s event_id %hu "
-                                  "int #1u%zu long #1u%zu pointer #1u%zu "
-                                  "size_t #1u%zu alignment #1u%u",
-                                  (*iter)->channel, (*iter)->name, mark_entry->event_id,
-                                  sizeof(int), sizeof(long), sizeof(void *),
-                                  sizeof(size_t), ltt_get_alignment());
                } else {
                        disable_marker(*iter);
                }
index 435c22dda3c8a2a3b3f45bd7e1fc30a5f0c24ce3..100dec09a5b670461cb287b07682ab862f509b82 100644 (file)
@@ -902,11 +902,11 @@ int ltt_trace_start(const char *trace_name)
        ltt_unlock_traces();
 
        /*
-        * Call the kernel state dump.
-        * Events will be mixed with real kernel events, it's ok.
+        * Call the process-wide state dump.
         * Notice that there is no protection on the trace : that's exactly
         * why we iterate on the list and check for trace equality instead of
-        * directly using this trace handle inside the logging function.
+        * directly using this trace handle inside the logging function: we want
+        * to record events only in a single trace in the trace session list.
         */
 
        ltt_dump_marker_state(trace);
This page took 0.025194 seconds and 4 git commands to generate.