Skip to content

Commit

Permalink
Merge branch 'vara-dev' into f-IterIDE
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianbs96 committed Mar 27, 2024
2 parents 8a31f1e + 982bf9b commit b389720
Show file tree
Hide file tree
Showing 121 changed files with 10,621 additions and 2,334 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
branches: [ vara, vara-dev ]
pull_request:
branches: [ vara, vara-dev ]
merge_group:
branches: [ vara, vara-dev ]

env:
BB_TMP_DIR: $(pwd)/benchbuild/tmp
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Docs CI
on:
pull_request:
branches: [ vara, vara-dev ]
merge_group:
branches: [ vara, vara-dev ]

jobs:
build:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: pre-commit

on:
pull_request:
merge_group:

jobs:
pre-commit:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: reviewdog
on:
pull_request:
branches: [ vara, vara-dev ]
merge_group:
branches: [ vara, vara-dev ]

jobs:
reviewdog:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: '3.11'

- uses: ./.github/actions/dependenciesActions
- name: Create and Publish Release
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ docs/source/.varats.yaml
docs/**/*.inc
.vscode/
.cache/
pre-commit-env
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repos:
rev: 5.11.5
hooks:
- id: isort
args: ['-nis']
args: ['--nis']
- repo: https://github.com/myint/docformatter.git
rev: v1.4
hooks:
Expand Down
5 changes: 5 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@
# modules that require this module before setting the type checking flag.
import scipy.stats # isort:skip

# Matplotlib >=3.8 has a type-checking-flag-guarded import of a symbol that does
# not exist in the shipped version.
import matplotlib.pyplot # isort:skip

# The autodocs typehints plugin does not resolve circular imports caused by type
# annotations, so we have to manually break the circles.
import rich.console # isort:skip
Expand All @@ -95,6 +99,7 @@
import cryptography.exceptions # isort:skip
import click # isort:skip
import git # isort:skip
import github # isort:skip
import urllib3.exceptions # isort:skip

# Some packages use new syntax for type checking that isn't available to us
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ How to set up VaRA/LLVM in CLion
--------------------------------
1. Use ``vara-buildsetup vara -i`` to correctly clone and checkout the VaRa/LLVM repos (cf. :ref:`How to setup VaRA`)

2. Start CLion and from the menu select **File | Open** and point to ``<varats_root>/vara-llvm-project/llvm/CMakeLists.txt``.
2. Start CLion and from the menu select **File | Open** and point to ``<varats_root>/tools_src/vara-llvm-project/llvm/CMakeLists.txt``.
In the dialog that opens, click **Open as Project**.

3. Go to **Settings/Preferences | Build, Execution, Deployment | CMake** to configure the CMake project.
Expand All @@ -20,8 +20,8 @@ How to set up VaRA/LLVM in CLion
-DBUILD_CLAR=OFF
-DBUILD_SHARED_LIBS=ON
-DCMAKE_C_FLAGS_DEBUG=-O2 -g -fno-omit-frame-pointer
-DCMAKE_CXX_FLAGS_DEBUG=-O2 -g -fno-omit-frame-pointer
-DCMAKE_C_FLAGS_DEBUG="-O2 -g -fno-omit-frame-pointer"
-DCMAKE_CXX_FLAGS_DEBUG="-O2 -g -fno-omit-frame-pointer"
-DCMAKE_CXX_STANDARD=17
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-DCMAKE_INSTALL_PREFIX=<varats_root>/tools/VaRA
Expand Down Expand Up @@ -55,8 +55,8 @@ How to set up VaRA/LLVM in CLion
-DBUILD_CLAR=OFF
-DBUILD_SHARED_LIBS=ON
-DCMAKE_C_FLAGS_RELEASE=-O3 -DNDEBUG -march=native -fno-omit-frame-pointer -gmlt
-DCMAKE_CXX_FLAGS_RELEASE=-O3 -DNDEBUG -march=native -fno-omit-frame-pointer -gmlt
-DCMAKE_C_FLAGS_RELEASE="-O3 -DNDEBUG -march=native -fno-omit-frame-pointer -gmlt"
-DCMAKE_CXX_FLAGS_RELEASE="-O3 -DNDEBUG -march=native -fno-omit-frame-pointer -gmlt"
-DCMAKE_CXX_STANDARD=17
-DCMAKE_INSTALL_PREFIX=<varats_root>/tools/VaRA
-DLLVM_ENABLE_ASSERTIONS=OFF
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Performance-Influence Model Trace (``perf_infl_trace``)
=======================================================

