Add elf symbol address helper + pass experiment path to queries

This commit is contained in:
2026-06-12 17:34:24 +02:00
parent 4b0a4b175b
commit b0cb01a7e4
3 changed files with 78 additions and 77 deletions

View File

@ -6,18 +6,14 @@ rec {
flake-utils.url = "github:numtide/flake-utils";
};
# TODO: Rewrite all perl scripts -> modularize common code and unify menu actions
outputs =
{
outputs = {
self,
nixpkgs,
flake-utils,
}:
# Create a shell (and possibly package) for each possible system, not only x86_64-linux
flake-utils.lib.eachDefaultSystem (
system:
let
system: let
# =========================================================================================
# Define pkgs/stdenvs
# =========================================================================================
@ -66,8 +62,7 @@ rec {
# =========================================================================================
# Setup the shell when entering the "nix develop" environment (bash script).
shellHook =
let
shellHook = let
# Add project-local fish abbrs here
abbrs = {
fail = "perl ./scripts/menu.pl";
@ -119,11 +114,13 @@ rec {
# ===========================================================================================
python = pkgs.python314.withPackages (
p: with p; [
p:
with p; [
setuptools
flask
flask-mysqldb
pyyaml
tabulate
]
);
@ -166,8 +163,7 @@ rec {
pname = "wasi-sdk";
version = "29";
src =
let
src = let
baseurl = "https://github.com/WebAssembly/wasi-sdk/releases/download";
in
builtins.fetchTarball {
@ -199,8 +195,7 @@ rec {
pname = "iwasm";
version = "2.4.4";
src =
let
src = let
baseurl = "https://github.com/bytecodealliance/wasm-micro-runtime/releases/download";
in
builtins.fetchTarball {
@ -234,8 +229,7 @@ rec {
pname = "wamrc";
version = "2.4.4";
src =
let
src = let
baseurl = "https://github.com/bytecodealliance/wasm-micro-runtime/releases/download";
in
builtins.fetchTarball {
@ -357,8 +351,7 @@ rec {
runHook postInstall
'';
};
in
{
in {
# Provide package for "nix build"
packages = {
default = fail-bin;
@ -391,6 +384,7 @@ rec {
# Those are read by compile.pl / build.pl
FAIL_SHARE = "${fail-bin}/share";
FAIL_PYTHON = "${python}/bin/python";
WASI_ROOT = wasi-sdk;
WAMR_ROOT = "/home/christoph/Notes/TU/MastersThesis/FailNix/wamr";
CROSS_CC = "${i386_pkgs.stdenv.cc}/bin/i386-elf-gcc";

View File

@ -140,7 +140,7 @@ sub execute_query {
my $postprocess = $module->can('postprocess')
or die "$module can't postprocess()";
my $querystring = $query->($experiment);
my $querystring = $query->($experiment, "$builds_dir/$experiment");
my $argsstring = $args->();
my $filenamestring = $filename->();
@ -171,6 +171,13 @@ sub format_number_sep {
return $number;
}
sub elf_sym_addr {
my ($elffile, $sym) = @_;
my $line = qx{nm "$elffile" 2>/dev/null | grep " $sym\$"};
return undef unless $line =~ /^([0-9a-f]+)/i;
return hex($1);
}
sub elf_read_sections {
my ($elffile) = @_;

View File

@ -386,7 +386,7 @@ make_heatmap <- function(target_resulttype, target_benchmark) {
xmin = -0.5,
xmax = row_width - 0.5,
fill = NA,
linewidth = 1.0,
linewidth = 1.5,
inherit.aes = FALSE
) +
scale_colour_brewer(name = "Region", palette = "Dark2")