fix a bug of moudle.c

tree
hwwang 8 months ago
parent a6e464db44
commit bc6a861e77

@ -25,5 +25,5 @@
"workspaceMount": "source=${localWorkspaceFolder},target=/sledge,type=bind,consistency=cached",
"workspaceFolder": "/sledge",
"postCreateCommand": "make -C /sledge install && make -B -C /sledge/runtime/tests clean all",
"containerUser": "dev",
"containerUser": "dev"
}

@ -1,3 +1,2 @@
LD_LIBRARY_PATH=/home/hai/sledge-serverless-framework/runtime/bin
SLEDGE_SCHEDULER=EDF
SLEDGE_SANDBOX_PERF_LOG=/home/hai/sledge-serverless-framework/debuglog.txt

121
.vscode/launch.json vendored

@ -1,52 +1,73 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Hyde",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/runtime/bin/sledgert",
"args": [
"${workspaceFolder}/runtime/experiments/applications/ocr/hyde/spec.json"
],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"envFile": "${workspaceFolder}/.env",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "Preemption",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/runtime/bin/sledgert",
"args": [
"${workspaceFolder}/runtime/experiments/preemption/spec.json"
],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"envFile": "${workspaceFolder}/.env",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
"version": "0.2.0",
"configurations": [
{
"name": "Hyde",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/runtime/bin/sledgert",
"args": [
"${workspaceFolder}/runtime/experiments/applications/ocr/hyde/spec.json"
],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [
{
"name": "SLEDGE_SANDBOX_PERF_LOG",
"value": "${workspaceFolder}/debug.log"
}
],
"externalConsole": false,
"MIMode": "gdb",
"envFile": "${workspaceFolder}/.env",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "Preemption",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/runtime/bin/sledgert",
"args": [
"${workspaceFolder}/runtime/experiments/preemption/spec.json"
],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"envFile": "${workspaceFolder}/.env",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "C/C++ Runner: Debug Session",
"type": "cppdbg",
"request": "launch",
"args": [],
"stopAtEntry": false,
"externalConsole": false,
"cwd": "/home/hai/sledge-serverless-framework/runtime/src",
"program": "/home/hai/sledge-serverless-framework/runtime/src/build/Debug/outDebug",
"MIMode": "gdb",
"miDebuggerPath": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}

@ -59,7 +59,7 @@ CFLAGS += -DLOG_TO_FILE
# CFLAGS += -DLOG_PREEMPTION
# CFLAGS += -DLOG_MODULE_LOADING
# CFLAGS += -DOPT_AVOID_GLOBAL_QUEUE
# CFLAGS += -DLOG_RUNTIME_FILE_LOG
CFLAGS += -DLOG_RUNTIME_FILE_LOG
CFLAGS += -DLOG_RUNTIME_MEM_LOG
# This dumps per module *.csv files containing the cycle a sandbox has been in RUNNING when each

@ -602,7 +602,14 @@ module_new_from_json(char *file_name)
if (module == NULL) goto module_new_err;
assert(module);
if(is_tail_module) module->is_parent = true;
if(is_tail_module)
{
module->is_parent = true;
}else
{
module->is_parent = false;
}
nodes[i] = module;
// if (tail_module != NULL) { tail_module->next_module = module; }
// tail_module = module;

Loading…
Cancel
Save