VaRA can automatically insert instrumentation markers for measuring the cumulative time that's spent within a region.
8 changes: 5 additions & 3 deletions docs/source/research_tool_docs/vara/instrumentations/usdt.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
USDT Probe Instrumentations (``usdt``)
======================================
USDT Probe Instrumentations (``usdt``/``usdt_raw``)
===================================================

TODO: add docs
Insert USDT probes around regions.
VaRA inserts in the ``usdt`` mode one probe that handles all start/end events,
in ``usdt_raw`` mode it inserts a separate probe for each region start/end is added.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ The different instrumentation options can be found :ref:`here<Instrumentations>`
CXX_FLAGS="$CXX_FLAGS -fvara-feature -fsanitize=vara -fvara-instr=trace_event"
.. note::

By default, regions smaller than 100 instructions are ignored. To manually set the instruction threshold, add ``-vara-instruction-threshold=X`` as a ``C/CXX_FLAG``, where ``X`` defines amount of instructions that need to be contained in a region.


(Recommended) Configure your project to use link-time optimization (LTO) for more precise analysis results.
Without LTO, the analysis can only run within a translation unit, hence, features that are used across different translation units can not be correctly analyzed.

Expand Down
1 change: 1 addition & 0 deletions docs/source/research_tool_docs/vara/using.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,6 @@ To enable this, specify a region detection strategy, enable the tracing code wit
instrumentations/print_instr
instrumentations/clock_instr.rst
instrumentations/trace_event_instr.rst
instrumentations/perf_infl_trace.rst
instrumentations/instr_verify.rst
instrumentations/usdt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ One just needs to extend the case-study file of a project with a yaml document t
.. code-block:: yaml
---
config_type: PlainCommandlineConfiguration
0: '["--foo", "--bar"]'
1: '["--foo"]'
...
Expand Down
1 change: 1 addition & 0 deletions docs/source/vara-ts-api/tools/vara-cs-gui.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ The gui is started by::

The gui provides 3 Strategies to generate case studies:
- Manual revision selection: Select revision from the revision history of a project. Multiple revisions can be selected by holding `ctrl` and ranges by holding `shift`. Revisions which are blocked because of bugs in the compilation of the project are marked blue.

.. figure:: vara-cs-gui-manual.png

- Random Sampling: Sample a number of revisions using a random a Normal or HalfNormal Distribution.
Expand Down
12 changes: 12 additions & 0 deletions icons/breeze/light/vcs-commit.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/icons.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<file>breeze/light/document-save.svg</file>
<file>breeze/light/application-exit.svg</file>
<file>breeze/light/document-open.svg</file>
<file>breeze/light/vcs-commit.svg</file>
<file>operators/and-operator.svg</file>
<file>operators/or-operator.svg</file>
<file>operators/not-operator.svg</file>
Expand Down
2 changes: 1 addition & 1 deletion icons/update-icons.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
script=$(readlink -f "$0")
scriptpath=$(dirname "${script}")

