Fix: update tests for --no-intersection
[deliverable/lttng-analyses.git] / lttng-analyses-record
index b162eae808266c025f69e6747d2006cc0f645ac7..1b45c92698d6a8b9e2b031b4fc43765b5832ad43 100755 (executable)
@@ -1,4 +1,26 @@
 #!/bin/bash
+#
+# The MIT License (MIT)
+#
+# Copyright (C) 2015 - Julien Desfossez <jdesfossez@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
 
 # Helper to setup a local LTTng tracing session with the appropriate
 # settings for the lttng analyses scripts
@@ -63,9 +85,16 @@ rm /tmp/lttngout
 
 trap "destroy" SIGINT SIGTERM
 
-lttng enable-channel -k chan1 --subbuf-size=8M
-lttng enable-event -s $SESSION_NAME -k sched_switch,block_rq_complete,block_rq_issue,block_bio_remap,block_bio_backmerge,netif_receive_skb,net_dev_xmit,sched_process_fork,sched_process_exec,lttng_statedump_process_state,lttng_statedump_file_descriptor,lttng_statedump_block_device,writeback_pages_written,mm_vmscan_wakeup_kswapd,mm_page_free,mm_page_alloc,block_dirty_buffer,irq_handler_entry,irq_handler_exit,softirq_entry,softirq_exit,softirq_raise -c chan1 >/dev/null
-[[ $? != 0 ]] && exit 2
+lttng enable-channel -k chan1 --subbuf-size=8M >/dev/null
+
+# events that always work
+lttng enable-event -s $SESSION_NAME -k sched_switch,sched_wakeup,sched_waking,block_rq_complete,block_rq_issue,block_bio_remap,block_bio_backmerge,netif_receive_skb,net_dev_xmit,sched_process_fork,sched_process_exec,lttng_statedump_process_state,lttng_statedump_file_descriptor,lttng_statedump_block_device,mm_vmscan_wakeup_kswapd,mm_page_free,mm_page_alloc,block_dirty_buffer,irq_handler_entry,irq_handler_exit,softirq_entry,softirq_exit,softirq_raise,kmem_mm_page_alloc,kmem_mm_page_free -c chan1 >/dev/null
+[[ $? != 0 ]] && echo "Warning: some events were not enabled, some analyses might not be complete"
+
+# events that might fail on specific kernels and that are not mandatory
+lttng enable-event -s $SESSION_NAME -k writeback_pages_written -c chan1 >/dev/null 2>&1
+[[ $? != 0 ]] && echo "Warning: Optional event writeback_pages_written could not be enabled, everything will still work (experimental feature)"
+
 lttng enable-event -s $SESSION_NAME -k -c chan1 --syscall -a >/dev/null
 [[ $? != 0 ]] && exit 2
 # if you want to add Perf counters, do something like that :
This page took 0.023045 seconds and 5 git commands to generate.