Skip to content

With or without options: additional measurements #15

@FAMILIAR-project

Description

@FAMILIAR-project

There are some options that have the same values in the dataset or the values are unbalanced (lack of diversity). It calls to further explore why (to a reasonable extent). The following applies to 4.13.3

The idea is to measure N configurations with an option o activated and deactivated (we measure 2 x N configurations), and then analyze the difference.

In fact, to reduce the cost of the experiment, we can make the economy of measuring with or without since we have already in the database some measurements.

I propose the following procedure

  1. given an option o (eg CC_OPTIMIZE_FOR_SIZE), randomly pick a configuration in the database with 'n' value (says)
  2. "mutate" the configuration by changing the value to 'y' (warning: we have to ensure that the configuration is valid and constraints are respected)
  3. repeat N times the procedure

Let us take a concrete example. o = "CONFIG_CC_OPTIMIZE_FOR_SIZE" and N=100.
We consider dataset 4.13.3
For doing the first step, we can randomly pick a configuration using the dataframe

import pandas as pd
import tuxml
df = tuxml.load_dataset()
# 0 value is 'n' value, 1 is 'y' value, 2 is 'm' value
df.query("CC_OPTIMIZE_FOR_SIZE == 0")['cid'][:100] # TODO real random ;) 

problem: we need the associated .config files (we might need to restore the database, at least locally).

for the second step, we need to do something like:
vmacher:linux-4.13.3 macher1$ scripts/config -e CONFIG_CC_OPTIMIZE_FOR_SIZE -d CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE
using this nice utility:
https://github.com/torvalds/linux/blob/v4.13/scripts/config

note that we have to manually fix the possible inconsistency and proactively deactivate CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE (the two options are choices and mutually exclusive)
(make olddefconfig is OK)

once done (we have n=100 new .config files), we have to call tuxml/kernel generator with --config

We need some local scripts to prepare/create .config files we want to measure.
And then use tuxml to populate the database.

It is also needed to locate where in the database are configurations with and without option (what are the cids?)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions