Extracting Linux kernel feature model changes with FMDiff

926 views

Published on

Presentation of the research work of Nicolas Dintzner, Arie van Deursen and Martin Pinzger on the evolution of feature models. This presentation was given at the VaMoS 2014 workshop.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
926
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Extracting Linux kernel feature model changes with FMDiff

  1. 1. EXTRACTING FEATURE MODEL CHANGES FROM THE LINUX KERNEL WITH FMDIFF The 8th International Workshop on Variability Modeling of Software-intensive Systems Nicolas Dintzner Delft University of Technology Netherlands N.J.R.Dintzner@tudelft.nl Arie van Deursen Delft University of Technology Netherlands Arie.vanDeursen@tudelft.nl Martin Pinzger University of Klagenfurt Austria martin.pinzger@aau.at
  2. 2. Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner Linux kernel feature model changes FMDiff Feature changes 2
  3. 3. Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner Feature model changes •  Major changes in a S.P.L. are mirrored by changes in its feature model •  Details of the evolution of the Linux feature model are not available •  Can changes in a feature models can give insights on how the implementation changes ? 3
  4. 4. Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner Questions 1.  What types of changes can be applied to a FM ? 2.  How can we automate the extraction of feature changes from a large scale FM? 3.  How does a large scale FM change over time ? 4
  5. 5. Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner Linux kernel •  Very large feature model: 13k+ features •  Long history: 20+ years of existence •  Feature driven development: model “correctness” 5
  6. 6. Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner A feature in a Kconfig file if ACPI Name config ACPI_AC tristate "AC Adapter" default y if ACPI depends X86 select POWER_SUPPLY help This driver supports the AC Adapter object ,(...). Type & Prompt Default Depends Select endif (help text) Kconfig file Additional structures 6
  7. 7. Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner Linux feature changes if ACPI if ACPI config ACPI_AC tristate "AC Adapter" default y if ACPI depends X86 select POWER_SUPPLY config ACPI_AC boolean "AC Adapter” default y if ACPI default n if AIX depends X86 || AMD select POWER_SUPPLY endif endif V1 V2 7
  8. 8. Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner Change classification CHANGE CATEGORY CHANGE SUBCATEGORY CHANGE TYPE Feature Add Remove Modify Attribute Depends Default Select Add Remove Modify Add Remove Modify Add Remove Modify Type Prompt Expression References Default value Condition References Select Condition References Add Remove Modify Add Remove Modify Add Remove Modify Add Remove Modify Add Remove Modify 8
  9. 9. Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner Classifying changes if ACPI config ACPI_AC boolean "AC Adapter" default y if ACPI default n if AIX depends X86 || AMD select POWER_SUPPLY endif Rev. Feature Change type Change category Change subcategory Old value New value 2 ACPI_AC Modification Change Attr. Change type “Tristate” “Boolean” 2 ACPI_AC Modification Add default Add default value n 2 ACPI_AC Modification Add default Add def. condition AIX 2 ACPI_AC Modification Modify depends Modify depends X86 X86||AMD 9
  10. 10. Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner FMDiff: getting the changes Linux repository Feature model translation X86 v1 X86 v2 X86 v… FMDiff Feature model reconstruction (EMF) Feature model comparison (EMF Compare) Feature change classification Feature change repository 10
  11. 11. Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner From Kconfig to Kdump 1- Kconfig (original) 2- Hierarchy flattening if ACPI config ACPI_AC tristate "AC Adapter" default y if ACPI depends X86 && ACPI select POWER_SUPPLY config ACPI_AC tristate "AC Adapter" default y if ACPI depends X86 select POWER_SUPPLY endif 3- Depends propagation 4- Kdump format (what we use) config ACPI_AC tristate "AC Adapter" default y if X86 && ACPI depends X86 && ACPI select POWER_SUPPLY if X86 && ACPI Item ACPI_AC tristate Prompt ACPI_AC 1 Default ACPI_AC "y" "X86 && ACPI" Depends ACPI_AC "X86 && ACPI" ItemSelects ACPI_AC POWER_SUPPLY "X86 && ACPI” Credits to for Undertaker and the translation process 11
  12. 12. Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner Rebuilding Kdump Feature Model v1 Kdump Feature Model v2 Feature model reconstruction (EMF) Feature Model (Ecore) EMF Feature model Instance v1 EMF Feature model Instance v2 12
  13. 13. Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner Meta model FeatureModel Architecture (string) Revision (string) "contains" 0 * Feature Type (string) Prompt (boolean) Depends (string) DependsReferences (list of strings) Select Statement "contains" 0 * "contains" 0 * Target (string) Condition (string) SelectConditionReferences (list of strings) Default Statement DefaultValue (string) Condition (string) DefaultValueReferences (list of strings) DefaultValueConditionReferences (list of strings) 13
  14. 14. Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner Example V1 Item ACPI_AC tristate Depends ACPI_AC "X86 && ACPI" … V2 Item ACPI_AC tristate Depends ACPI_AC “(X86 || AMD) && ACPI" … Feature Meta-Model (Ecore) Feature Model Architecture: X86 Revision: 1 Feature Model Architecture: X86 Revision: 2 Feature Name: ACPI_AC Depends: “X86 && ACPI” Depends references: [X86,ACPI] Feature Name: ACPI_AC Depends: “(AMD || X86) && ACPI” Depends references: [X86,ACPI,AMD] 14
  15. 15. Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner EMF Compare Differencing Matching Feature Model Architecture: X86 Revision: 1 Feature Name: ACPI_AC Depends: “X86 && ACPI” Depends references: [X86,ACPI] Feature Model Architecture: X86 Revision: 1 Feature Name: ACPI_AC Depends: “X86 && ACPI” Depends references: [X86,ACPI] Feature Name: ACPI_AC Depends: “(AMD || X86) && ACPI” Depends references: [X86,ACPI,AMD] Architecture Name Feature Name Feature Model Architecture: X86 Revision: 2 Feature Model Architecture: X86 Revision: 2 Feature Name: ACPI_AC Depends: “(AMD || X86) && ACPI” Depends references: [X86,ACPI,AMD] Feature Model Architecture: X86 Attribute change: “Revision” “1”à“2” Feature Name: ACPI_AC Attribute change; “Depends”; “X86 && ACPI”à“(AMD||X8…” Attribute change; “Depends Ref.”; added “AMD” 15
  16. 16. Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner Feature model changes Feature Model Architecture: X86 Attribute change; “Revision”; 1 à 2 Feature Name: ACPI_AC Attribute change; “Depends”; “X86 && ACPI” à “(AMD||X86) Attribute change; “Depends Ref”; added “AMD” Feature change classification Rev. Feature Change type Change category Change subcategory Old value New value 2 ACPI_AC Modification Modify depends modify depends X86 X86||AMD 2 ACPI_AC Modification Modify depends add depends ref. … … … … … AMD … … 16
  17. 17. Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner Linux kernel dataset •  10 releases (from v2.6.38 to v3.8) •  Between 10,000 and 13,000 features in each release •  22 to 26 architectures •  Approximately 7000 feature per architecture specific F.M. •  1,8+ million feature change recorded •  Tool and data available •  https://github.com/NZR/Software-Product-Line-Research 17
  18. 18. Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner Add and remove 493 772 397 1740 612 493 750 609 1068 544 Percentage of changes (architecture average) 100% 90% 80% 70% 60% 50% MODIFIED REMOVED 40% ADDED 30% 20% 10% 0% v2.6.39 v3.0 v3.1 v3.2 v3.3 v3.4 v3.5 Linux releases v3.6 v3.7 v3.8 18
  19. 19. Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner Spread over architectures (modifications) Series1 25 25 Series2 number of impacted architectures Series3 Series4 Series5 20 20 Series6 Series7 Series8 15 15 Series9 Series10 Series11 10 10 Series12 Series13 Series14 5 5 Series15 Series16 Series17 0 0 2.6.39 2 3.0 3.1 4 3.2 3.3 6 3.4 Linux releases 3.5 8 3.6 3.7 10 3.8 19
  20. 20. Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner Questions 1.  What types of changes can be applied to a FM ? Change classification for Kconfig 2.  How can we automate the extraction of feature changes from a large scale FM? We used Undertaker and EMF Compare 3.  How does a large scale SPL FM change over time ? Dataset available… 20
  21. 21. Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner Extracting feature model changes from the Linux Kernel using FMDiff Change classification Tool and approach Feature model change Add Feature CHANGE CATEGORY Remove Feature Modify Feature Change Category Attribute CHANGE SUB-CATEGORY Add Remove Modify Depends Add Remove Modify Type Prompt CHANGE TYPE Add Remove Modify Default Add Remove Modify Default Value Condition References Expression References Add Remove Modify Add Remove Modify Select Add Remove Modify Target Condition References Add Remove Modify Tool and dataset at your disposal https://github.com/NZR/Software-Product-LineResearch Nicolas Dintzner Pr. Arie Van Deursen Pr. Martin Pinzger Contact: Nicolas Dintzner N.J.R.Dintzner@tudelft.nl 21

×