Add metadata am: ae63082056 am: 0cdeec25b1
am: e14a5f72b3

Change-Id: Ic49d389c5bdafe8b9020521fc49896168b18d6cd
diff --git a/tests/test_baretrace.py b/tests/test_baretrace.py
index 257754d..f1547c3 100644
--- a/tests/test_baretrace.py
+++ b/tests/test_baretrace.py
@@ -56,7 +56,7 @@
         trace.add_parsed_event("pmu_counter", self.dfr[0])
         trace.add_parsed_event("load_event", self.dfr[1])
 
-        self.assertEquals(trace.get_duration(), self.dfr[1].index[-1])
+        self.assertEquals(trace.get_duration(), self.dfr[1].index[-1] - self.dfr[0].index[0])
 
     def test_bare_trace_get_duration_normalized(self):
         """BareTrace.get_duration() works if the trace has been normalized"""
diff --git a/tests/test_caching.py b/tests/test_caching.py
index 9fcd33a..881f9ba 100644
--- a/tests/test_caching.py
+++ b/tests/test_caching.py
@@ -200,14 +200,15 @@
         trace_dir = os.path.dirname(trace_path)
         trace_file = os.path.basename(trace_path)
         cache_dir = '.' + trace_file + '.cache'
-        self.assertEquals(len(os.listdir(cache_dir)), 22)
+        number_of_trace_categories = 29
+        self.assertEquals(len(os.listdir(cache_dir)), number_of_trace_categories)
 
         os.remove(os.path.join(cache_dir, 'SchedWakeup.csv'))
-        self.assertEquals(len(os.listdir(cache_dir)), 21)
+        self.assertEquals(len(os.listdir(cache_dir)), number_of_trace_categories - 1)
 
         # Generate trace again, should regenerate only the missing item
         trace = trappy.FTrace()
-        self.assertEquals(len(os.listdir(cache_dir)), 22)
+        self.assertEquals(len(os.listdir(cache_dir)), number_of_trace_categories)
         for c in trace.trace_classes:
             if isinstance(c, trace.class_definitions['sched_wakeup']):
                 self.assertEquals(c.cached, False)
