SlideShare a Scribd company logo
1 of 21
Download to read offline
Marco Couto
marco.l.couto@inesctec.pt
STATIC ENERGY PREDICTION
IN SOFTWARE:
A WORST-CASE SCENARIO APPROACH
MOTIVATION
Marco Couto @ GSL - HASLab/INESC TEC 2
ENERGY VS. POWER
3
• Power (w) – rate (or effort) at which that work is done
• Energy (J) – amount of work done
• Power can change constantly while Energy is the accumulation
Energy = Power x Seconds
Power
Energy
100W360,000 J = x 3,600s
ENERGY EFFICIENT SOFTWARE
• Programmers problems:
• How to analyze
• How to interpret
• How to improve
• Researchers problem:
• How to provide information to developers
4
Mining questions about software energy consumption
- [MSR’14]
Integrated energy-directed test suite optimization
- [ISTA’14]
Seeds: A software engineer’s energy-optimization decision
support framework - [ICSE’14]
THE CHALLENGE
Marco Couto @ GSL - HASLab/INESC TEC 5
STATIC ENERGY ANALYSIS
WHY?
• Dynamic can be too costly
1. Build application + tests
2. Intrument app and/or tests
3. Run tests
4. Gather measurements and analyze them
5. Repeat N times
• ‘M’ apps -> Repeat all ‘M’ times
• Are all cases covered?
6Marco Couto @ GSL - HASLab/INESC TEC
‘M’ times
STATIC ENERGY ANALYSIS
HOW?
• How is it done for execution time?
• WCET – Worst Case Execution Time
• Can we do the same for energy?
7Marco Couto @ GSL - HASLab/INESC TEC
STATIC ENERGY EXECUTION TIME ANALYSIS
HOW?
8Marco Couto @ GSL - HASLab/INESC TEC
How exactly does WCET works?
</>
Source Code CFG
Machine Behavior
Dataflow
Bound Computation
Analysis Steps
1
53
2
Bounded CFG
T
Execution Time
Model
ILP Solver
x1 > C0
x1+x2 = C1
x1+x3 = C2
...
max(∑ xi.ti)
IPET Constraints
IPET – IMPLICIT PATH ENUMERATION TECHNIQUE
A.K.A CONSTRAINT GENERATOR
• Each node has:
• A count variable, ‘x’
• A cost variable, ‘t’
• Each edge has:
• A count variable, ‘x’
• 4 Simple but strong premises:
1. Start and end nodes accessed exactly 1 time
2. #x of node i = sum (#x of all pred. of i)
3. #x of node i = sum (#x of all succ. of i)
4. Loops must have na upper bound
9Marco Couto @ GSL - HASLab/INESC TEC
STATIC ENERGY ANALYSIS
HOW?
10Marco Couto @ GSL - HASLab/INESC TEC
How exactly does WCEC works?
</>
Source Code CFG
Machine Behavior
Dataflow
Bound Computation
Analysis Steps
1
53
2
Bounded CFG
E
Energy Model
ILP Solver
x1 > C0
x1+x2 = C1
x1+x3 = C2
...
max(∑ xi.ti)
IPET Constraints
ENERGY MODEL
HOW TO BUILD IT?
Marco Couto @ GSL - HASLab/INESC TEC 11
BUILDING THE ENERGY MODEL
• Two types of instructions:
• Path-Independent:
• x=1;
• i++;
• a=2*b;
• return 0;
• Path-Dependent:
• Allocations: malloc(sizeof(int)) ≠ malloc(sizeof(double))
• System calls: scanf(“%d”, &a) ≠ scanf(“%f”, &a)
• Other functions: strcmp(...), atoi(...), sizeof(...), ...
• Some instructions depend on others:
• ‘int x = z;’ depends on the declaration of z
• ‘printf(“%d”, a);’ assumes a has a previous assigned value
12Marco Couto @ GSL - HASLab/INESC TEC
Estimating Mobile Application Energy Consumption using
Program Analysis - [ICSE’13]
BUILDING THE ENERGY MODEL
• Path-Independent:
• Execute N times
• Repeat M times, measure each time and sum all
• At the end: energy = (sum/M/N) – dependencies
• Path-Dependent:
• Execute N times
• Repeat M times, measure each time
• At the end: energy = max(all measures) – dependencies
13Marco Couto @ GSL - HASLab/INESC TEC
Estimating Mobile Application Energy Consumption using
Program Analysis - [ICSE’13]
SOFTWARE PRODUCT LINES
THE CASE STUDY
Marco Couto @ GSL - HASLab/INESC TEC 14
SOFTWARE PRODUCT LINE
15Marco Couto @ GSL - HASLab/INESC TEC
“(…) a set of related software products (…)
generated from reusable assets.”
A B
CORE
D E
C
A B
CORE
D E
C
{B, C, D}
A B
CORE
D E
C
{A, E}
A B
CORE
D E
C
{A, B, C, D}
Feature
Product
configuration
STATIC ENERGY ANALYSIS
THIS TIME, FOR SPL!
16Marco Couto @ GSL - HASLab/INESC TEC
C
Source Code CFG
Machine Behavior
Dataflow
Bound Computation
Analysis Steps
1
53
2
Bounded CFG
E
Energy Model
ILP Solver
x1 > C0
x1+x2 = C1
x1+x3 = C2
...
max(∑ xi.ti)
IPET ConstraintsCFG
(feature-oriented)
1
53
2
Bounded CFG
(feature-oriented)(feature-oriented)
Intraprocedural Dataflow Analysis for Software Product Lines
- [AOSD '12]
RESULTS
Marco Couto @ GSL - HASLab/INESC TEC 17
PRELIMINARY RESULTS
• A SPL with 7 (exclusive) features
Results submited to SPLC’17 – Software Product Lines Conference, 21st edition:
“Products go green: Worst-Case Energy Consumption in Software Product Lines”
18Marco Couto @ GSL - HASLab/INESC TEC
WHAT NOW?
• This work was focused on accuracy
• Technique’s performance could be improved...
• Main reason: shared constraints are re-calculated for every product
19Marco Couto @ GSL - HASLab/INESC TEC
A B
CORE
D E
C
{B, C, D}
A B
CORE
D E
C
{A, B, C, D}
...
#Constraints for B
...
#Constraints for C
...
#Constraints for D
...
Constraint
Generator
...
#Constraints for B
...
#Constraints for C
...
#Constraints for D
...
Constraint
Generator
*
*
*Constraints solved more than once!
WHAT NOW?
• Accuracy can also be improved!
• Include a machine behavior analysis
• -> different energy consumptions per instruction
• Consider lower abstraction level
• For now, we analyzed C code
• Apply technique to different contexts
• Mobile?
• Embedded?
• ???
20Marco Couto @ GSL - HASLab/INESC TEC
Marco Couto
marco.l.couto@inesctec.pt
STATIC ENERGY PREDICTION
IN SOFTWARE:
A WORST-CASE SCENARIO APPROACH

More Related Content

What's hot

Composable Energy Modeling for ML-Driven Drone Applications
Composable Energy Modeling for ML-Driven Drone ApplicationsComposable Energy Modeling for ML-Driven Drone Applications
Composable Energy Modeling for ML-Driven Drone ApplicationsDemetris Trihinas
 
Device Data Directory and Asynchronous execution: A path to heterogeneous com...
Device Data Directory and Asynchronous execution: A path to heterogeneous com...Device Data Directory and Asynchronous execution: A path to heterogeneous com...
Device Data Directory and Asynchronous execution: A path to heterogeneous com...LEGATO project
 
Moldable pipelines for CNNs on heterogeneous edge devices
Moldable pipelines for CNNs on heterogeneous edge devicesMoldable pipelines for CNNs on heterogeneous edge devices
Moldable pipelines for CNNs on heterogeneous edge devicesLEGATO project
 
DESIGN OF SIMULATION DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SAIKIR...
DESIGN OF SIMULATION DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SAIKIR...DESIGN OF SIMULATION DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SAIKIR...
DESIGN OF SIMULATION DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SAIKIR...Saikiran perfect
 
StreamSight - Query-Driven Descriptive Analytics for IoT and Edge Computing
StreamSight - Query-Driven Descriptive Analytics for IoT and Edge ComputingStreamSight - Query-Driven Descriptive Analytics for IoT and Edge Computing
StreamSight - Query-Driven Descriptive Analytics for IoT and Edge ComputingDemetris Trihinas
 
DESIGN AND SIMULATION OF DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SA...
DESIGN AND SIMULATION OF DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SA...DESIGN AND SIMULATION OF DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SA...
DESIGN AND SIMULATION OF DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SA...Saikiran Panjala
 
C-SAW: A Framework for Graph Sampling and Random Walk on GPUs
C-SAW: A Framework for Graph Sampling and Random Walk on GPUsC-SAW: A Framework for Graph Sampling and Random Walk on GPUs
C-SAW: A Framework for Graph Sampling and Random Walk on GPUsPandey_G
 
Architectural Optimizations for High Performance and Energy Efficient Smith-W...
Architectural Optimizations for High Performance and Energy Efficient Smith-W...Architectural Optimizations for High Performance and Energy Efficient Smith-W...
Architectural Optimizations for High Performance and Energy Efficient Smith-W...NECST Lab @ Politecnico di Milano
 
DSD-INT 2018 Algorithmic Differentiation - Markus
DSD-INT 2018 Algorithmic Differentiation - MarkusDSD-INT 2018 Algorithmic Differentiation - Markus
DSD-INT 2018 Algorithmic Differentiation - MarkusDeltares
 
Super COMPUTING Journal
Super COMPUTING JournalSuper COMPUTING Journal
Super COMPUTING JournalPandey_G
 
Image Caption Generation: Intro to Distributed Tensorflow and Distributed Sco...
Image Caption Generation: Intro to Distributed Tensorflow and Distributed Sco...Image Caption Generation: Intro to Distributed Tensorflow and Distributed Sco...
Image Caption Generation: Intro to Distributed Tensorflow and Distributed Sco...ICTeam S.p.A.
 
Time-Evolving Graph Processing On Commodity Clusters
Time-Evolving Graph Processing On Commodity ClustersTime-Evolving Graph Processing On Commodity Clusters
Time-Evolving Graph Processing On Commodity ClustersJen Aman
 
Deriving Jet Energy Corrections using 2012 Open Data
Deriving Jet Energy Corrections using 2012 Open DataDeriving Jet Energy Corrections using 2012 Open Data
Deriving Jet Energy Corrections using 2012 Open DataDaniel Bustamante López
 
Experiments & Experiences with Scilab in Undergraduate Education
Experiments & Experiences with Scilab in Undergraduate Education Experiments & Experiences with Scilab in Undergraduate Education
Experiments & Experiences with Scilab in Undergraduate Education Naren P.R.
 
A Lock-Free Algorithm of Tree-Based Reduction for Large Scale Clustering on G...
A Lock-Free Algorithm of Tree-Based Reduction for Large Scale Clustering on G...A Lock-Free Algorithm of Tree-Based Reduction for Large Scale Clustering on G...
A Lock-Free Algorithm of Tree-Based Reduction for Large Scale Clustering on G...Ruo Ando
 
BUDW: Energy-Efficient Parallel Storage Systems with Write-Buffer Disks
BUDW: Energy-Efficient Parallel Storage Systems with Write-Buffer DisksBUDW: Energy-Efficient Parallel Storage Systems with Write-Buffer Disks
BUDW: Energy-Efficient Parallel Storage Systems with Write-Buffer DisksXiao Qin
 
UberCloud Webinar Abaqus and cloud computing
UberCloud Webinar Abaqus and cloud computingUberCloud Webinar Abaqus and cloud computing
UberCloud Webinar Abaqus and cloud computingThomas Francis
 
A Graph-Based Method For Cross-Entity Threat Detection
 A Graph-Based Method For Cross-Entity Threat Detection A Graph-Based Method For Cross-Entity Threat Detection
A Graph-Based Method For Cross-Entity Threat DetectionJen Aman
 

What's hot (20)

Composable Energy Modeling for ML-Driven Drone Applications
Composable Energy Modeling for ML-Driven Drone ApplicationsComposable Energy Modeling for ML-Driven Drone Applications
Composable Energy Modeling for ML-Driven Drone Applications
 
Device Data Directory and Asynchronous execution: A path to heterogeneous com...
Device Data Directory and Asynchronous execution: A path to heterogeneous com...Device Data Directory and Asynchronous execution: A path to heterogeneous com...
Device Data Directory and Asynchronous execution: A path to heterogeneous com...
 
Moldable pipelines for CNNs on heterogeneous edge devices
Moldable pipelines for CNNs on heterogeneous edge devicesMoldable pipelines for CNNs on heterogeneous edge devices
Moldable pipelines for CNNs on heterogeneous edge devices
 
DESIGN OF SIMULATION DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SAIKIR...
DESIGN OF SIMULATION DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SAIKIR...DESIGN OF SIMULATION DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SAIKIR...
DESIGN OF SIMULATION DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SAIKIR...
 
StreamSight - Query-Driven Descriptive Analytics for IoT and Edge Computing
StreamSight - Query-Driven Descriptive Analytics for IoT and Edge ComputingStreamSight - Query-Driven Descriptive Analytics for IoT and Edge Computing
StreamSight - Query-Driven Descriptive Analytics for IoT and Edge Computing
 
Deep Learning for Fast Simulation
Deep Learning for Fast SimulationDeep Learning for Fast Simulation
Deep Learning for Fast Simulation
 
DESIGN AND SIMULATION OF DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SA...
DESIGN AND SIMULATION OF DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SA...DESIGN AND SIMULATION OF DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SA...
DESIGN AND SIMULATION OF DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SA...
 
C-SAW: A Framework for Graph Sampling and Random Walk on GPUs
C-SAW: A Framework for Graph Sampling and Random Walk on GPUsC-SAW: A Framework for Graph Sampling and Random Walk on GPUs
C-SAW: A Framework for Graph Sampling and Random Walk on GPUs
 
Seminar@KRDB 2012 - Montali - Verification of Relational Data-Centric Systems...
Seminar@KRDB 2012 - Montali - Verification of Relational Data-Centric Systems...Seminar@KRDB 2012 - Montali - Verification of Relational Data-Centric Systems...
Seminar@KRDB 2012 - Montali - Verification of Relational Data-Centric Systems...
 
Architectural Optimizations for High Performance and Energy Efficient Smith-W...
Architectural Optimizations for High Performance and Energy Efficient Smith-W...Architectural Optimizations for High Performance and Energy Efficient Smith-W...
Architectural Optimizations for High Performance and Energy Efficient Smith-W...
 
DSD-INT 2018 Algorithmic Differentiation - Markus
DSD-INT 2018 Algorithmic Differentiation - MarkusDSD-INT 2018 Algorithmic Differentiation - Markus
DSD-INT 2018 Algorithmic Differentiation - Markus
 
Super COMPUTING Journal
Super COMPUTING JournalSuper COMPUTING Journal
Super COMPUTING Journal
 
Image Caption Generation: Intro to Distributed Tensorflow and Distributed Sco...
Image Caption Generation: Intro to Distributed Tensorflow and Distributed Sco...Image Caption Generation: Intro to Distributed Tensorflow and Distributed Sco...
Image Caption Generation: Intro to Distributed Tensorflow and Distributed Sco...
 
Time-Evolving Graph Processing On Commodity Clusters
Time-Evolving Graph Processing On Commodity ClustersTime-Evolving Graph Processing On Commodity Clusters
Time-Evolving Graph Processing On Commodity Clusters
 
Deriving Jet Energy Corrections using 2012 Open Data
Deriving Jet Energy Corrections using 2012 Open DataDeriving Jet Energy Corrections using 2012 Open Data
Deriving Jet Energy Corrections using 2012 Open Data
 
Experiments & Experiences with Scilab in Undergraduate Education
Experiments & Experiences with Scilab in Undergraduate Education Experiments & Experiences with Scilab in Undergraduate Education
Experiments & Experiences with Scilab in Undergraduate Education
 
A Lock-Free Algorithm of Tree-Based Reduction for Large Scale Clustering on G...
A Lock-Free Algorithm of Tree-Based Reduction for Large Scale Clustering on G...A Lock-Free Algorithm of Tree-Based Reduction for Large Scale Clustering on G...
A Lock-Free Algorithm of Tree-Based Reduction for Large Scale Clustering on G...
 
BUDW: Energy-Efficient Parallel Storage Systems with Write-Buffer Disks
BUDW: Energy-Efficient Parallel Storage Systems with Write-Buffer DisksBUDW: Energy-Efficient Parallel Storage Systems with Write-Buffer Disks
BUDW: Energy-Efficient Parallel Storage Systems with Write-Buffer Disks
 
UberCloud Webinar Abaqus and cloud computing
UberCloud Webinar Abaqus and cloud computingUberCloud Webinar Abaqus and cloud computing
UberCloud Webinar Abaqus and cloud computing
 
A Graph-Based Method For Cross-Entity Threat Detection
 A Graph-Based Method For Cross-Entity Threat Detection A Graph-Based Method For Cross-Entity Threat Detection
A Graph-Based Method For Cross-Entity Threat Detection
 

Similar to Static Energy Prediction in Software: A Worst-Case Scenario Approach

byteLAKE's Alveo FPGA Solutions
byteLAKE's Alveo FPGA SolutionsbyteLAKE's Alveo FPGA Solutions
byteLAKE's Alveo FPGA SolutionsbyteLAKE
 
Low Power High-Performance Computing on the BeagleBoard Platform
Low Power High-Performance Computing on the BeagleBoard PlatformLow Power High-Performance Computing on the BeagleBoard Platform
Low Power High-Performance Computing on the BeagleBoard Platforma3labdsp
 
Tutorial-on-DNN-09A-Co-design-Sparsity.pdf
Tutorial-on-DNN-09A-Co-design-Sparsity.pdfTutorial-on-DNN-09A-Co-design-Sparsity.pdf
Tutorial-on-DNN-09A-Co-design-Sparsity.pdfDuy-Hieu Bui
 
Fast Insights to Optimized Vectorization and Memory Using Cache-aware Rooflin...
Fast Insights to Optimized Vectorization and Memory Using Cache-aware Rooflin...Fast Insights to Optimized Vectorization and Memory Using Cache-aware Rooflin...
Fast Insights to Optimized Vectorization and Memory Using Cache-aware Rooflin...Intel® Software
 
hetshah_resume
hetshah_resumehetshah_resume
hetshah_resumehet shah
 
The CAOS framework: democratize the acceleration of compute intensive applica...
The CAOS framework: democratize the acceleration of compute intensive applica...The CAOS framework: democratize the acceleration of compute intensive applica...
The CAOS framework: democratize the acceleration of compute intensive applica...NECST Lab @ Politecnico di Milano
 
Using Deep Learning on Apache Spark to Diagnose Thoracic Pathology from Chest...
Using Deep Learning on Apache Spark to Diagnose Thoracic Pathology from Chest...Using Deep Learning on Apache Spark to Diagnose Thoracic Pathology from Chest...
Using Deep Learning on Apache Spark to Diagnose Thoracic Pathology from Chest...Databricks
 
Programmable Exascale Supercomputer
Programmable Exascale SupercomputerProgrammable Exascale Supercomputer
Programmable Exascale SupercomputerSagar Dolas
 
Bob Garrett: Network of Networks Analysis
Bob Garrett: Network of Networks AnalysisBob Garrett: Network of Networks Analysis
Bob Garrett: Network of Networks AnalysisEnergyTech2015
 
Rishikesh Sharma Portfolio
Rishikesh Sharma PortfolioRishikesh Sharma Portfolio
Rishikesh Sharma Portfoliosharmarishikesh
 
Enabling Physics and Empirical-Based Algorithms with Spark Using the Integrat...
Enabling Physics and Empirical-Based Algorithms with Spark Using the Integrat...Enabling Physics and Empirical-Based Algorithms with Spark Using the Integrat...
Enabling Physics and Empirical-Based Algorithms with Spark Using the Integrat...Databricks
 
Track A-Compilation guiding and adjusting - IBM
Track A-Compilation guiding and adjusting - IBMTrack A-Compilation guiding and adjusting - IBM
Track A-Compilation guiding and adjusting - IBMchiportal
 
OpenACC and Open Hackathons Monthly Highlights June 2022.pdf
OpenACC and Open Hackathons Monthly Highlights June 2022.pdfOpenACC and Open Hackathons Monthly Highlights June 2022.pdf
OpenACC and Open Hackathons Monthly Highlights June 2022.pdfOpenACC
 
Final Project Report
Final Project ReportFinal Project Report
Final Project ReportRiddhi Shah
 
Kakarla Sriram K _resume_sep_2016
Kakarla Sriram K _resume_sep_2016Kakarla Sriram K _resume_sep_2016
Kakarla Sriram K _resume_sep_2016srkkakarla
 
LEGaTO: Software Stack Runtimes
LEGaTO: Software Stack RuntimesLEGaTO: Software Stack Runtimes
LEGaTO: Software Stack RuntimesLEGATO project
 

Similar to Static Energy Prediction in Software: A Worst-Case Scenario Approach (20)

byteLAKE's Alveo FPGA Solutions
byteLAKE's Alveo FPGA SolutionsbyteLAKE's Alveo FPGA Solutions
byteLAKE's Alveo FPGA Solutions
 
Low Power High-Performance Computing on the BeagleBoard Platform
Low Power High-Performance Computing on the BeagleBoard PlatformLow Power High-Performance Computing on the BeagleBoard Platform
Low Power High-Performance Computing on the BeagleBoard Platform
 
Tutorial-on-DNN-09A-Co-design-Sparsity.pdf
Tutorial-on-DNN-09A-Co-design-Sparsity.pdfTutorial-on-DNN-09A-Co-design-Sparsity.pdf
Tutorial-on-DNN-09A-Co-design-Sparsity.pdf
 
Dsp lab manual 15 11-2016
Dsp lab manual 15 11-2016Dsp lab manual 15 11-2016
Dsp lab manual 15 11-2016
 
Fast Insights to Optimized Vectorization and Memory Using Cache-aware Rooflin...
Fast Insights to Optimized Vectorization and Memory Using Cache-aware Rooflin...Fast Insights to Optimized Vectorization and Memory Using Cache-aware Rooflin...
Fast Insights to Optimized Vectorization and Memory Using Cache-aware Rooflin...
 
hetshah_resume
hetshah_resumehetshah_resume
hetshah_resume
 
The CAOS framework: democratize the acceleration of compute intensive applica...
The CAOS framework: democratize the acceleration of compute intensive applica...The CAOS framework: democratize the acceleration of compute intensive applica...
The CAOS framework: democratize the acceleration of compute intensive applica...
 
Using Deep Learning on Apache Spark to Diagnose Thoracic Pathology from Chest...
Using Deep Learning on Apache Spark to Diagnose Thoracic Pathology from Chest...Using Deep Learning on Apache Spark to Diagnose Thoracic Pathology from Chest...
Using Deep Learning on Apache Spark to Diagnose Thoracic Pathology from Chest...
 
Programmable Exascale Supercomputer
Programmable Exascale SupercomputerProgrammable Exascale Supercomputer
Programmable Exascale Supercomputer
 
Bob Garrett: Network of Networks Analysis
Bob Garrett: Network of Networks AnalysisBob Garrett: Network of Networks Analysis
Bob Garrett: Network of Networks Analysis
 
Rishikesh Sharma Portfolio
Rishikesh Sharma PortfolioRishikesh Sharma Portfolio
Rishikesh Sharma Portfolio
 
Enabling Physics and Empirical-Based Algorithms with Spark Using the Integrat...
Enabling Physics and Empirical-Based Algorithms with Spark Using the Integrat...Enabling Physics and Empirical-Based Algorithms with Spark Using the Integrat...
Enabling Physics and Empirical-Based Algorithms with Spark Using the Integrat...
 
Track A-Compilation guiding and adjusting - IBM
Track A-Compilation guiding and adjusting - IBMTrack A-Compilation guiding and adjusting - IBM
Track A-Compilation guiding and adjusting - IBM
 
Fmcad08
Fmcad08Fmcad08
Fmcad08
 
OpenACC and Open Hackathons Monthly Highlights June 2022.pdf
OpenACC and Open Hackathons Monthly Highlights June 2022.pdfOpenACC and Open Hackathons Monthly Highlights June 2022.pdf
OpenACC and Open Hackathons Monthly Highlights June 2022.pdf
 
Nikita Resume
Nikita ResumeNikita Resume
Nikita Resume
 
Final Project Report
Final Project ReportFinal Project Report
Final Project Report
 
Kakarla Sriram K _resume_sep_2016
Kakarla Sriram K _resume_sep_2016Kakarla Sriram K _resume_sep_2016
Kakarla Sriram K _resume_sep_2016
 
Resume
ResumeResume
Resume
 
LEGaTO: Software Stack Runtimes
LEGaTO: Software Stack RuntimesLEGaTO: Software Stack Runtimes
LEGaTO: Software Stack Runtimes
 

More from GreenLabAtDI

Let's Talk a Bit About: Green Software
Let's Talk a Bit About: Green SoftwareLet's Talk a Bit About: Green Software
Let's Talk a Bit About: Green SoftwareGreenLabAtDI
 
Towards a Green Ranking for Programming Languages
Towards a Green Ranking for Programming LanguagesTowards a Green Ranking for Programming Languages
Towards a Green Ranking for Programming LanguagesGreenLabAtDI
 
Locating Energy Hotspots in Source Code
Locating Energy Hotspots in Source CodeLocating Energy Hotspots in Source Code
Locating Energy Hotspots in Source CodeGreenLabAtDI
 
Green Computing as an Engineering Discipline
Green Computing as an Engineering DisciplineGreen Computing as an Engineering Discipline
Green Computing as an Engineering DisciplineGreenLabAtDI
 
The Influence of the Java Collection Framework on Overall Energy Consumption
The Influence of the Java Collection Framework on Overall Energy ConsumptionThe Influence of the Java Collection Framework on Overall Energy Consumption
The Influence of the Java Collection Framework on Overall Energy ConsumptionGreenLabAtDI
 
Haskell in Green Land: Analyzing the Energy Behavior of a Purely Functional L...
Haskell in Green Land: Analyzing the Energy Behavior of a Purely Functional L...Haskell in Green Land: Analyzing the Energy Behavior of a Purely Functional L...
Haskell in Green Land: Analyzing the Energy Behavior of a Purely Functional L...GreenLabAtDI
 
Green Software Lab
Green Software LabGreen Software Lab
Green Software LabGreenLabAtDI
 
GreenDroid: A Tool for Analysing Power Consumption in the Android Ecosystem
GreenDroid: A Tool for Analysing Power Consumption in the Android EcosystemGreenDroid: A Tool for Analysing Power Consumption in the Android Ecosystem
GreenDroid: A Tool for Analysing Power Consumption in the Android EcosystemGreenLabAtDI
 
Marco Couto's Msc Thesis Presentation
Marco Couto's Msc Thesis PresentationMarco Couto's Msc Thesis Presentation
Marco Couto's Msc Thesis PresentationGreenLabAtDI
 
Rui Pereira's PhD Pre-Thesis
Rui Pereira's PhD Pre-ThesisRui Pereira's PhD Pre-Thesis
Rui Pereira's PhD Pre-ThesisGreenLabAtDI
 
Detecting Anomalous Energy Consumption in Android Applications
Detecting Anomalous Energy Consumption in Android ApplicationsDetecting Anomalous Energy Consumption in Android Applications
Detecting Anomalous Energy Consumption in Android ApplicationsGreenLabAtDI
 
PresentationMeasuring and Visualizing Energy Consumption within Software Code
PresentationMeasuring and Visualizing Energy Consumption within Software CodePresentationMeasuring and Visualizing Energy Consumption within Software Code
PresentationMeasuring and Visualizing Energy Consumption within Software CodeGreenLabAtDI
 

More from GreenLabAtDI (12)

Let's Talk a Bit About: Green Software
Let's Talk a Bit About: Green SoftwareLet's Talk a Bit About: Green Software
Let's Talk a Bit About: Green Software
 
Towards a Green Ranking for Programming Languages
Towards a Green Ranking for Programming LanguagesTowards a Green Ranking for Programming Languages
Towards a Green Ranking for Programming Languages
 
Locating Energy Hotspots in Source Code
Locating Energy Hotspots in Source CodeLocating Energy Hotspots in Source Code
Locating Energy Hotspots in Source Code
 
Green Computing as an Engineering Discipline
Green Computing as an Engineering DisciplineGreen Computing as an Engineering Discipline
Green Computing as an Engineering Discipline
 
The Influence of the Java Collection Framework on Overall Energy Consumption
The Influence of the Java Collection Framework on Overall Energy ConsumptionThe Influence of the Java Collection Framework on Overall Energy Consumption
The Influence of the Java Collection Framework on Overall Energy Consumption
 
Haskell in Green Land: Analyzing the Energy Behavior of a Purely Functional L...
Haskell in Green Land: Analyzing the Energy Behavior of a Purely Functional L...Haskell in Green Land: Analyzing the Energy Behavior of a Purely Functional L...
Haskell in Green Land: Analyzing the Energy Behavior of a Purely Functional L...
 
Green Software Lab
Green Software LabGreen Software Lab
Green Software Lab
 
GreenDroid: A Tool for Analysing Power Consumption in the Android Ecosystem
GreenDroid: A Tool for Analysing Power Consumption in the Android EcosystemGreenDroid: A Tool for Analysing Power Consumption in the Android Ecosystem
GreenDroid: A Tool for Analysing Power Consumption in the Android Ecosystem
 
Marco Couto's Msc Thesis Presentation
Marco Couto's Msc Thesis PresentationMarco Couto's Msc Thesis Presentation
Marco Couto's Msc Thesis Presentation
 
Rui Pereira's PhD Pre-Thesis
Rui Pereira's PhD Pre-ThesisRui Pereira's PhD Pre-Thesis
Rui Pereira's PhD Pre-Thesis
 
Detecting Anomalous Energy Consumption in Android Applications
Detecting Anomalous Energy Consumption in Android ApplicationsDetecting Anomalous Energy Consumption in Android Applications
Detecting Anomalous Energy Consumption in Android Applications
 
PresentationMeasuring and Visualizing Energy Consumption within Software Code
PresentationMeasuring and Visualizing Energy Consumption within Software CodePresentationMeasuring and Visualizing Energy Consumption within Software Code
PresentationMeasuring and Visualizing Energy Consumption within Software Code
 

Recently uploaded

eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolsosttopstonverter
 
Transform your Corporate Strategy Office - Harness OnePlan’s Strategic Portfo...
Transform your Corporate Strategy Office - Harness OnePlan’s Strategic Portfo...Transform your Corporate Strategy Office - Harness OnePlan’s Strategic Portfo...
Transform your Corporate Strategy Office - Harness OnePlan’s Strategic Portfo...OnePlan Solutions
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
Understanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptxUnderstanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptxSasikiranMarri
 
Explore the Three Main Types of Logistics - Inbound Logistics, Outbound Logis...
Explore the Three Main Types of Logistics - Inbound Logistics, Outbound Logis...Explore the Three Main Types of Logistics - Inbound Logistics, Outbound Logis...
Explore the Three Main Types of Logistics - Inbound Logistics, Outbound Logis...Piyovi
 
What is Mendix and the concept of low-code development.docx
What is Mendix and the concept of low-code development.docxWhat is Mendix and the concept of low-code development.docx
What is Mendix and the concept of low-code development.docxTechnogeeks
 
Advantages of Cargo Cloud Solutions.pptx
Advantages of Cargo Cloud Solutions.pptxAdvantages of Cargo Cloud Solutions.pptx
Advantages of Cargo Cloud Solutions.pptxRTS corp
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfmaor17
 
Revolutionize Your Video Editing with InVideo.io: A Comprehensive Review
Revolutionize Your Video Editing with InVideo.io: A Comprehensive ReviewRevolutionize Your Video Editing with InVideo.io: A Comprehensive Review
Revolutionize Your Video Editing with InVideo.io: A Comprehensive Reviewjw364beach
 
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...kalichargn70th171
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shardsChristopher Curtin
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdfAndrey Devyatkin
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
Business Analyzopedia - Your Pocket Gita for Business Analysis
Business Analyzopedia - Your Pocket Gita for Business AnalysisBusiness Analyzopedia - Your Pocket Gita for Business Analysis
Business Analyzopedia - Your Pocket Gita for Business AnalysisDEEPRAJ PATHAK
 
AmsterdamJUG April 2024 - Going serverless with Quarkus GraalVM native images...
AmsterdamJUG April 2024 - Going serverless with Quarkus GraalVM native images...AmsterdamJUG April 2024 - Going serverless with Quarkus GraalVM native images...
AmsterdamJUG April 2024 - Going serverless with Quarkus GraalVM native images...Bert Jan Schrijver
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jNeo4j
 
The State of the Green IT at the beginning of 2024
The State of the Green IT at the beginning of 2024The State of the Green IT at the beginning of 2024
The State of the Green IT at the beginning of 2024Artur Skowroński
 
Mastering Project Planning with Microsoft Project 2016.pptx
Mastering Project Planning with Microsoft Project 2016.pptxMastering Project Planning with Microsoft Project 2016.pptx
Mastering Project Planning with Microsoft Project 2016.pptxAS Design & AST.
 

Recently uploaded (20)

eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration tools
 
Transform your Corporate Strategy Office - Harness OnePlan’s Strategic Portfo...
Transform your Corporate Strategy Office - Harness OnePlan’s Strategic Portfo...Transform your Corporate Strategy Office - Harness OnePlan’s Strategic Portfo...
Transform your Corporate Strategy Office - Harness OnePlan’s Strategic Portfo...
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
Understanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptxUnderstanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptx
 
Explore the Three Main Types of Logistics - Inbound Logistics, Outbound Logis...
Explore the Three Main Types of Logistics - Inbound Logistics, Outbound Logis...Explore the Three Main Types of Logistics - Inbound Logistics, Outbound Logis...
Explore the Three Main Types of Logistics - Inbound Logistics, Outbound Logis...
 
What is Mendix and the concept of low-code development.docx
What is Mendix and the concept of low-code development.docxWhat is Mendix and the concept of low-code development.docx
What is Mendix and the concept of low-code development.docx
 
Advantages of Cargo Cloud Solutions.pptx
Advantages of Cargo Cloud Solutions.pptxAdvantages of Cargo Cloud Solutions.pptx
Advantages of Cargo Cloud Solutions.pptx
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdf
 
Revolutionize Your Video Editing with InVideo.io: A Comprehensive Review
Revolutionize Your Video Editing with InVideo.io: A Comprehensive ReviewRevolutionize Your Video Editing with InVideo.io: A Comprehensive Review
Revolutionize Your Video Editing with InVideo.io: A Comprehensive Review
 
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
Business Analyzopedia - Your Pocket Gita for Business Analysis
Business Analyzopedia - Your Pocket Gita for Business AnalysisBusiness Analyzopedia - Your Pocket Gita for Business Analysis
Business Analyzopedia - Your Pocket Gita for Business Analysis
 
AmsterdamJUG April 2024 - Going serverless with Quarkus GraalVM native images...
AmsterdamJUG April 2024 - Going serverless with Quarkus GraalVM native images...AmsterdamJUG April 2024 - Going serverless with Quarkus GraalVM native images...
AmsterdamJUG April 2024 - Going serverless with Quarkus GraalVM native images...
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
 
The State of the Green IT at the beginning of 2024
The State of the Green IT at the beginning of 2024The State of the Green IT at the beginning of 2024
The State of the Green IT at the beginning of 2024
 
Mastering Project Planning with Microsoft Project 2016.pptx
Mastering Project Planning with Microsoft Project 2016.pptxMastering Project Planning with Microsoft Project 2016.pptx
Mastering Project Planning with Microsoft Project 2016.pptx
 

Static Energy Prediction in Software: A Worst-Case Scenario Approach

  • 1. Marco Couto marco.l.couto@inesctec.pt STATIC ENERGY PREDICTION IN SOFTWARE: A WORST-CASE SCENARIO APPROACH
  • 2. MOTIVATION Marco Couto @ GSL - HASLab/INESC TEC 2
  • 3. ENERGY VS. POWER 3 • Power (w) – rate (or effort) at which that work is done • Energy (J) – amount of work done • Power can change constantly while Energy is the accumulation Energy = Power x Seconds Power Energy 100W360,000 J = x 3,600s
  • 4. ENERGY EFFICIENT SOFTWARE • Programmers problems: • How to analyze • How to interpret • How to improve • Researchers problem: • How to provide information to developers 4 Mining questions about software energy consumption - [MSR’14] Integrated energy-directed test suite optimization - [ISTA’14] Seeds: A software engineer’s energy-optimization decision support framework - [ICSE’14]
  • 5. THE CHALLENGE Marco Couto @ GSL - HASLab/INESC TEC 5
  • 6. STATIC ENERGY ANALYSIS WHY? • Dynamic can be too costly 1. Build application + tests 2. Intrument app and/or tests 3. Run tests 4. Gather measurements and analyze them 5. Repeat N times • ‘M’ apps -> Repeat all ‘M’ times • Are all cases covered? 6Marco Couto @ GSL - HASLab/INESC TEC ‘M’ times
  • 7. STATIC ENERGY ANALYSIS HOW? • How is it done for execution time? • WCET – Worst Case Execution Time • Can we do the same for energy? 7Marco Couto @ GSL - HASLab/INESC TEC
  • 8. STATIC ENERGY EXECUTION TIME ANALYSIS HOW? 8Marco Couto @ GSL - HASLab/INESC TEC How exactly does WCET works? </> Source Code CFG Machine Behavior Dataflow Bound Computation Analysis Steps 1 53 2 Bounded CFG T Execution Time Model ILP Solver x1 > C0 x1+x2 = C1 x1+x3 = C2 ... max(∑ xi.ti) IPET Constraints
  • 9. IPET – IMPLICIT PATH ENUMERATION TECHNIQUE A.K.A CONSTRAINT GENERATOR • Each node has: • A count variable, ‘x’ • A cost variable, ‘t’ • Each edge has: • A count variable, ‘x’ • 4 Simple but strong premises: 1. Start and end nodes accessed exactly 1 time 2. #x of node i = sum (#x of all pred. of i) 3. #x of node i = sum (#x of all succ. of i) 4. Loops must have na upper bound 9Marco Couto @ GSL - HASLab/INESC TEC
  • 10. STATIC ENERGY ANALYSIS HOW? 10Marco Couto @ GSL - HASLab/INESC TEC How exactly does WCEC works? </> Source Code CFG Machine Behavior Dataflow Bound Computation Analysis Steps 1 53 2 Bounded CFG E Energy Model ILP Solver x1 > C0 x1+x2 = C1 x1+x3 = C2 ... max(∑ xi.ti) IPET Constraints
  • 11. ENERGY MODEL HOW TO BUILD IT? Marco Couto @ GSL - HASLab/INESC TEC 11
  • 12. BUILDING THE ENERGY MODEL • Two types of instructions: • Path-Independent: • x=1; • i++; • a=2*b; • return 0; • Path-Dependent: • Allocations: malloc(sizeof(int)) ≠ malloc(sizeof(double)) • System calls: scanf(“%d”, &a) ≠ scanf(“%f”, &a) • Other functions: strcmp(...), atoi(...), sizeof(...), ... • Some instructions depend on others: • ‘int x = z;’ depends on the declaration of z • ‘printf(“%d”, a);’ assumes a has a previous assigned value 12Marco Couto @ GSL - HASLab/INESC TEC Estimating Mobile Application Energy Consumption using Program Analysis - [ICSE’13]
  • 13. BUILDING THE ENERGY MODEL • Path-Independent: • Execute N times • Repeat M times, measure each time and sum all • At the end: energy = (sum/M/N) – dependencies • Path-Dependent: • Execute N times • Repeat M times, measure each time • At the end: energy = max(all measures) – dependencies 13Marco Couto @ GSL - HASLab/INESC TEC Estimating Mobile Application Energy Consumption using Program Analysis - [ICSE’13]
  • 14. SOFTWARE PRODUCT LINES THE CASE STUDY Marco Couto @ GSL - HASLab/INESC TEC 14
  • 15. SOFTWARE PRODUCT LINE 15Marco Couto @ GSL - HASLab/INESC TEC “(…) a set of related software products (…) generated from reusable assets.” A B CORE D E C A B CORE D E C {B, C, D} A B CORE D E C {A, E} A B CORE D E C {A, B, C, D} Feature Product configuration
  • 16. STATIC ENERGY ANALYSIS THIS TIME, FOR SPL! 16Marco Couto @ GSL - HASLab/INESC TEC C Source Code CFG Machine Behavior Dataflow Bound Computation Analysis Steps 1 53 2 Bounded CFG E Energy Model ILP Solver x1 > C0 x1+x2 = C1 x1+x3 = C2 ... max(∑ xi.ti) IPET ConstraintsCFG (feature-oriented) 1 53 2 Bounded CFG (feature-oriented)(feature-oriented) Intraprocedural Dataflow Analysis for Software Product Lines - [AOSD '12]
  • 17. RESULTS Marco Couto @ GSL - HASLab/INESC TEC 17
  • 18. PRELIMINARY RESULTS • A SPL with 7 (exclusive) features Results submited to SPLC’17 – Software Product Lines Conference, 21st edition: “Products go green: Worst-Case Energy Consumption in Software Product Lines” 18Marco Couto @ GSL - HASLab/INESC TEC
  • 19. WHAT NOW? • This work was focused on accuracy • Technique’s performance could be improved... • Main reason: shared constraints are re-calculated for every product 19Marco Couto @ GSL - HASLab/INESC TEC A B CORE D E C {B, C, D} A B CORE D E C {A, B, C, D} ... #Constraints for B ... #Constraints for C ... #Constraints for D ... Constraint Generator ... #Constraints for B ... #Constraints for C ... #Constraints for D ... Constraint Generator * * *Constraints solved more than once!
  • 20. WHAT NOW? • Accuracy can also be improved! • Include a machine behavior analysis • -> different energy consumptions per instruction • Consider lower abstraction level • For now, we analyzed C code • Apply technique to different contexts • Mobile? • Embedded? • ??? 20Marco Couto @ GSL - HASLab/INESC TEC
  • 21. Marco Couto marco.l.couto@inesctec.pt STATIC ENERGY PREDICTION IN SOFTWARE: A WORST-CASE SCENARIO APPROACH