Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds patches for performance interaction case studies #24

Merged
merged 18 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions DegreeHigh/hot_code.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: "Marks hot code."
include_revisions:
revision_range:
start: f6b2548c8039ee21d017b741a8e181a1e9b25cd6
end: HEAD
path: hot_code.patch
project_name: DegreeHigh
shortname: hot_code
tags:
- perf_region
13 changes: 13 additions & 0 deletions DegreeHigh/hot_code.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/projects/PerformanceInteractionDetection/DegreeHigh/main.cpp b/projects/PerformanceInteractionDetection/DegreeHigh/main.cpp
index b008e0c..03bb33c 100644
--- a/projects/PerformanceInteractionDetection/DegreeHigh/main.cpp
+++ b/projects/PerformanceInteractionDetection/DegreeHigh/main.cpp
@@ -52,6 +52,8 @@ int main(int argc, char *argv[]) {
}
}

+ ___REGION_START __RT_High "hot_code"
fp_util::sleep_for_millisecs(1000 + t * 100);
+ ___REGION_END __RT_High "hot_code"
return 0;
}
11 changes: 11 additions & 0 deletions DegreeHigh/regression.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
description: "Insert regression."
include_revisions:
revision_range:
start: f6b2548c8039ee21d017b741a8e181a1e9b25cd6
end: HEAD
path: regression.patch
project_name: DegreeHigh
shortname: regression
tags:
- regression
- perf_prec
13 changes: 13 additions & 0 deletions DegreeHigh/regression.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/projects/PerformanceInteractionDetection/DegreeHigh/main.cpp b/projects/PerformanceInteractionDetection/DegreeHigh/main.cpp
index ba87834..8ae344c 100644
--- a/projects/PerformanceInteractionDetection/DegreeHigh/main.cpp
+++ b/projects/PerformanceInteractionDetection/DegreeHigh/main.cpp
@@ -28,7 +28,7 @@ int main(int argc, char *argv[]) {
F9 = fp_util::isFeatureEnabled(argc, argv, "--f9");
F10 = fp_util::isFeatureEnabled(argc, argv, "--f10");

- int t = 10;
+ int t = 15;

if (F1) {
if (F2) {
10 changes: 10 additions & 0 deletions DegreeLow/hot_code.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: "Marks hot code."
include_revisions:
revision_range:
start: f6b2548c8039ee21d017b741a8e181a1e9b25cd6
end: HEAD
path: hot_code.patch
project_name: DegreeLow
shortname: hot_code
tags:
- perf_region
13 changes: 13 additions & 0 deletions DegreeLow/hot_code.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/projects/PerformanceInteractionDetection/DegreeLow/main.cpp b/projects/PerformanceInteractionDetection/DegreeLow/main.cpp
index cd459aa..17ad58d 100644
--- a/projects/PerformanceInteractionDetection/DegreeLow/main.cpp
+++ b/projects/PerformanceInteractionDetection/DegreeLow/main.cpp
@@ -34,6 +34,8 @@ int main(int argc, char *argv[]) {
t *= 2;
}

+ ___REGION_START __RT_High "hot_code"
fp_util::sleep_for_millisecs(1000 + t * 100);
+ ___REGION_END __RT_High "hot_code"
return 0;
}
11 changes: 11 additions & 0 deletions DegreeLow/regression.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
description: "Insert regression."
include_revisions:
revision_range:
start: f6b2548c8039ee21d017b741a8e181a1e9b25cd6
end: HEAD
path: regression.patch
project_name: DegreeLow
shortname: regression
tags:
- regression
- perf_prec
13 changes: 13 additions & 0 deletions DegreeLow/regression.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/projects/PerformanceInteractionDetection/DegreeLow/main.cpp b/projects/PerformanceInteractionDetection/DegreeLow/main.cpp
index abde64c..d7063bd 100644
--- a/projects/PerformanceInteractionDetection/DegreeLow/main.cpp
+++ b/projects/PerformanceInteractionDetection/DegreeLow/main.cpp
@@ -28,7 +28,7 @@ int main(int argc, char *argv[]) {
F9 = fp_util::isFeatureEnabled(argc, argv, "--f9");
F10 = fp_util::isFeatureEnabled(argc, argv, "--f10");

- int t = 10;
+ int t = 15;

if (F1) {
t *= 2;
10 changes: 10 additions & 0 deletions FunctionAccumulating/hot_code.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: "Marks the function hot_function() as hot code."
include_revisions:
revision_range:
start: 2036239cdbc2210f19e2bcabe75f23d217c0a9d4
end: HEAD
path: hot_code.patch
project_name: FunctionAccumulating
shortname: hot_code
tags:
- perf_region
28 changes: 28 additions & 0 deletions FunctionAccumulating/hot_code.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff --git a/projects/PerformanceInteractionDetection/FunctionAccumulating/main.cpp b/projects/PerformanceInteractionDetection/FunctionAccumulating/main.cpp
index 7f90a9a..ade0457 100644
--- a/projects/PerformanceInteractionDetection/FunctionAccumulating/main.cpp
+++ b/projects/PerformanceInteractionDetection/FunctionAccumulating/main.cpp
@@ -9,17 +9,23 @@ bool __attribute__((feature_variable("F2"))) F2;
bool __attribute__((feature_variable("F3"))) F3;


+___REGION_START __RT_High "hot_code"
void function1(int r) {
fp_util::sleep_for_millisecs(3000 + r * 100);
}
+___REGION_END __RT_High "hot_code"

+___REGION_START __RT_High "hot_code"
void function2(int s) {
fp_util::sleep_for_millisecs(3000 + s * 100);
}
+___REGION_END __RT_High "hot_code"

+___REGION_START __RT_High "hot_code"
void function3(int t) {
fp_util::sleep_for_millisecs(3000 + t * 100);
}
+___REGION_END __RT_High "hot_code"

int main(int argc, char *argv[]) {
F1 = fp_util::isFeatureEnabled(argc, argv, "--f1");
11 changes: 11 additions & 0 deletions FunctionAccumulating/regression1.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
description: "Insert regression."
include_revisions:
revision_range:
start: 2036239cdbc2210f19e2bcabe75f23d217c0a9d4
end: HEAD
path: regression1.patch
project_name: FunctionAccumulating
shortname: regression1
tags:
- regression
- perf_prec
13 changes: 13 additions & 0 deletions FunctionAccumulating/regression1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/projects/PerformanceInteractionDetection/FunctionAccumulating/main.cpp b/projects/PerformanceInteractionDetection/FunctionAccumulating/main.cpp
index 9a0e036..91fb7e5 100644
--- a/projects/PerformanceInteractionDetection/FunctionAccumulating/main.cpp
+++ b/projects/PerformanceInteractionDetection/FunctionAccumulating/main.cpp
@@ -26,7 +26,7 @@ int main(int argc, char *argv[]) {
F2 = fp_util::isFeatureEnabled(argc, argv, "--f2");
F3 = fp_util::isFeatureEnabled(argc, argv, "--f3");

- int r = 10;
+ int r = 15;
int s = 10;
int t = 10;

11 changes: 11 additions & 0 deletions FunctionAccumulating/regression2.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
description: "Insert regression."
include_revisions:
revision_range:
start: 2036239cdbc2210f19e2bcabe75f23d217c0a9d4
end: HEAD
path: regression2.patch
project_name: FunctionAccumulating
shortname: regression2
tags:
- regression
- perf_prec
15 changes: 15 additions & 0 deletions FunctionAccumulating/regression2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/projects/PerformanceInteractionDetection/FunctionAccumulating/main.cpp b/projects/PerformanceInteractionDetection/FunctionAccumulating/main.cpp
index 9a0e036..c2d8dd7 100644
--- a/projects/PerformanceInteractionDetection/FunctionAccumulating/main.cpp
+++ b/projects/PerformanceInteractionDetection/FunctionAccumulating/main.cpp
@@ -26,8 +26,8 @@ int main(int argc, char *argv[]) {
F2 = fp_util::isFeatureEnabled(argc, argv, "--f2");
F3 = fp_util::isFeatureEnabled(argc, argv, "--f3");

- int r = 10;
- int s = 10;
+ int r = 15;
+ int s = 15;
int t = 10;

if (F1) {
11 changes: 11 additions & 0 deletions FunctionAccumulating/regression3.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
description: "Insert regression."
include_revisions:
revision_range:
start: 2036239cdbc2210f19e2bcabe75f23d217c0a9d4
end: HEAD
path: regression3.patch
project_name: FunctionAccumulating
shortname: regression3
tags:
- regression
- perf_prec
17 changes: 17 additions & 0 deletions FunctionAccumulating/regression3.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/projects/PerformanceInteractionDetection/FunctionAccumulating/main.cpp b/projects/PerformanceInteractionDetection/FunctionAccumulating/main.cpp
index 9a0e036..b606850 100644
--- a/projects/PerformanceInteractionDetection/FunctionAccumulating/main.cpp
+++ b/projects/PerformanceInteractionDetection/FunctionAccumulating/main.cpp
@@ -26,9 +26,9 @@ int main(int argc, char *argv[]) {
F2 = fp_util::isFeatureEnabled(argc, argv, "--f2");
F3 = fp_util::isFeatureEnabled(argc, argv, "--f3");

- int r = 10;
- int s = 10;
- int t = 10;
+ int r = 15;
+ int s = 15;
+ int t = 15;

if (F1) {
function1(r);
10 changes: 10 additions & 0 deletions FunctionMultiple/hot_code.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: "Marks the function hot_function() as hot code."
include_revisions:
revision_range:
start: 2036239cdbc2210f19e2bcabe75f23d217c0a9d4
end: HEAD
path: hot_code.patch
project_name: FunctionMultiple
shortname: hot_code
tags:
- perf_region
20 changes: 20 additions & 0 deletions FunctionMultiple/hot_code.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/projects/PerformanceInteractionDetection/FunctionMultiple/main.cpp b/projects/PerformanceInteractionDetection/FunctionMultiple/main.cpp
index 3eaddca..b6941b3 100644
--- a/projects/PerformanceInteractionDetection/FunctionMultiple/main.cpp
+++ b/projects/PerformanceInteractionDetection/FunctionMultiple/main.cpp
@@ -16,6 +16,7 @@ bool function1(int s) {
return false;
}

+___REGION_START __RT_High "hot_code"
void function2(bool b, int t) {
if (b) {
fp_util::sleep_for_millisecs(t * 100);
@@ -23,6 +24,7 @@ void function2(bool b, int t) {
fp_util::sleep_for_millisecs(1000);
}
}
+___REGION_END __RT_High "hot_code"

void function3() {
fp_util::sleep_for_millisecs(1000);
11 changes: 11 additions & 0 deletions FunctionMultiple/regression1.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
description: "Insert regression."
include_revisions:
revision_range:
start: 2036239cdbc2210f19e2bcabe75f23d217c0a9d4
end: HEAD
path: regression1.patch
project_name: FunctionMultiple
shortname: regression1
tags:
- regression
- perf_prec
13 changes: 13 additions & 0 deletions FunctionMultiple/regression1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/projects/PerformanceInteractionDetection/FunctionMultiple/main.cpp b/projects/PerformanceInteractionDetection/FunctionMultiple/main.cpp
index 70137b9..eda7b1e 100644
--- a/projects/PerformanceInteractionDetection/FunctionMultiple/main.cpp
+++ b/projects/PerformanceInteractionDetection/FunctionMultiple/main.cpp
@@ -32,7 +32,7 @@ int main(int argc, char *argv[]) {
F2 = fp_util::isFeatureEnabled(argc, argv, "--f2");
F3 = fp_util::isFeatureEnabled(argc, argv, "--f3");

- int s = 10;
+ int s = 15;
int t = 10;
bool b = false;

11 changes: 11 additions & 0 deletions FunctionMultiple/regression2.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
description: "Insert regression."
include_revisions:
revision_range:
start: 2036239cdbc2210f19e2bcabe75f23d217c0a9d4
end: HEAD
path: regression2.patch
project_name: FunctionMultiple
shortname: regression2
tags:
- regression
- perf_prec
13 changes: 13 additions & 0 deletions FunctionMultiple/regression2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/projects/PerformanceInteractionDetection/FunctionMultiple/main.cpp b/projects/PerformanceInteractionDetection/FunctionMultiple/main.cpp
index 70137b9..319a985 100644
--- a/projects/PerformanceInteractionDetection/FunctionMultiple/main.cpp
+++ b/projects/PerformanceInteractionDetection/FunctionMultiple/main.cpp
@@ -33,7 +33,7 @@ int main(int argc, char *argv[]) {
F3 = fp_util::isFeatureEnabled(argc, argv, "--f3");

int s = 10;
- int t = 10;
+ int t = 15;
bool b = false;

if (F1) {
11 changes: 11 additions & 0 deletions FunctionMultiple/regression3.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
description: "Insert regression."
include_revisions:
revision_range:
start: 2036239cdbc2210f19e2bcabe75f23d217c0a9d4
end: HEAD
path: regression3.patch
project_name: FunctionMultiple
shortname: regression3
tags:
- regression
- perf_prec
15 changes: 15 additions & 0 deletions FunctionMultiple/regression3.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/projects/PerformanceInteractionDetection/FunctionMultiple/main.cpp b/projects/PerformanceInteractionDetection/FunctionMultiple/main.cpp
index 70137b9..a2d4881 100644
--- a/projects/PerformanceInteractionDetection/FunctionMultiple/main.cpp
+++ b/projects/PerformanceInteractionDetection/FunctionMultiple/main.cpp
@@ -32,8 +32,8 @@ int main(int argc, char *argv[]) {
F2 = fp_util::isFeatureEnabled(argc, argv, "--f2");
F3 = fp_util::isFeatureEnabled(argc, argv, "--f3");

- int s = 10;
- int t = 10;
+ int s = 15;
+ int t = 15;
bool b = false;

if (F1) {
10 changes: 10 additions & 0 deletions FunctionSingle/hot_code.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: "Marks the function hot_function() as hot code."
include_revisions:
revision_range:
start: 2036239cdbc2210f19e2bcabe75f23d217c0a9d4
end: HEAD
path: hot_code.patch
project_name: FunctionSingle
shortname: hot_code
tags:
- perf_region
16 changes: 16 additions & 0 deletions FunctionSingle/hot_code.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/projects/PerformanceInteractionDetection/FunctionSingle/main.cpp b/projects/PerformanceInteractionDetection/FunctionSingle/main.cpp
index 4e491d0..13c89b8 100644
--- a/projects/PerformanceInteractionDetection/FunctionSingle/main.cpp
+++ b/projects/PerformanceInteractionDetection/FunctionSingle/main.cpp
@@ -9,9 +9,11 @@ bool __attribute__((feature_variable("F2"))) F2;
bool __attribute__((feature_variable("F3"))) F3;


+___REGION_END __RT_High "hot_code"
void function1(int t) {
fp_util::sleep_for_millisecs(1000 + t * 100);
}
+___REGION_START __RT_High "hot_code"

void function2() {
fp_util::sleep_for_millisecs(1000);
11 changes: 11 additions & 0 deletions FunctionSingle/regression.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
description: "Insert regression."
include_revisions:
revision_range:
start: 2036239cdbc2210f19e2bcabe75f23d217c0a9d4
end: HEAD
path: regression.patch
project_name: FunctionSingle
shortname: regression
tags:
- regression
- perf_prec
13 changes: 13 additions & 0 deletions FunctionSingle/regression.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/projects/PerformanceInteractionDetection/FunctionSingle/main.cpp b/projects/PerformanceInteractionDetection/FunctionSingle/main.cpp
index 6414bfb..bd8fb0d 100644
--- a/projects/PerformanceInteractionDetection/FunctionSingle/main.cpp
+++ b/projects/PerformanceInteractionDetection/FunctionSingle/main.cpp
@@ -26,7 +26,7 @@ int main(int argc, char *argv[]) {
F2 = fp_util::isFeatureEnabled(argc, argv, "--f2");
F3 = fp_util::isFeatureEnabled(argc, argv, "--f3");

- int t = 10;
+ int t = 15;

if (F1) {
function1(t);
Loading
Loading