diff --git a/tests/test_common_clk.py b/tests/test_common_clk.py
new file mode 100644
index 0000000..3d4cfca
--- /dev/null
+++ b/tests/test_common_clk.py
@@ -0,0 +1,50 @@
+#    Copyright 2017 ARM Limited, Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+import os
+import sys
+
+import utils_tests
+import trappy
+
+sys.path.append(os.path.join(utils_tests.TESTS_DIRECTORY, "..", "trappy"))
+
+class TestCommonClk(utils_tests.SetupDirectory):
+    def __init__(self, *args, **kwargs):
+        super(TestCommonClk, self).__init__(
+             [("trace_common_clk.txt", "trace_common_clk.txt"),],
+             *args,
+             **kwargs)
+
+    def test_common_clk_set_rate_can_be_parsed(self):
+        """TestCommonClk: test that clock__set_rate events can be parsed"""
+        trace = trappy.FTrace("trace_common_clk.txt", events=['clock_set_rate'])
+        df = trace.clock_set_rate.data_frame
+        self.assertSetEqual(set(df.columns),
+                            set(["__comm", "__cpu", "__line", "__pid", "__tgid", "cpu_id", "clk_name", "rate"]))
+
+    def test_common_clk_enable_can_be_parsed(self):
+        """TestCommonClk: test that clock_enable events can be parsed"""
+        trace = trappy.FTrace("trace_common_clk.txt", events=['clock_enable'])
+        df = trace.clock_enable.data_frame
+        self.assertSetEqual(set(df.columns),
+                            set(["__comm", "__cpu", "__line", "__pid", "__tgid", "cpu_id", "clk_name", "state"]))
+
+    def test_common_clk_disable_can_be_parsed(self):
+        """TestCommonClk: test that clock_disable events can be parsed"""
+        trace = trappy.FTrace("trace_common_clk.txt", events=['clock_disable'])
+        df = trace.clock_disable.data_frame
+        self.assertSetEqual(set(df.columns),
+                            set(["__comm", "__cpu", "__line", "__pid", "__tgid", "cpu_id", "clk_name", "state"]))
diff --git a/tests/test_filesystem.py b/tests/test_filesystem.py
new file mode 100644
index 0000000..212b2f5
--- /dev/null
+++ b/tests/test_filesystem.py
@@ -0,0 +1,57 @@
+#    Copyright 2017 ARM Limited, Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+import os
+import sys
+
+import utils_tests
+import trappy
+
+sys.path.append(os.path.join(utils_tests.TESTS_DIRECTORY, "..", "trappy"))
+
+class TestFilesystem(utils_tests.SetupDirectory):
+    def __init__(self, *args, **kwargs):
+        super(TestFilesystem, self).__init__(
+             [("trace_filesystem.txt", "trace_filesystem.txt"),],
+             *args,
+             **kwargs)
+
+    def test_filesystem_ext_da_write_begin_can_be_parsed(self):
+        """TestFilesystem: test that ext4_da_write_begin events can be parsed"""
+        trace = trappy.FTrace("trace_filesystem.txt", events=['ext4_da_write_begin'])
+        df = trace.ext4_da_write_begin.data_frame
+        self.assertSetEqual(set(df.columns),
+                            set(["__comm", "__cpu", "__line", "__pid", "__tgid", "dev", "inode", "pos", "len", "flags"]))
+
+    def test_filesystem_ext_da_write_end_can_be_parsed(self):
+        """TestFilesystem: test that ext4_da_write_end events can be parsed"""
+        trace = trappy.FTrace("trace_filesystem.txt", events=['ext4_da_write_end'])
+        df = trace.ext4_da_write_end.data_frame
+        self.assertSetEqual(set(df.columns),
+                            set(["__comm", "__cpu", "__line", "__pid", "__tgid", "dev", "inode", "pos", "len", "copied"]))
+
+    def test_filesystem_ext_sync_file_enter_can_be_parsed(self):
+        """TestFilesystem: test that ext4_sync_file_enter events can be parsed"""
+        trace = trappy.FTrace("trace_filesystem.txt", events=['ext4_sync_file_enter'])
+        df = trace.ext4_sync_file_enter.data_frame
+        self.assertSetEqual(set(df.columns),
+                            set(["__comm", "__cpu", "__line", "__pid", "__tgid", "dev", "inode", "parent", "datasync"]))
+
+    def test_filesystem_ext_sync_file_exit_can_be_parsed(self):
+        """TestFilesystem: test that ext4_sync_file_exit events can be parsed"""
+        trace = trappy.FTrace("trace_filesystem.txt", events=['ext4_sync_file_exit'])
+        df = trace.ext4_sync_file_exit.data_frame
+        self.assertSetEqual(set(df.columns),
+                            set(["__comm", "__cpu", "__line", "__pid", "__tgid", "dev", "inode", "ret"]))
diff --git a/tests/test_ftrace.py b/tests/test_ftrace.py
index e6f6319..ea702e5 100644
--- a/tests/test_ftrace.py
+++ b/tests/test_ftrace.py
@@ -170,6 +170,22 @@
 
         self.assertEqual(trace.get_duration(), duration)
 
+    def test_ftrace_duration_window(self):
+        """Test that duration is correct with time window (normalize_time=True)"""
+        trace = trappy.FTrace(normalize_time=True, window=[1, 5])
+
+        duration = trace.thermal_governor.data_frame.index[-1] - trace.thermal.data_frame.index[0]
+
+        self.assertEqual(trace.get_duration(), duration)
+
+    def test_ftrace_duration_window_not_normalized(self):
+        """Test that duration is correct with time window (normalize_time=False)"""
+        trace = trappy.FTrace(normalize_time=False, window=[1, 5])
+
+        duration = trace.thermal_governor.data_frame.index[-1] - trace.thermal.data_frame.index[0]
+
+        self.assertEqual(trace.get_duration(), duration)
+
     def test_ftrace_duration_not_normalized(self):
         """Test get_duration: normalize_time=True"""
 
@@ -351,6 +367,26 @@
         self.assertEquals(trace.thermal.data_frame.iloc[0]["temp"], 68989)
         self.assertEquals(trace.thermal.data_frame.iloc[-1]["temp"], 69530)
 
