LISA (Linux Integrated/Interactive System Analysis)

repository·main·Indexed 42 days ago

https://github.com/arm-software/lisa

A toolkit for regression testing and interactive analysis of Linux kernel behavior, with a focus on the scheduler, power management, and thermal frameworks. It includes tools like lisa-wltest-series for automating kernel compilation and testing on remote Android targets, as well as support for custom rustc target JSON definitions via the lisakmod package.

Tokens
124K
Snippets
307
Records
540
Agent score
51%

What's inside LISA

  1. What is Workload Automation (WA)?

    main

    Workload Automation (WA) is a framework designed for executing workloads and collecting measurements on Android and Linux devices. It is primarily a developer tool to facilitate data-driven development by providing repeatable measurement collection.

    Key Features:

    • Workload Support: Automation for nearly 40 workloads.
    • Instrumentation: Supports common instrumentation like ftrace and hwmon.
    • Extensibility: Highly extensible via a plug-in architecture. Users can write new plug-ins to support new device types, workloads, instruments, or output processing.
  2. Overview of Workload Automation (WA)

    main

    Workload Automation (WA) is a framework designed for executing workloads and collecting measurements on Android and Linux devices. It is primarily used as a developer tool to facilitate data-driven development by providing repeatable methods for collecting device measurements.

    Key features include:

    • Automation for nearly 40 workloads.
    • Support for common instrumentation such as ftrace and hwmon.
    • Support for various output formats.
    • High extensibility via a plugin system, allowing users to support new device types, workloads, instruments, or output processing methods.
  3. Overview of Exekall test runner

    main
    Exekall is the test runner for the LISA project. It is designed to run sets of expressions discovered from Python sources, which enables the creation of highly modular test suites. For detailed installation and setup guides, refer to the project's GitLab repository.
  4. Overview of the LISA toolkit

    main

    LISA (Linux Integrated/Interactive System Analysis) is a toolkit designed for regression testing and interactive analysis of Linux kernel behavior. It is primarily used by kernel developers to measure the impact of modifications in core areas such as the scheduler (e.g., EAS), power management, and thermal frameworks.

    Core Model

    LISA operates on a host/target model:

    • Host: The machine where LISA runs.
    • Target: The Linux kernel-based system being analyzed (e.g., Android, GNU/Linux, or busybox systems).

    LISA uses the devlib toolkit to interact with the target via SSH, ADB, or telnet.

    Key Capabilities

    • Workload Description: Describe and run workloads on targets (e.g., using rt-app).
    • Trace Collection: Collect trace files from the target OS, such as systrace and ftrace traces.
    • Analysis: Parse and analyze collected traces to examine detailed target behavior during workload execution.

    Note: Some features, like ftrace collection, require specific target kernel configurations (e.g., CONFIG_DYNAMIC_FTRACE).

  5. Overview of devlib capabilities

    main

    The devlib library provides a standardized interface for interacting with remote targets, such as development boards and mobile devices. It is designed to facilitate:

    • Target Interaction: Controlling and communicating with remote hardware.
    • Measurement Collection: Gathering various metrics and data from targets.
    • Trace Collection: Capturing traces and logs from remote devices.
  6. Overview of Bisector

    main

    Bisector is a tool designed to be compatible with git bisect run. It is used to automate test iterations by defining a sequence of steps (such as flashing a board, rebooting, or running test commands) and repeating them.

    Key features include:

    • Step Automation: Define multiple steps per iteration.
    • Error Handling: Implements logic to retry, abort, or mark steps as good/bad based on the step type.
    • Reliability: Designed for long-running sessions with protection against unexpected interruptions and flaky commands.
    • Machine-Readable Reporting: bisector run generates reports that can be inspected via bisector report.
    • Git Compatibility: Both bisector run and bisector report can function as git bisect run-compliant scripts.
  7. Explore available WA3 Plugins

    main

    WA3 (Workload Automation 3) provides several categories of extensions called Plugins. These plugins allow you to extend the automation framework with specific functionalities. The available plugins are organized into the following categories:

    • Workloads: Specific tasks or benchmarks to be executed (e.g., Andebench).
    • Instruments: Tools used for measurement or monitoring.
    • Energy Instrument Backends: Specific hardware or software backends for energy measurement instruments.
    • Output Processors: Components that handle and process the data generated by workloads or instruments.
    • Targets: Definitions for the hardware or software environments being automated.
  8. Prerequisites for Workload Automation

    main

    Operating System

    WA runs on native Linux (tested on Ubuntu). It supports 32-bit and 64-bit OS. While it may run on VMs or Cygwin, these are not officially supported. WA does not run on Windows.

    Python

    WA supports Python 3.5+. If your system defaults to Python 2, use python3 and pip3 commands.

    Python Dependencies

    If using pip, dependencies are handled automatically. However, some packages require Python development headers. On Ubuntu, install them via:

    sudo apt-get install python-dev

    Mandatory Python Packages

    If installing manually, the following libraries are required:

    • pexpect, docutils, pySerial, pyYAML, python-dateutil, louie, pandas, devlib, wrapt, requests, colorama, future.
  9. What is exekall and how does it work?

    main

    exekall is a Python-based test runner that discovers expressions to execute by scanning Python source code for PEP 484 type annotations (parameter and return value annotations).

    At its core, exekall uses an expression engine that builds a graph of calls. Each node in the graph represents an operator (a Python callable) with named parameters that point to other nodes. This allows for complex, automated sequences of function calls based on the structure of your code.

  10. What is LISA and how does it work?

    main

    LISA (Linux Integrated System Analysis) is a toolkit designed for interactive analysis and automated regression testing of Linux kernel behavior. It is primarily used by kernel developers to measure the impact of modifications in core areas like the scheduler (e.g., EAS), power management, and thermal frameworks, though it is generic enough for other purposes.

    The Host/Target Model

    LISA operates using a host/target architecture:

    • Host: The machine where LISA itself is running.
    • Target: The system being analyzed, which must be a Linux kernel-based system (e.g., Android, GNU/Linux, or busybox-style systems).
    • Interaction: LISA interacts with the target via the devlib package using SSH or ADB.

    Key Capabilities

    • Workload Management: Describe and run workloads on target systems (notably using rt-app).
    • Trace Collection & Analysis: Collect trace files (such as ftrace traces) from the target OS, parse them, and analyze them to examine detailed target behavior during workload execution.
  11. Overview of Workload Automation plugin types

    main

    Workload Automation (WA) provides several plugin points for extending functionality. When developing for WA, you should choose the appropriate plugin type based on your goal:

    • Workloads: Tasks executed and measured on a device (e.g., benchmarks, use cases).
    • Targets: Interfaces to physical devices (development boards, smartphones). Each device model typically requires its own interface class.
    • Instruments: Tools for collecting additional data (e.g., system traces) during workload execution. They can hook into any stage of execution and are not workload-specific.
    • Output Processors: Used to format execution results. They can run after each iteration or at the end of a run after all results are collected.

    To create a plugin, subclass the appropriate base class and place your .py file in the plugins subdirectory under ~/.workload_automation (or the equivalent configured directory).