pyrcc5 icons.qrc -o "${scriptpath}"/../varats/gui/icons_rc.py
pyrcc5 icons.qrc -o "${scriptpath}"/../varats/varats/gui/icons_rc.py
7 changes: 4 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
benchbuild>=6.6.4
benchbuild>=6.8
click>=8.1.3
cliffs-delta>=1.0.0
distro>=1.5.0
graphviz>=0.14.2
ijson>=3.1.4
Jinja2>=3.1.2
jupyter>=1.0.0
kaleido>=0.2.1
matplotlib>=3.7.1
matplotlib>=3.8.2
networkx>=3.0
numpy>=1.24.2
packaging>=20.1
Expand All @@ -28,7 +29,7 @@ PyYAML>=6.0
requests>=2.28.2
rich>=12.6
scikit-learn>=1.2.2
seaborn>=0.12.2
seaborn>=0.13.0
tabulate>=0.9
types-PyYAML
types-requests
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
DocType: CaseStudy
Version: 1
...
---
project_name: SynthIPRuntime
stages:
- revisions:
- commit_hash: 793035062810ea3a2d9a10f831cd199fbbb82090
commit_id: 64
config_ids:
- 0
- 1
- 2
- 3
- 4
version: 0
...
---
config_type: PlainCommandlineConfiguration
0: '["-d"]'
1: '["-c"]'
2: '["-c", "-1"]'
3: '["-c", "-2"]'
4: '["-c", "-1", "-2"]'
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
DocType: CaseStudy
Version: 1
...
---
project_name: SynthIPTemplate
stages:
- revisions:
- commit_hash: 793035062810ea3a2d9a10f831cd199fbbb82090
commit_id: 64
config_ids:
- 0
- 1
- 2
- 3
- 4
version: 0
...
---
config_type: PatchConfiguration
0: '["Decompress"]'
1: '["Compress", "no_fastmode", "no_smallmode"]'
2: '["Compress", "fastmode", "no_smallmode"]'
3: '["Compress", "no_fastmode", "smallmode"]'
4: '["Compress", "fastmode", "smallmode"]'
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
DocType: CaseStudy
Version: 1
...
---
project_name: SynthSAContextSensitivity
stages:
- revisions:
- commit_hash: 06eac0edb6886a7e487867c8d5629cb2409b54fd
commit_id: 57
config_ids:
- 0
- 1
version: 0
...
---
config_type: PlainCommandlineConfiguration
0: '["--compress", "--mem", "10", "8"]'
1: '["--compress", "--mem", "300", "8"]'
...
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ stages:
config_ids: [1]
version: 0
---
config_type: PlainCommandlineConfiguration
0: '["--foo", "--bar"]'
1: '["--foo"]'
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
description: Patch that excludes a range of commits (Otherwise includes all)
exclude_revisions:
revision_range:
end: 8ca5cc28e6746eef7340064b5d843631841bf31e
start: 01f9f1f07bef22d4248e8349aba4f0c1f204607e
path: bug.patch
project_name: FeaturePerfCSCollection
shortname: exclude-revision-range
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: Patch that excludes a certain range and individual commits (Otherwise
includes all)
exclude_revisions:
revision_range:
end: 8ca5cc28e6746eef7340064b5d843631841bf31e
start: 01f9f1f07bef22d4248e8349aba4f0c1f204607e
single_revision: 27f17080376e409860405c40744887d81d6b3f34
path: bug.patch
project_name: FeaturePerfCSCollection
shortname: exclude-single-and-revision-range
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
description: Patch that is valid for all commits except a single one
exclude_revisions:
single_revision: 8ca5cc28e6746eef7340064b5d843631841bf31e
path: bug.patch
project_name: FeaturePerfCSCollection
shortname: exclude-single-revision
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
description: Patch valid for a range of commits where a subrange is explicitly excluded
exclude_revisions:
revision_range:
end: a94fb35ca49719028a1c50bdbc2fb82122043f46
start: c051e44a973ee31b3baa571407694467a513ba68
include_revisions:
revision_range:
end: 4300ea495e7f013f68e785fdde5c4ead81297999
start: 01f9f1f07bef22d4248e8349aba4f0c1f204607e
path: bug.patch
project_name: FeaturePerfCSCollection
shortname: include-range-exclude-range
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: Patch valid for a range of commits where a single one is excluded
exclude_revisions:
single_revision: 162db88346b06be20faac6976f1ff9bad986accf
include_revisions:
revision_range:
end: 8ca5cc28e6746eef7340064b5d843631841bf31e
start: 01f9f1f07bef22d4248e8349aba4f0c1f204607e
path: bug.patch
project_name: FeaturePerfCSCollection
shortname: include-range-exclude-single
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
description: Patch that is valid for a range of commits
include_revisions:
revision_range:
end: 8ca5cc28e6746eef7340064b5d843631841bf31e
start: 01f9f1f07bef22d4248e8349aba4f0c1f204607e
path: bug.patch
project_name: FeaturePerfCSCollection
shortname: include-revision-range
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
description: Patch that is valid for a revision range AND another single commit
include_revisions:
revision_range:
end: 8ca5cc28e6746eef7340064b5d843631841bf31e
start: 01f9f1f07bef22d4248e8349aba4f0c1f204607e
single_revision: 27f17080376e409860405c40744887d81d6b3f34
path: bug.patch
project_name: FeaturePerfCSCollection
shortname: include-single-and-revision-range
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
description: Patch that is valid for a single revision
include_revisions:
single_revision: 8ca5cc28e6746eef7340064b5d843631841bf31e
path: bug.patch
project_name: FeaturePerfCSCollection
shortname: include-single-revision
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
description: Patch with a regression severity
path: bug.patch
project_name: FeaturePerfCSCollection
shortname: regression-severity
regression_severity: 1000
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
description: Patch describing an unrestricted range of commits, meaning it should
include all commits
path: bug.patch
project_name: FeaturePerfCSCollection
shortname: unrestricted-range
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit b389720

Please sign in to comment.