+    def test_parse_tracing_mark_write_events(self):
+        """Check that tracing_mark_write events are parsed without errors"""
+
+        in_data = """     sh-1379  [002]   353.397813: print:                tracing_mark_write: TRACE_MARKER_START
+     shutils-1381  [001]   353.680439: print:                tracing_mark_write: cpu_frequency:        state=450000 cpu_id=5"""
+
+        with open("trace.txt", "w") as fout:
+            fout.write(in_data)
+
+        try:
+            trace = trappy.FTrace()
+        except TypeError as e:
+            self.fail("tracing_mark_write parsing failed with {} exception"\
+                      .format(e.message))
+        # The second event is recognised as a cpu_frequency event and therefore
+        # put under trace.cpu_frequency
+        self.assertEquals(trace.tracing_mark_write.data_frame.iloc[-1]["string"],
+                          "TRACE_MARKER_START")
+        self.assertEquals(len(trace.tracing_mark_write.data_frame), 1)
+
 
 @unittest.skipUnless(utils_tests.trace_cmd_installed(),
                      "trace-cmd not installed")
diff --git a/tests/test_systrace.py b/tests/test_systrace.py
index 667bf2c..5f8899b 100644
--- a/tests/test_systrace.py
+++ b/tests/test_systrace.py
@@ -93,6 +93,16 @@
         self.assertEquals(dfr['__line'].iloc[1], 6)
         self.assertEquals(dfr['__line'].iloc[-1], 2505)
 
+    def test_parse_tracing_mark_write_events(self):
+        """Check that tracing_mark_write events are parsed without errors"""
+        events = ['tracing_mark_write']
+        try:
+            trace = trappy.SysTrace("trace.html", events=events)
+        except TypeError as e:
+            self.fail("tracing_mark_write parsing failed with {} exception"\
+                      .format(e.message))
+
+
 class TestLegacySystrace(utils_tests.SetupDirectory):
 
     def __init__(self, *args, **kwargs):
