Skip to content

Update documentation #101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 18 additions & 19 deletions layer_gpu_support/README_LAYER.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,32 +37,31 @@ Tooling setup steps
### Layer build

Build the Support layer for Android using the provided build script, or using
equivalent manual commands, from the `layer_gpu_support` directory.
equivalent manual commands, from the `layer_gpu_support` directory. For full
instructions see the _Build an Android layer_ and _Build a Linux layer_
sections in the [Build documentation](../docs/building.md).

### Running using the layer

This layer requires you to provide a configuration file that specifies the
overrides to apply. Details of the configuration options in each override
group are document in the Behavior overrides section below.

The [`layer_config.json`](layer_config.json) file in this directory is a
complete template configuration file you can start from. However, note that it
does not enable any overrides by default, so running the layer with this
configuration used "as is" will not do anything useful. Take a copy and
modify it to enable the options you want to try.

For Android you can run this layer with the following command line:
You can perform support experiments by using the Android helper utility found
in the root directory to configure the layer and manage the application. You
must enable the support layer, and provide a configuration file to parameterize
it.

```sh
python3 lgl_android_install.py --layer layer_gpu_support --config <your.json>
```

You can then start your application to observe the impact of the layer
overrides.
The [`layer_config.json`](layer_config.json) file in this directory is a
template configuration file you can start from. It does not enable any
overrides by default, so running the layer using this configuration "as is"
will not do anything useful. Take a copy and modify it to enable the options
you want to try. Details of the configuration options in each override group
are document in the _Behavior overrides_ section below.

When the test has finished, press any key in the terminal to prompt the script
to remove the layer from the device and save the data files to the specified
host paths.
The Android helper utility contains many other options for configuring the
application under test and the capture process. For full instructions see the
[Running on Android documentation](../docs/running_android.md).

## Behavior overrides

Expand All @@ -84,9 +83,9 @@ The configuration file allows control over specific options, as well as
convenience options to force disable or enable all serialization.

* If the `none` option is `true` then no serialization is applied, irrespective
of other settings.
of other settings.
* Else, if the `all` option is `true` then all serialization is applied,
irrespective of other settings.
irrespective of other settings.
* Else, the individual options are applied as specified.

```jsonc
Expand Down
27 changes: 15 additions & 12 deletions layer_gpu_timeline/README_LAYER.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,37 +47,40 @@ Tooling setup steps
* The viewer uses PyGTK, and requires the native GTK3 libraries and PyGTK to be
installed. GTK installation instructions can be found on the official GTK
website: https://www.gtk.org/docs/installations.
* The Python viewer uses Google Protocol Buffers, which can be installed using
the Python 3 `pip` package installer.
* Python dependencies can be installed using the Python 3 `pip` package
manager.

```
python3 -m pip install protobuf
python3 -m pip install protobuf pygobject
```

### Layer build

Build the Timeline layer for Android using the provided build script, or using
equivalent manual commands, from the `layer_gpu_timeline` directory.
equivalent manual commands, from the `layer_gpu_timeline` directory. For full
instructions see the _Build an Android layer_ section in the
[Build documentation](../docs/building.md).

### Layer run

Capture a Timeline capture using the Android helper utility from the root
directory. Run the following script to install the layer and auto-start
the application under test:
You can record a timeline by using the Android helper utility found in the root
directory to configure the layer and manage the capture process. You must
enable the timeline layer, and the base name of the output files that will
contain the final timeline data.

```sh
python3 lgl_android_install.py --layer layer_gpu_timeline --timeline <out> --auto-start
python3 lgl_android_install.py --layer layer_gpu_timeline --timeline <out>
```

When the test has finished, press any key in the terminal to prompt the script
to remove the layer from the device and save the data files to the specified
host paths.

The timeline data files will be saved as `<out>.perfetto` and `<out>.metadata`.
If you want to use different file names for each, you can alternatively specify
a full file path for each file using `--timeline-perfetto` and
`--timeline-metadata`.

The Android helper utility contains many other options for configuring the
application under test and the capture process. For full instructions see the
[Running on Android documentation](../docs/running_android.md).

## Timeline visualization

This project includes an experimental Python viewer which can parse and
Expand Down