diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 91f9060..37d91db 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -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" } diff --git a/.env b/.env index 25bcbe5..b79098b 100644 --- a/.env +++ b/.env @@ -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 diff --git a/.vscode/launch.json b/.vscode/launch.json index 670e39e..1654267 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -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 + } + ] + } + ] } \ No newline at end of file diff --git a/debuglog.txt b/debuglog.txt deleted file mode 100755 index e69de29..0000000 diff --git a/runtime/Makefile b/runtime/Makefile index bfce289..0c9be7c 100644 --- a/runtime/Makefile +++ b/runtime/Makefile @@ -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 diff --git a/runtime/src/module.c b/runtime/src/module.c index 521ed5c..45c1887 100644 --- a/runtime/src/module.c +++ b/runtime/src/module.c @@ -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;