diff --git a/tests/trace_common_clk.txt b/tests/trace_common_clk.txt
new file mode 100644
index 0000000..90b9e99
--- /dev/null
+++ b/tests/trace_common_clk.txt
@@ -0,0 +1,8 @@
+  VideoDecMsgThr-32342 [007] 85636.208531: clock_set_rate:       video_subcore0_clk_src state=200000000 cpu_id=7
+  VideoDecMsgThr-32342 [007] 85636.208637: clock_set_rate:       mmss_video_subcore1_clk state=200000000 cpu_id=7
+  VideoDecMsgThr-32342 [007] 85636.208640: clock_set_rate:       video_subcore1_clk_src state=200000000 cpu_id=7
+          writer-14965 [001] 85636.216529: clock_enable:         blsp2_qup1_i2c_apps_clk_src state=1 cpu_id=1
+          writer-14965 [001] 85636.216531: clock_enable:         gcc_blsp2_qup1_i2c_apps_clk state=1 cpu_id=1
+          writer-14965 [000] 85636.216771: clock_disable:        gcc_blsp2_qup1_i2c_apps_clk state=0 cpu_id=0
+          writer-14965 [000] 85636.216774: clock_disable:        blsp2_qup1_i2c_apps_clk_src state=0 cpu_id=0
+          writer-14965 [000] 85636.216801: clock_enable:         blsp2_qup1_i2c_apps_clk_src state=1 cpu_id=0
diff --git a/tests/trace_filesystem.txt b/tests/trace_filesystem.txt
new file mode 100644
index 0000000..b67e47e
--- /dev/null
+++ b/tests/trace_filesystem.txt
@@ -0,0 +1,44 @@
+           <...>-1297  [001]  3843.734440: ext4_da_write_end:    dev 8,13 ino 5898483 pos 0 len 4096 copied 4096
+           <...>-1297  [001]  3843.734450: ext4_da_write_begin:  dev 8,13 ino 5898483 pos 4096 len 4096 flags 0
+           <...>-1297  [001]  3843.734459: ext4_da_write_end:    dev 8,13 ino 5898483 pos 4096 len 4096 copied 4096
+           <...>-1297  [001]  3843.737430: ext4_da_write_begin:  dev 8,13 ino 5898483 pos 8192 len 2625 flags 0
+           <...>-1297  [001]  3843.737466: ext4_da_write_end:    dev 8,13 ino 5898483 pos 8192 len 2625 copied 2625
+           <...>-1297  [001]  3843.737514: ext4_sync_file_enter: dev 8,13 ino 5898483 parent 5898244 datasync 0 
+           <...>-1297  [007]  3843.744284: ext4_sync_file_exit:  dev 8,13 ino 5898483 ret 0
+           <...>-13777 [007]  3844.034373: ext4_da_write_begin:  dev 8,13 ino 3540268 pos 0 len 512 flags 0
+           <...>-13777 [007]  3844.034400: ext4_da_write_end:    dev 8,13 ino 3540268 pos 0 len 512 copied 512
+           <...>-13777 [007]  3844.034410: ext4_da_write_begin:  dev 8,13 ino 3540268 pos 512 len 4 flags 0
+           <...>-13777 [007]  3844.034412: ext4_da_write_end:    dev 8,13 ino 3540268 pos 512 len 4 copied 4
+           <...>-13777 [007]  3844.034415: ext4_da_write_begin:  dev 8,13 ino 3540268 pos 516 len 3580 flags 0
+           <...>-13777 [007]  3844.034417: ext4_da_write_end:    dev 8,13 ino 3540268 pos 516 len 3580 copied 3580
+           <...>-13777 [007]  3844.034419: ext4_da_write_begin:  dev 8,13 ino 3540268 pos 4096 len 516 flags 0
+           <...>-13777 [007]  3844.034425: ext4_da_write_end:    dev 8,13 ino 3540268 pos 4096 len 516 copied 516
+           <...>-13777 [007]  3844.034429: ext4_da_write_begin:  dev 8,13 ino 3540268 pos 4612 len 4 flags 0
+           <...>-13777 [007]  3844.034430: ext4_da_write_end:    dev 8,13 ino 3540268 pos 4612 len 4 copied 4
+           <...>-13777 [007]  3844.034439: ext4_da_write_begin:  dev 8,13 ino 3540268 pos 4616 len 4 flags 0
+           <...>-13777 [007]  3844.034440: ext4_da_write_end:    dev 8,13 ino 3540268 pos 4616 len 4 copied 4
+           <...>-13777 [007]  3844.034443: ext4_da_write_begin:  dev 8,13 ino 3540268 pos 4620 len 3572 flags 0
+           <...>-13777 [007]  3844.034445: ext4_da_write_end:    dev 8,13 ino 3540268 pos 4620 len 3572 copied 3572
+           <...>-13777 [007]  3844.034446: ext4_da_write_begin:  dev 8,13 ino 3540268 pos 8192 len 524 flags 0
+           <...>-13777 [007]  3844.034451: ext4_da_write_end:    dev 8,13 ino 3540268 pos 8192 len 524 copied 524
+           <...>-13777 [007]  3844.034455: ext4_da_write_begin:  dev 8,13 ino 3540268 pos 8716 len 4 flags 0
+           <...>-13777 [007]  3844.034456: ext4_da_write_end:    dev 8,13 ino 3540268 pos 8716 len 4 copied 4
+           <...>-13777 [007]  3844.034539: ext4_da_write_begin:  dev 8,13 ino 3540268 pos 8720 len 4 flags 0
+           <...>-13777 [007]  3844.034542: ext4_da_write_end:    dev 8,13 ino 3540268 pos 8720 len 4 copied 4
+           <...>-13777 [007]  3844.034548: ext4_da_write_begin:  dev 8,13 ino 3540268 pos 8724 len 3564 flags 0
+           <...>-13777 [007]  3844.034550: ext4_da_write_end:    dev 8,13 ino 3540268 pos 8724 len 3564 copied 3564
+           <...>-13777 [007]  3844.034552: ext4_da_write_begin:  dev 8,13 ino 3540268 pos 12288 len 532 flags 0
+           <...>-13777 [007]  3844.034559: ext4_da_write_end:    dev 8,13 ino 3540268 pos 12288 len 532 copied 532
+           <...>-13777 [007]  3844.034563: ext4_da_write_begin:  dev 8,13 ino 3540268 pos 12820 len 4 flags 0
+           <...>-13777 [007]  3844.034565: ext4_da_write_end:    dev 8,13 ino 3540268 pos 12820 len 4 copied 4
+           <...>-13777 [007]  3844.034572: ext4_sync_file_enter: dev 8,13 ino 3540268 parent 3539203 datasync 1 
+           <...>-13777 [004]  3844.042103: ext4_sync_file_exit:  dev 8,13 ino 3540268 ret 0
+           <...>-13777 [004]  3844.042145: ext4_sync_file_enter: dev 8,13 ino 3539203 parent 3407880 datasync 1 
+           <...>-13777 [004]  3844.042146: ext4_sync_file_exit:  dev 8,13 ino 3539203 ret 0
+           <...>-13777 [004]  3844.042176: ext4_da_write_begin:  dev 8,13 ino 3540268 pos 0 len 12 flags 0
+           <...>-13777 [004]  3844.042181: ext4_da_write_end:    dev 8,13 ino 3540268 pos 0 len 12 copied 12
+           <...>-13777 [004]  3844.042186: ext4_sync_file_enter: dev 8,13 ino 3540268 parent 3539203 datasync 1 
+           <...>-13777 [005]  3844.042781: ext4_sync_file_exit:  dev 8,13 ino 3540268 ret 0
+           <...>-13777 [005]  3844.042801: ext4_da_write_begin:  dev 8,13 ino 3539230 pos 0 len 4096 flags 0
+           <...>-13777 [005]  3844.042805: ext4_da_write_end:    dev 8,13 ino 3539230 pos 0 len 4096 copied 4096
+           <...>-13777 [005]  3844.042809: ext4_da_write_begin:  dev 8,13 ino 3539230 pos 12288 len 4096 flags 0
diff --git a/trappy/bare_trace.py b/trappy/bare_trace.py
index a953a60..c2f4b04 100644
--- a/trappy/bare_trace.py
+++ b/trappy/bare_trace.py
@@ -37,21 +37,20 @@
     def get_duration(self):
         """Returns the largest time value of all classes,
         returns 0 if the data frames of all classes are empty"""
