Skip to content

Commit

Permalink
Merge branch 'fix-ftrace-frame' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
flhofer committed Nov 23, 2024
2 parents 27466d9 + fc4fe71 commit aa9c44d
Show file tree
Hide file tree
Showing 19 changed files with 187 additions and 74 deletions.
5 changes: 3 additions & 2 deletions .cproject
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildProperties="" description="Use ubuntu container for build" id="cdt.managedbuild.toolchain.gnu.base.1021997169.326856783" name="Ubuntu [latest]" optionalBuildProperties="org.eclipse.cdt.docker.launcher.containerbuild.property.enablement=true,org.eclipse.cdt.docker.launcher.containerbuild.property.dockerdpath=,org.eclipse.cdt.docker.launcher.containerbuild.property.volumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.connection=unix:///var/run/docker.sock,org.eclipse.cdt.docker.launcher.containerbuild.property.selectedvolumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.image=ubuntubuild:latest" parent="org.eclipse.cdt.build.core.emptycfg">
<configuration artifactName="${ProjName}" buildProperties="" description="Use ubuntu container for build" id="cdt.managedbuild.toolchain.gnu.base.1021997169.326856783" name="Ubuntu [latest]" optionalBuildProperties="org.eclipse.cdt.docker.launcher.containerbuild.property.enablement=true,org.eclipse.cdt.docker.launcher.containerbuild.property.dockerdpath=,org.eclipse.cdt.docker.launcher.containerbuild.property.selectedvolumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.volumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.image=ubuntubuild:latest,org.eclipse.cdt.docker.launcher.containerbuild.property.connection=unix:///var/run/docker.sock" parent="org.eclipse.cdt.build.core.emptycfg">
<folderInfo id="cdt.managedbuild.toolchain.gnu.base.1021997169.326856783." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.base.1407320482" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.base">
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.GNU_ELF;org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.base.1852700474" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
<builder autoBuildTarget="all" cleanBuildTarget="clean" enableAutoBuild="false" enableCleanBuild="true" enabledIncrementalBuild="true" id="cdt.managedbuild.target.gnu.builder.base.541032315" incrementalBuildTarget="orchestrator test DEBUG=1" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.target.gnu.builder.base"/>
<builder id="cdt.managedbuild.target.gnu.builder.base.418324816" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.base"/>
<tool id="cdt.managedbuild.tool.gnu.archiver.base.1878979420" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.1311377804" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base">
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.567799295" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
Expand Down Expand Up @@ -97,6 +97,7 @@
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope" versionNumber="2">
<configuration configurationName="Alpine [latest]"/>
<configuration configurationName="Ubuntu [latest]">
<resource resourceType="PROJECT" workspacePath="/real-time-containers"/>
</configuration>
Expand Down
4 changes: 2 additions & 2 deletions .settings/language.settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuildCommandParser" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser" keep-relative-paths="false" name="CDT GCC Build Output Parser" parameter="(g?cc)|([gc]\+\+)|(clang)" prefer-non-shared="true"/>
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-439297954633471277" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-438430545746847277" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
Expand All @@ -17,7 +17,7 @@
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuildCommandParser" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser" keep-relative-paths="false" name="CDT GCC Build Output Parser" parameter="(g?cc)|([gc]\+\+)|(clang)" prefer-non-shared="true"/>
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-439297954633471277" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-438430545746847277" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
Expand Down
4 changes: 3 additions & 1 deletion .settings/org.eclipse.cdt.codan.core.prefs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem.params={lau
org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem=Error
org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Assignment to itself\\")"}
org.eclipse.cdt.codan.internal.checkers.BlacklistProblem=-Warning
org.eclipse.cdt.codan.internal.checkers.BlacklistProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Function or method is blacklisted\\")",blacklist\=>()}
org.eclipse.cdt.codan.internal.checkers.BlacklistProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"The use of function or method is denied\\")",blacklist\=>()}
org.eclipse.cdt.codan.internal.checkers.CStyleCastProblem=-Warning
org.eclipse.cdt.codan.internal.checkers.CStyleCastProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"C-Style cast instead of C++ cast\\")",checkMacro\=>true}
org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem=Warning
Expand Down Expand Up @@ -97,6 +97,8 @@ org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem=Warning
org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Suspicious semicolon\\")",else\=>false,afterelse\=>false}
org.eclipse.cdt.codan.internal.checkers.SymbolShadowingProblem=-Warning
org.eclipse.cdt.codan.internal.checkers.SymbolShadowingProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Symbol shadowing\\")",paramFuncParameters\=>true}
org.eclipse.cdt.codan.internal.checkers.TemplateInstantiationProblem=Error
org.eclipse.cdt.codan.internal.checkers.TemplateInstantiationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Function cannot be instantiated\\")"}
org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem=Error
org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Type cannot be resolved\\")"}
org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem=Warning
Expand Down
5 changes: 4 additions & 1 deletion src/include/error.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@
#include <string.h>

