Skip to content
Snippets Groups Projects
  1. May 23, 2014
  2. May 12, 2014
    • Mitchel Humpherys's avatar
      lrdp-v2: quiet down roareadiff · 0e7e22cf
      Mitchel Humpherys authored
      If a zillion billion differences are found in the RO area, just print to
      the log once to notify the operator of that fact, instead of printing a
      zillion billion times.
      
      Change-Id: Ie61afe5b8bd2cb207f594b8ee46ebac1af95a08a
      0e7e22cf
    • Mitchel Humpherys's avatar
      lrdp-v2: provide method for flushing outfile · aed440e0
      Mitchel Humpherys authored
      Sometimes it's useful to force a flush of the global outfile. Provide a
      method to do so and use it in the main parser loop.
      
      Change-Id: I18e9a07345c852d498b131b442df5a0c95bbcf98
      aed440e0
    • Mitchel Humpherys's avatar
      lrdp-v2: add progress indicator · 9cebcb69
      Mitchel Humpherys authored
      It can be useful to know which parser is currently running and
      how long each parser takes to run. Add some progress status
      reporting to this end.
      
      Change-Id: Ifc063feb4769fee02f0622d7a2c5ddf176ae00dc
      9cebcb69
    • Mitchel Humpherys's avatar
      lrdp-v2: sanity check rtb step_size · 227f5188
      Mitchel Humpherys authored
      msm_rtb_state.step_size should be either 1 or num_cpus(). If it's
      greater than num_cpus() error out.
      
      Change-Id: Id67c2e767ff78dc52a9facd2e255efc23df616f8
      227f5188
  3. May 05, 2014
    • Mitchel Humpherys's avatar
      lrdp-v2: sort the parsers before running · 27099b29
      Mitchel Humpherys authored
      Currently the registered parsers can be run in basically any order. It
      would be slightly messy to run them in the order the user specified on
      the command line, so just run them alphabetically for now.
      
      This is needed to do regression testing on the LRDP (diff'ing output of
      the same dumps with different LRDP code).
      
      Change-Id: Ib63c9b5fecaf1170df0e9e121980fcd0e4f35623
      27099b29
    • Mitchel Humpherys's avatar
      lrdp-v2: remove spurious print statement · f137325a
      Mitchel Humpherys authored
      A debug print statement snuck through at some point. Remove it.
      
      Change-Id: Ifca4f54c1b65deaa06295be5422bd211be5405b0
      f137325a
    • Laura Abbott's avatar
      linux-ramdump-parser-v2: Set ttbr for LPAE page tables · be6d63c8
      Laura Abbott authored
      To generate proper simulator launching scripts, the TTBR needs
      to be set in the MMU object. This was missing for LPAE page tables.
      Set it.
      
      Change-Id: I236df9db59290e4fe90c1959a9a92b51622c821e
      be6d63c8
    • Laura Abbott's avatar
      linux-ramdump-parser-v2: Catch parsing exceptions · a7d3bcd8
      Laura Abbott authored
      For reasons ranging from mangled dumps to bugs in code, the parser may
      generate exceptions while parsing. Rather than terminate the entire
      script, handle exceptions in a more graceful fashion.
      
      Change-Id: I883ee9c0910802b00c797380af5b21e00990dce8
      a7d3bcd8
    • Laura Abbott's avatar
      linux-ramdump-parser-v2: Update t32 script for arm64 · 34cd335d
      Laura Abbott authored
      arm64 needs different parameters to read ramdumps. Update the script.
      
      Change-Id: I33a79d5f98a0fdc271fa769ccd40aad495c677af
      34cd335d
  4. Apr 24, 2014
  5. Apr 23, 2014
    • Mitchel Humpherys's avatar
      lrdp-v2: improve handling of unsupported python versions · 76fe732d
      Mitchel Humpherys authored
      We don't support python3 at all and python2.6 can only be used if the
      user installs an extra package (OrderedDict [1]). Ask for python2
      explicitly in the shebang line to resolve the python3 issues and print
      some instructions to the user regarding python2.6 when that is used.
      
      If the user insists on using python2.6, provide a command line
      switch (--force-26) to skip the version check. To reduce clutter, don't
      document this switch in the --help text but inform the user about its
      existence when we error out due to the python2.6 check.
      
      In order to even print an error message in python3 we have to first
      ensure that our code is valid in python3, otherwise the interpreter
      fails to even start executing our code (so we can't print any
      messages). Use 2to3 to patch up some print statements, etc. Also fix
      inconsistent whitespace, which is a syntax error on python3.
      
      [1] https://pypi.python.org/pypi/ordereddict
      
      Change-Id: Ie2c0a200e60ec90bf6cf49789f2cc75f181fa94b
      76fe732d
    • Mitchel Humpherys's avatar
      lrdp-v2: vmalloc: use new ListWalker constructor · 540345e9
      Mitchel Humpherys authored
      ListWalker.__init__ was recently changed to remove some unneeded
      arguments. The vmalloc parser was also updated at roughly the same time
      with a new usage of the ListWalker class and was using the old
      constructor. Update it.
      
      Change-Id: Ia47c22511aab7207b65813d25c9f97d65c24e2db
      540345e9
    • Mitchel Humpherys's avatar
      lrdp-v2: linux_list.py: make the `extra' argument of `walk' optional · e2f87e11
      Mitchel Humpherys authored
      It's not always useful to pass extra data to the list walker function.
      For example, if the list walker function is a class method, state can be
      passed around by simply modifying class instance variables. Update
      `ListWalker.walk' to accept extra arguments optionally, not require
      them.
      
      Change-Id: I433f1e34db5c143c838f0eb2ed7f58203712ccb3
      e2f87e11
  6. Apr 22, 2014
    • Mitchel Humpherys's avatar
      lrdp-v2: README: document Python 2.7 requirement · 99a26d43
      Mitchel Humpherys authored
      The parser now requires Python 2.7 so that 2.7-specific features can be
      leveraged. Update the README to reflect this.
      
      Change-Id: I7e1ba9f99f077c7f48ed7b44ab24f56f0f18c3ea
      99a26d43
    • Mitchel Humpherys's avatar
      lrdp-v2: add missing argument to cfs_node_func · 72bdc160
      Mitchel Humpherys authored
      [29d3f2ed: "lrdp-v2: refactor Iommu domain parsing code"] introduced
      an extra argument for rb_tree `walker' functions, but didn't update the
      runqueue rb_tree user, so the ramdump parser currently fails to print
      the runqueue state. Fix this.
      
      For certain dumps, before this change we would see the following
      backtrace:
      
          Traceback (most recent call last):
            File "ramparse.py", line 266, in <module>
              p.cls(dump).parse()
            File "parsers/runqueue.py", line 196, in parse
              self.print_cfs_state(cfs_rq_addr)
            File "parsers/runqueue.py", line 101, in print_cfs_state
              rb_walker.walk(tasks_timeline_addr, self.cfs_node_func)
            File "rb_tree.py", line 54, in walk
              self._walk(node, func, [], extra)
            File "rb_tree.py", line 39, in _walk
              self._walk(left_node, func, seen, extra)
            File "rb_tree.py", line 39, in _walk
              self._walk(left_node, func, seen, extra)
            File "rb_tree.py", line 41, in _walk
              func(node, extra)
          TypeError: cfs_node_func() takes exactly 2 arguments (3 given)
      
      Change-Id: Ic19ec42d6cfbe87b6e0a0e99c6adf7c41e5b35e9
      72bdc160
  7. Apr 21, 2014
  8. Apr 16, 2014
    • Mitchel Humpherys's avatar
      lrdp-v2: define equivalency for Register objects · 308f4fdc
      Mitchel Humpherys authored
      Register objects are `equal' if they have the same fields and the values
      of all of those fields are equal. Overload Register.__eq__ to reflect
      this.
      
      Change-Id: I680e869470b20d6dc88d4bd78da9f002980aea4f
      308f4fdc
    • Mitchel Humpherys's avatar
      lrdp-v2: register.py: add doctest for single-bit fields · 2acca144
      Mitchel Humpherys authored
      The Register class supports single-bit field definitions. Add a doctest
      for example purposes and regression testing.
      
      Change-Id: Ib04762aca8cb00256e16c29ac2ab71d47d0c06da
      2acca144
    • Mitchel Humpherys's avatar
      lrdp-v2: register.py: add support for setting the register value · a2510954
      Mitchel Humpherys authored
      The Register class currently can't handle setting the `value'
      attribute. Fix this. Also add a `zero' convenience method for zeroing
      out a register.
      
      After adding the following doctest:
      
          >>> abc.value = 0
          >>> abc.value
          0
      
      but before fixing __setattr__, I get:
      
          **********************************************************************
          File "register.py", line 42, in __main__.Register
          Failed example:
              abc.value = 0
          Exception raised:
              Traceback (most recent call last):
                File "/usr/lib/python2.7/doctest.py", line 1289, in __run
                  compileflags, 1) in test.globs
                File "<doctest __main__.Register[10]>", line 1, in <module>
                  abc.value = 0
                File "register.py", line 106, in __setattr__
                  raise AttributeError
              AttributeError
          **********************************************************************
          File "register.py", line 43, in __main__.Register
          Failed example:
              abc.value
          Expected:
              0
          Got:
              49
          **********************************************************************
          1 items had failures:
             2 of  20 in __main__.Register
          ***Test Failed*** 2 failures.
      
      After the fix in __setattr__, all tests pass successfully.
      
      Change-Id: I6d39261b139aae0def58f38a4291baad651b10e3
      a2510954
    • Mitchel Humpherys's avatar
      lrdp-v2: refactor dmesg extraction code · 779e720e
      Mitchel Humpherys authored
      It can be useful to extract the dmesg from contexts other than the
      --dmesg parser. Refactor the code into a top-level "library" module and
      hook the --dmesg parser into that.
      
      Change-Id: I935c05a081b1096d67343f5ce8617febb674b2e0
      779e720e
    • Mitchel Humpherys's avatar
      lrdp-v2: add hexdump functions · 97cff249
      Mitchel Humpherys authored
      It's useful to be able to dump regions of memory a la `xxd'. Add some
      machinery to parser_util and RamDump to do this.
      
      Example:
      
          $ ramparse.py -a . -o parsed --shell
          >>> dump.hexdump(0, 100, virtual=False)
          00000000: fffe ffde 0200 0000 ffff b7bf adf5 a5ff  ................
          00000010: e7bf edfe c6fe edf6 fefa fffe befa fefe  ................
          00000020: bfbe ffef aebd a5ef ffff 7f7e fefe 5afb  ...........~..Z.
          00000030: 1b00 2000 3300 4300 1c00 2100 3400 4800  .. .3.C...!.4.H.
          00000040: ffff ff7f fafe ffdb effd a5af adf5 a5bf  ................
          00000050: 4444 4444 4444 4444 4444 4444 4444 4444  DDDDDDDDDDDDDDDD
          00000060: 5fff ffff                                _...
          >>> dump.hexdump(0xc0000000, 100, virtual=True)
          c0000000: fffe ffde 0200 0000 ffff b7bf adf5 a5ff  ................
          c0000010: e7bf edfe c6fe edf6 fefa fffe befa fefe  ................
          c0000020: bfbe ffef aebd a5ef ffff 7f7e fefe 5afb  ...........~..Z.
          c0000030: 1b00 2000 3300 4300 1c00 2100 3400 4800  .. .3.C...!.4.H.
          c0000040: ffff ff7f fafe ffdb effd a5af adf5 a5bf  ................
          c0000050: 4444 4444 4444 4444 4444 4444 4444 4444  DDDDDDDDDDDDDDDD
          c0000060: 5fff ffff                                _...
          >>> dump.hexdump(dump.addr_lookup('linux_banner'), 144, virtual=True)
          c0b0006a: 4c69 6e75 7820 7665 7273 696f 6e20 332e  Linux version 3.
          c0b0007a: 3130 2e32 382d 6765 3232 3362 6632 3830  10.28-ge223bf280
          c0b0008a: 662d 6469 7274 7920 286d 6974 6368 656c  f-dirty (mitchel
          c0b0009a: 6840 6d69 7463 6865 6c68 2d6c 696e 7578  h@mitchelh-linux
          c0b000aa: 2920 2867 6363 2076 6572 7369 6f6e 2034  ) (gcc version 4
          c0b000ba: 2e37 2028 4743 4329 2029 2023 3720 534d  .7 (GCC) ) #7 SM
          c0b000ca: 5020 5052 4545 4d50 5420 5475 6520 4170  P PREEMPT Tue Ap
          c0b000da: 7220 3820 3134 3a32 303a 3132 2050 4454  r 8 14:20:12 PDT
          c0b000ea: 2032 3031 340a 007c 2f2d 5c00 0000 0000   2014..|/-\.....
      
      Change-Id: Iecaf80f72845f052085a60eadedd2bb24743224c
      97cff249
    • Mitchel Humpherys's avatar
      lrdp-v2: refactor Armv7LPAEMMU code · 4f8207f7
      Mitchel Humpherys authored
      The LPAE MMU code can be re-used for other modules that need page table
      parsing (like the LPAE IOMMU page tables). Refactor the code a bit so
      that it can be easily re-used later.
      
      Change-Id: I0deb80a69f2fca83c3ddcc78867fa2e5f5d18bb2
      4f8207f7
    • Mitchel Humpherys's avatar
      lrdp-v2: refactor Iommu domain parsing code · 29d3f2ed
      Mitchel Humpherys authored
      The Iommu domain parsing code is common across different Iommu page
      table types (normal vs LPAE). Pull this code out so that it can be
      easily re-used later when LPAE page table support is added.
      
      Change-Id: Ifc39c12428a9c090f8197d997ddd293e0ae1f0b1
      29d3f2ed
    • Mitchel Humpherys's avatar
      lrdp-v2: set up register.py for doctest · 87538b00
      Mitchel Humpherys authored
      register.py is almost ready to handle doctest testing. Fix up one typo
      and add the necessary call in if __name__ == "__main__".
      
      Change-Id: I0a79060bb3bb58e807e7699ec0c21ef0eddb062d
      87538b00
    • Mitchel Humpherys's avatar
      lrdp-v2: register: handle None values more gracefully · b69a4c8a
      Mitchel Humpherys authored
      If a Register is created with a None value, it currently blows up. Fix
      this.
      
      Change-Id: Ic652620e367c64e0a8444ef4b3e5ea7d77edcd82
      b69a4c8a
    • Mitchel Humpherys's avatar
      lrdp-v2: add missing `self' reference to Armv7LPAEMMU · 1bbe85f2
      Mitchel Humpherys authored
      do_fl_sl_level_lookup is a class method, so it needs to be called on a
      class object. Add some missing `self' class objects.
      
      Change-Id: I8b9932ec2bd2eb7c2296355afff4783612171c7d
      1bbe85f2
    • Mitchel Humpherys's avatar
      lrdp-v2: Add docstring to MMU.virt_to_phys · 75b79aa7
      Mitchel Humpherys authored
      MMU.virt_to_phys currently lacks a docstring. They're useful, so add
      one.
      
      Change-Id: I95b0a7a8f97912f178157eb4b68c453585e547bd
      75b79aa7
Loading