-        durations = []
+        max_durations = []
+        min_durations = []
 
         for trace_class in self.trace_classes:
             try:
-                durations.append(trace_class.data_frame.index[-1])
+                max_durations.append(trace_class.data_frame.index[-1])
+                min_durations.append(trace_class.data_frame.index[0])
             except IndexError:
                 pass
 
-        if len(durations) == 0:
+        if len(min_durations) == 0 or len(max_durations) == 0:
             return 0
 
-        if self.normalized_time:
-            return max(durations)
-        else:
-            return max(durations) - self.basetime
+        return max(max_durations) - min(min_durations)
 
     def get_filters(self, key=""):
         """Returns an array with the available filters.
@@ -141,5 +140,5 @@
             trace_class.create_dataframe()
             trace_class.finalize_object()
 
-    def generate_data_dict(self):
+    def generate_data_dict(self, data_str):
         return None
diff --git a/trappy/common_clk.py b/trappy/common_clk.py
new file mode 100644
index 0000000..7bccb9c
--- /dev/null
+++ b/trappy/common_clk.py
@@ -0,0 +1,58 @@
+#    Copyright 2017 Google, ARM Limited
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+
+"""
+Definitions of common_clk (CONFIG_COMMON_CLK) trace parsers
+registered by the FTrace class
+"""
+
+from trappy.base import Base
+from trappy.dynamic import register_ftrace_parser, register_dynamic_ftrace
+
+class CommonClkBase(Base):
+    #clock traces are of the form "clk_name field0=x field1=y ..."
+    def generate_data_dict(self, data_str):
+        clk_name, fields = data_str.split(' ', 1)
+        ret = super(CommonClkBase, self).generate_data_dict(fields)
+        ret['clk_name'] = clk_name
+        return ret 
+
+class CommonClkEnable(CommonClkBase):
+    """Corresponds to Linux kernel trace event clock_enable"""
+
+    unique_word = "clock_enable:"
+    """The unique word that will be matched in a trace line"""
+
+register_ftrace_parser(CommonClkEnable)
+
+class CommonClkDisable(CommonClkBase):
+    """Corresponds to Linux kernel trace event clock_disable"""
+
+    unique_word = "clock_disable:"
+    """The unique word that will be matched in a trace line"""
+
+register_ftrace_parser(CommonClkDisable)
+
+class CommonClkSetRate(CommonClkBase):
+    """Corresponds to Linux kernel trace event clock_set_rate"""
+
+    unique_word = "clock_set_rate:"
+    """The unique word that will be matched in a trace line"""
+
+    def finalize_object(self):
+        self.data_frame.rename(columns={'state':'rate'}, inplace=True)
+
+register_ftrace_parser(CommonClkSetRate)
diff --git a/trappy/filesystem.py b/trappy/filesystem.py
new file mode 100644
index 0000000..0c4a57d
--- /dev/null
+++ b/trappy/filesystem.py
@@ -0,0 +1,67 @@
+#    Copyright 2017 Google, ARM Limited
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+
+"""
+Definitions of filesystem (ext4) trace parsers
+registered by the FTrace class
+"""
+
+from trappy.base import Base
+from trappy.dynamic import register_ftrace_parser, register_dynamic_ftrace
+
+class FilesystemExt4Base(Base):
+    def generate_data_dict(self, data_str):
+        #filesystem traces are space delimited in the form:
+        #fieldA valueA fieldB valueB ...
+        data = data_str.split(' ')
+        return zip(data[0::2], data[1::2])
+
+    def finalize_object(self):
+        self.data_frame.rename(columns={'ino':'inode'}, inplace=True)
+
+
+class FilesystemExt4DaWriteBegin(FilesystemExt4Base):
+    """Corresponds to Linux kernel trace event ext4_da_write_begin"""
+
+    unique_word = "ext4_da_write_begin:"
+    """The unique word that will be matched in a trace line"""
+
+
+register_ftrace_parser(FilesystemExt4DaWriteBegin)
+
+class FilesystemExt4DaWriteEnd(FilesystemExt4Base):
+    """Corresponds to Linux kernel trace event ext4_da_write_end"""
+
+    unique_word = "ext4_da_write_end:"
+    """The unique word that will be matched in a trace line"""
+
+register_ftrace_parser(FilesystemExt4DaWriteEnd)
+
+class FilesystemExt4SyncFileEnter(FilesystemExt4Base):
+    """Corresponds to Linux kernel trace event ext4_sync_file_enter"""
+
+    unique_word = "ext4_sync_file_enter:"
+    """The unique word that will be matched in a trace line"""
+
+register_ftrace_parser(FilesystemExt4SyncFileEnter)
+
+class FilesystemExt4SyncFileExit(FilesystemExt4Base):
+    """Corresponds to Linux kernel trace event ext4_sync_file_exit"""
+
+    unique_word = "ext4_sync_file_exit:"
+    """The unique word that will be matched in a trace line"""
+
+register_ftrace_parser(FilesystemExt4SyncFileExit)
diff --git a/trappy/ftrace.py b/trappy/ftrace.py
index 3948cb6..ec7b002 100644
--- a/trappy/ftrace.py
+++ b/trappy/ftrace.py
@@ -66,7 +66,7 @@
 
     dynamic_classes = {}
 
-    disable_cache = False
+    disable_cache = True
 
     def _trace_cache_path(self):
         trace_file = self.trace_path
diff --git a/trappy/utils.py b/trappy/utils.py
index 47ef4ab..a06ff1d 100644
--- a/trappy/utils.py
+++ b/trappy/utils.py
@@ -155,7 +155,7 @@
         data['Time'] = data['Time'][1]
         merged_data.append(data)
 
-    df = pd.concat([pr_df, sec_df], keys=['primary', 'secondary']).sort(columns='__line')
+    df = pd.concat([pr_df, sec_df], keys=['primary', 'secondary']).sort_values(by='__line')
     apply_callback(df, df_fn)
     merged_df = pd.DataFrame.from_dict(merged_data)
     merged_df.set_index('Time', inplace=True)