#if DEBUG
extern FILE * dbg_out; // debug output file, defined in main
extern FILE * dbg_out; // debug output file, defined in main
extern FILE * stats_out; // debug output file, defined in main
#define printDbg(...) (void)fprintf (dbg_out, __VA_ARGS__)
#define printStat(...) (void)fprintf (stats_out, __VA_ARGS__)
#else
#define printDbg(...) //
#define printStat(...) //
#endif

// Common standard printing definitions
Expand Down
18 changes: 16 additions & 2 deletions src/lib/parse_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,9 @@ static void parse_images(struct json_object *images, containers_t *conts)
/// Return value: no return value, exits on error
void parse_dockerfileprefix(prgset_t *set)
{
if (!(set->cgroupfileprefix))
set->cgroupfileprefix = strdup("/sys/fs/cgroup/");

set->cpusetdfileprefix = malloc(strlen(set->cgroupfileprefix) + strlen(CGRP_CSET) + strlen(set->cont_cgrp)+1);
if (!set->cpusetdfileprefix)
err_exit("Could not allocate memory");
Expand Down Expand Up @@ -483,9 +486,20 @@ static void parse_global(struct json_object *global, prgset_t *set)
if (!set->procfileprefix)
set->procfileprefix = get_string_value_from(global, "prc_kernel", TRUE,
"/proc/sys/kernel/");
if (!set->cgroupfileprefix)
set->cgroupfileprefix = get_string_value_from(global, "sys_cgroup", TRUE,
{
// default may be set already in parse_dockerfileprefix
char *prefix = get_string_value_from(global, "sys_cgroup", TRUE,
"/sys/fs/cgroup/");

if (!(set->cgroupfileprefix) || (strcmp(set->cgroupfileprefix, prefix))){
free(set->cgroupfileprefix);
set->cgroupfileprefix = prefix;
if (set->cont_cgrp)
parse_dockerfileprefix(set);
}
else
free(prefix);
}
if (!set->cpusystemfileprefix)
set->cpusystemfileprefix = get_string_value_from(global, "sys_cpu", TRUE,
"/sys/devices/system/cpu/");
Expand Down
8 changes: 7 additions & 1 deletion src/lib/runstats.c
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,7 @@ runstats_histFit(stat_hist **h)

gsl_histogram_free(*h); // clear all because of out of range, force re-init
*h = NULL; // reset variable
err_msg("Mean out of boundaries!");
return GSL_EDOM; // out of range
}

Expand All @@ -636,7 +637,12 @@ runstats_histFit(stat_hist **h)
double bin_min = MAX(0.0, mn - ((double)new_n/2.0)*W); // no negative values
double bin_max = mn + ((double)new_n/2.0)*W;

if (n != new_n){
// if ((n == new_n)
// && ()){
//
// }

if (n != new_n){
// if bin count differs, reallocate
gsl_histogram_free (*h);
n = new_n;
Expand Down
6 changes: 3 additions & 3 deletions src/orchestrator/adaptive.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ adaptPlanSchedule(){
unmatched++;
else {
// allocate resources for flexible tasks
trc= checkPeriod(res->item->attr, res->item->rscs->affinity);
trc= checkPeriod(res->item->attr, res->item->rscs->affinity, -1);
if (trc){
(void)checkUvalue(trc, res->item->attr, 1);
res->assigned = trc;
Expand All @@ -394,7 +394,7 @@ adaptPlanSchedule(){
unmatched++;
else {
// allocate resources for flexible tasks
trc= checkPeriod(res->item->attr, res->item->rscs->affinity);
trc= checkPeriod(res->item->attr, res->item->rscs->affinity, -1);
if (trc){
(void)checkUvalue(trc, res->item->attr, 1);
res->assigned = trc;
Expand Down Expand Up @@ -471,7 +471,7 @@ adaptScramble(){
if (!(res->assigned) ||(res->item->status & MSK_STATCFIX))
continue;

trc = checkPeriod(res->item->attr, res->item->rscs->affinity);
trc = checkPeriod(res->item->attr, res->item->rscs->affinity, -1);
// found a better option?
if (trc && (trc != res->assigned)){
// recompute and add
Expand Down
Loading

0 comments on commit aa9c44d

Please sign in to comment.