Project

General

Profile

Actions

Bug #1124

open

lttng-sessiond saves empty domain stubs

Added by Jérémie Galarneau about 7 years ago. Updated about 7 years ago.

Status:
Feedback
Priority:
Low
Assignee:
-
Target version:
Start date:
07/24/2017
Due date:
% Done:

0%

Estimated time:

Description

The save command, when used to save a session containing a single log4j event and channel, produces empty stubs for all userspace domains.

<?xml version="1.0" encoding="UTF-8"?>
<sessions>
        <session>
                <name>test</name>
                <domains>
                        <domain>
                                <type>UST</type>
                                <buffer_type>PER_UID</buffer_type>
                                <channels/>
                                <trackers/>
                        </domain>
                        <domain>
                                <type>JUL</type>
                                <buffer_type>PER_UID</buffer_type>
                                <channels/>
                        </domain>
                        <domain>
                                <type>LOG4J</type>
                                <buffer_type>PER_UID</buffer_type>
                                <channels>
                                        <channel>
                                                <name>lttng_log4j_channel</name>
                                                <enabled>true</enabled>
                                                <overwrite_mode>DISCARD</overwrite_mode>
                                                <subbuffer_size>524288</subbuffer_size>
                                                <subbuffer_count>4</subbuffer_count>
                                                <switch_timer_interval>0</switch_timer_interval>
                                                <read_timer_interval>0</read_timer_interval>
                                                <output_type>MMAP</output_type>
                                                <tracefile_size>0</tracefile_size>
                                                <tracefile_count>0</tracefile_count>
                                                <live_timer_interval>0</live_timer_interval>
                                                <events>
                                                        <event>
                                                                <name>dfklasj</name>
                                                                <enabled>true</enabled>
                                                                <type>TRACEPOINT</type>
                                                                <loglevel_type>ALL</loglevel_type>
                                                                <filter>logger_name == &quot;dfklasj&quot;</filter>
                                                        </event>
                                                </events>
                                                <contexts/>
                                        </channel>
                                </channels>
                        </domain>
                        <domain>
                                <type>PYTHON</type>
                                <buffer_type>PER_UID</buffer_type>
                                <channels/>
                        </domain>
                </domains>
                <started>false</started>
                <output>
                        <consumer_output>
                                <enabled>true</enabled>
                                <destination>
                                        <path>/home/jgalar/lttng-traces/test-20170724-142342</path>
                                </destination>
                        </consumer_output>
                </output>
        </session>
</sessions>

Reproduction steps:

$ lttng create test
Session test created.
Traces will be written in /home/jgalar/lttng-traces/test-20170724-142342

$ lttng enable-channel -u lttng_log4j_channel --monitor-timer 456789
UST channel lttng_log4j_channel enabled for session test

$ lttng enable-event -l dfklasj
LOG4J event dfklasj enabled

$ lttng list test
Tracing session test: [inactive]
    Trace path: /home/jgalar/lttng-traces/test-20170724-142342

=== Domain: UST global ===

Buffer type: per UID

Channels:
-------------
- lttng_log4j_channel: [enabled]

    Attributes:
      overwrite mode: 0
      subbuffers size: 524288
      number of subbuffers: 4
      switch timer interval: 0
      read timer interval: 0
      monitor timer interval: 456789
      trace file count: 0
      trace file size (bytes): 0
      discarded events: 0
      lost packets: 0
      output: mmap()

    Events:
      None

=== Domain: LOG4j (Logging for Java) ===

Events (Logger name):
---------------------
    - dfklasj [enabled] [filter: 'logger_name == "dfklasj"']

$ lttng save
All sessions have been saved successfully.

Actions #1

Updated by Jonathan Rajotte Julien about 7 years ago

  • Status changed from Confirmed to Feedback
  • Priority changed from Normal to Low
  • Target version changed from 2.10 to Wishlist

As discussed via IRC

Looking at the code, this is by design. No regression here.

Still we could refactor this code to perform group by domain type for channels and only print domain where the channel count is not zero. This would prevent the iteration over all ust channels for each time we print a domain.

Cheers

Actions #2

Updated by Jonathan Rajotte Julien about 7 years ago

  • Target version changed from Wishlist to Refactoring
Actions

Also available in: Atom PDF