diff --git a/.vscode/launch.json b/.vscode/launch.json index 890eebe..b9e1f77 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -8,9 +8,10 @@ "name": "Cmake Debug Target", "type": "lldb", "request": "launch", - "program": "${cmake.testProgram}", + "program": "/usr/workspace/haridev/dftracer/build/bin/test_cpp", "args": [ - "${cmake.testArgs}" + "/usr/workspace/haridev/dftracer/build/test/data", + "1" ], "cwd": "${workspaceFolder}/build", "env": { diff --git a/dfanalyzer/main.py b/dfanalyzer/main.py index 8e69cee..4504977 100644 --- a/dfanalyzer/main.py +++ b/dfanalyzer/main.py @@ -175,23 +175,35 @@ def load_objects(line, fn, time_granularity, time_approximate, condition_fn, loa if "tid" in val: d["tid"] = val["tid"] if "args" in val and "hhash" in val["args"]: - d["hhash"] = val["args"]["hhash"] + if type(val["args"]["hhash"]) is str: + d["hhash"] = int(val["args"]["hhash"],16) + else: + d["hhash"] = val["args"]["hhash"] if "M" == val["ph"]: if d["name"] == "FH": d["type"] = 1 # 1-> file hash if "args" in val and "name" in val["args"] and "value" in val["args"]: d["name"] = val["args"]["name"] - d["hash"] = val["args"]["value"] + if type(val["args"]["value"]) is str: + d["hash"] = int(val["args"]["value"],16) + else: + d["hash"] = val["args"]["value"] elif d["name"] == "HH": d["type"] = 2 # 2-> hostname hash if "args" in val and "name" in val["args"] and "value" in val["args"]: d["name"] = val["args"]["name"] - d["hash"] = val["args"]["value"] + if type(val["args"]["value"]) is str: + d["hash"] = int(val["args"]["value"],16) + else: + d["hash"] = val["args"]["value"] elif d["name"] == "SH": d["type"] = 3 # 3-> string hash if "args" in val and "name" in val["args"] and "value" in val["args"]: d["name"] = val["args"]["name"] - d["hash"] = val["args"]["value"] + if type(val["args"]["value"]) is str: + d["hash"] = int(val["args"]["value"],16) + else: + d["hash"] = val["args"]["value"] elif d["name"] == "PR": d["type"] = 5 # 5-> process metadata if "args" in val and "name" in val["args"] and "value" in val["args"]: @@ -267,8 +279,10 @@ def io_function(json_object, current_dict, time_approximate,condition_fn): d["io_time"] = I.to_string(I.empty()) if "args" in json_object: if "fhash" in json_object["args"]: - d["fhash"] = json_object["args"]["fhash"] - + if type(json_object["args"]["fhash"]) is str: + d["fhash"] = int(json_object["args"]["fhash"],16) + else: + d["fhash"] = json_object["args"]["fhash"] if "POSIX" == json_object["cat"] and "ret" in json_object["args"]: size = int(json_object["args"]["ret"]) if size > 0: @@ -290,7 +304,7 @@ def io_columns(): 'io_time': "string[pyarrow]" if not conf.time_approximate else "uint64[pyarrow]", 'app_io_time': "string[pyarrow]" if not conf.time_approximate else "uint64[pyarrow]", 'total_time': "string[pyarrow]" if not conf.time_approximate else "uint64[pyarrow]", - 'fhash': "uint32[pyarrow]", + 'fhash': "uint64[pyarrow]", 'phase': "uint16[pyarrow]", 'size': "uint64[pyarrow]" } diff --git a/examples/dfanalyzer/dfanalyzer.ipynb b/examples/dfanalyzer/dfanalyzer.ipynb index 1dc2973..4fdb5a1 100644 --- a/examples/dfanalyzer/dfanalyzer.ipynb +++ b/examples/dfanalyzer/dfanalyzer.ipynb @@ -156,7 +156,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "[INFO] [19:32:21] Initialized Client with 4 workers and link http://127.0.0.1:45919/status [/usr/WS2/haridev/dftracer/dfanalyzer/main.py:754]\n" + "[INFO] [14:58:55] Initialized Client with 4 workers and link http://127.0.0.1:8787/status [/usr/WS2/haridev/dftracer/dfanalyzer/main.py:770]\n" ] } ], @@ -184,7 +184,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 15, "id": "236e50a4-03b6-4895-a0a5-d473f5e391b5", "metadata": { "scrolled": true @@ -194,17 +194,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "2024-10-02 19:32:22,114 - distributed.nanny - WARNING - Restarting worker\n", - "2024-10-02 19:32:22,143 - distributed.nanny - WARNING - Restarting worker\n", - "2024-10-02 19:32:22,164 - distributed.nanny - WARNING - Restarting worker\n", - "2024-10-02 19:32:22,169 - distributed.nanny - WARNING - Restarting worker\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "[INFO] [19:32:23] Restarting all workers [/usr/WS2/haridev/dftracer/dfanalyzer/main.py:742]\n" + "[INFO] [15:01:44] Restarting all workers [/usr/WS2/haridev/dftracer/dfanalyzer/main.py:760]\n" ] } ], @@ -224,7 +214,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 16, "id": "b37727ee-a221-43ab-81e1-cdf98c2cf314", "metadata": { "scrolled": true @@ -234,16 +224,16 @@ "name": "stderr", "output_type": "stream", "text": [ - "[INFO] [19:32:25] Created index for 48 files [/usr/WS2/haridev/dftracer/dfanalyzer/main.py:410]\n", - "[INFO] [19:32:25] Total size of all files are bytes [/usr/WS2/haridev/dftracer/dfanalyzer/main.py:412]\n", - "[INFO] [19:32:25] Loading 48 batches out of 48 files and has 316798 lines overall [/usr/WS2/haridev/dftracer/dfanalyzer/main.py:425]\n", - "[INFO] [19:32:36] Loaded events [/usr/WS2/haridev/dftracer/dfanalyzer/main.py:492]\n", - "[INFO] [19:32:36] Loaded plots with slope threshold: 45 [/usr/WS2/haridev/dftracer/dfanalyzer/main.py:498]\n" + "[INFO] [15:01:46] Created index for 1 files [/usr/WS2/haridev/dftracer/dfanalyzer/main.py:428]\n", + "[INFO] [15:01:46] Total size of all files are bytes [/usr/WS2/haridev/dftracer/dfanalyzer/main.py:430]\n", + "[INFO] [15:01:48] Loading 1 batches out of 1 files and has 30 lines overall [/usr/WS2/haridev/dftracer/dfanalyzer/main.py:443]\n", + "[INFO] [15:01:49] Loaded events [/usr/WS2/haridev/dftracer/dfanalyzer/main.py:510]\n", + "[INFO] [15:01:49] Loaded plots with slope threshold: 45 [/usr/WS2/haridev/dftracer/dfanalyzer/main.py:516]\n" ] } ], "source": [ - "analyzer = DFAnalyzer(f\"{app_root}/examples/dfanalyzer/test-trace-distributed/cm1_1_48_20240926/*.gz\")" + "analyzer = DFAnalyzer(f\"/usr/workspace/haridev/dftracer/build/test/*.gz\")" ] }, { @@ -259,7 +249,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 17, "id": "4c0ffe10", "metadata": {}, "outputs": [ @@ -294,7 +284,6 @@ " dur\n", " tinterval\n", " trange\n", - " hhash\n", " compute_time\n", " io_time\n", " app_io_time\n", @@ -303,6 +292,7 @@ " phase\n", " size\n", " hash\n", + " hhash\n", " value\n", " \n", " \n", @@ -312,14 +302,13 @@ " start\n", " dftracer\n", " 0\n", - " 3537829\n", - " 3537829\n", - " 67327\n", - " 67327\n", + " 3562915\n", + " 3562915\n", + " 0\n", + " 0\n", " 0\n", " <NA>\n", " 0\n", - " 5692\n", " <NA>\n", " <NA>\n", " <NA>\n", @@ -328,98 +317,99 @@ " 0\n", " <NA>\n", " <NA>\n", + " 8770596893269328381\n", " <NA>\n", " \n", " \n", " 6\n", - " fopen\n", - " STDIO\n", + " CUSTOM_BLOCK\n", + " CPP_APP\n", " 0\n", - " 3537829\n", - " 3537829\n", - " 71265\n", - " 71499\n", - " 234\n", + " 3562915\n", + " 3562915\n", + " 13117\n", + " 14186\n", + " 1069\n", " <NA>\n", " 0\n", - " 5692\n", " <NA>\n", " <NA>\n", " <NA>\n", " 0\n", - " 33084\n", + " <NA>\n", " 0\n", " <NA>\n", " <NA>\n", + " 8770596893269328381\n", " <NA>\n", " \n", " \n", " 7\n", - " fread\n", - " STDIO\n", + " CUSTOM\n", + " CPP_APP\n", " 0\n", - " 3537829\n", - " 3537829\n", - " 71525\n", - " 71534\n", - " 9\n", + " 3562915\n", + " 3562915\n", + " 12035\n", + " 14232\n", + " 2197\n", " <NA>\n", " 0\n", - " 5692\n", " <NA>\n", " <NA>\n", " <NA>\n", " 0\n", - " 33084\n", + " <NA>\n", " 0\n", " <NA>\n", " <NA>\n", + " 8770596893269328381\n", " <NA>\n", " \n", " \n", " 8\n", - " fread\n", - " STDIO\n", + " foo\n", + " CPP_APP\n", " 0\n", - " 3537829\n", - " 3537829\n", - " 71569\n", - " 71571\n", - " 2\n", + " 3562915\n", + " 3562915\n", + " 10960\n", + " 14251\n", + " 3291\n", " <NA>\n", " 0\n", - " 5692\n", " <NA>\n", " <NA>\n", " <NA>\n", " 0\n", - " 33084\n", + " <NA>\n", " 0\n", " <NA>\n", " <NA>\n", + " 8770596893269328381\n", " <NA>\n", " \n", " \n", - " 9\n", - " fclose\n", + " 10\n", + " fopen\n", " STDIO\n", " 0\n", - " 3537829\n", - " 3537829\n", - " 71580\n", - " 71583\n", - " 3\n", + " 3562915\n", + " 3562915\n", + " 17774\n", + " 19748\n", + " 1974\n", " <NA>\n", " 0\n", - " 5692\n", " <NA>\n", " <NA>\n", " <NA>\n", " 0\n", - " 33084\n", + " 13134042296031641600\n", " 0\n", " <NA>\n", " <NA>\n", + " 8770596893269328381\n", " <NA>\n", " \n", " \n", @@ -427,29 +417,29 @@ "" ], "text/plain": [ - " name cat type pid tid ts te dur tinterval \\\n", - "4 start dftracer 0 3537829 3537829 67327 67327 0 \n", - "6 fopen STDIO 0 3537829 3537829 71265 71499 234 \n", - "7 fread STDIO 0 3537829 3537829 71525 71534 9 \n", - "8 fread STDIO 0 3537829 3537829 71569 71571 2 \n", - "9 fclose STDIO 0 3537829 3537829 71580 71583 3 \n", + " name cat type pid tid ts te dur \\\n", + "4 start dftracer 0 3562915 3562915 0 0 0 \n", + "6 CUSTOM_BLOCK CPP_APP 0 3562915 3562915 13117 14186 1069 \n", + "7 CUSTOM CPP_APP 0 3562915 3562915 12035 14232 2197 \n", + "8 foo CPP_APP 0 3562915 3562915 10960 14251 3291 \n", + "10 fopen STDIO 0 3562915 3562915 17774 19748 1974 \n", "\n", - " trange hhash compute_time io_time app_io_time total_time fhash \\\n", - "4 0 5692 0 \n", - "6 0 5692 0 33084 \n", - "7 0 5692 0 33084 \n", - "8 0 5692 0 33084 \n", - "9 0 5692 0 33084 \n", + " tinterval trange compute_time io_time app_io_time total_time \\\n", + "4 0 0 \n", + "6 0 0 \n", + "7 0 0 \n", + "8 0 0 \n", + "10 0 0 \n", "\n", - " phase size hash value \n", - "4 0 \n", - "6 0 \n", - "7 0 \n", - "8 0 \n", - "9 0 " + " fhash phase size hash hhash value \n", + "4 0 8770596893269328381 \n", + "6 0 8770596893269328381 \n", + "7 0 8770596893269328381 \n", + "8 0 8770596893269328381 \n", + "10 13134042296031641600 0 8770596893269328381 " ] }, - "execution_count": 10, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } @@ -460,7 +450,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 18, "id": "b5e9d273", "metadata": {}, "outputs": [ @@ -486,48 +476,68 @@ " \n", " \n", " name\n", + " pid\n", + " tid\n", + " hhash\n", " \n", " \n", " hash\n", " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", " \n", - " 23\n", - " /usr/tce/backend/installations/linux-rhel8-x86...\n", - " \n", - " \n", - " 191\n", - " /sys/class/drm/card5/device/serial_number\n", + " 4934138233606702080\n", + " /usr/workspace/haridev/dftracer/build/test/data\n", + " 3562915\n", + " 3562915\n", + " 8770596893269328381\n", " \n", " \n", - " 278\n", - " /proc/3537825/fd/39\n", + " 11997177448727658496\n", + " /usr/workspace/haridev/dftracer/build/test/dat...\n", + " 3562915\n", + " 3562915\n", + " 8770596893269328381\n", " \n", " \n", - " 289\n", - " /usr/tce/backend/installations/linux-rhel8-x86...\n", + " 13134042296031641600\n", + " /usr/workspace/haridev/dftracer/build/test/dat...\n", + " 3562915\n", + " 3562915\n", + " 8770596893269328381\n", " \n", " \n", - " 569\n", - " /usr/lib64/hwloc/..\n", + " 16963829776176506880\n", + " /usr/workspace/haridev/dftracer/build/test/dat...\n", + " 3562915\n", + " 3562915\n", + " 8770596893269328381\n", " \n", " \n", "\n", "" ], "text/plain": [ - " name\n", - "hash \n", - "23 /usr/tce/backend/installations/linux-rhel8-x86...\n", - "191 /sys/class/drm/card5/device/serial_number\n", - "278 /proc/3537825/fd/39\n", - "289 /usr/tce/backend/installations/linux-rhel8-x86...\n", - "569 /usr/lib64/hwloc/.." + " name \\\n", + "hash \n", + "4934138233606702080 /usr/workspace/haridev/dftracer/build/test/data \n", + "11997177448727658496 /usr/workspace/haridev/dftracer/build/test/dat... \n", + "13134042296031641600 /usr/workspace/haridev/dftracer/build/test/dat... \n", + "16963829776176506880 /usr/workspace/haridev/dftracer/build/test/dat... \n", + "\n", + " pid tid hhash \n", + "hash \n", + "4934138233606702080 3562915 3562915 8770596893269328381 \n", + "11997177448727658496 3562915 3562915 8770596893269328381 \n", + "13134042296031641600 3562915 3562915 8770596893269328381 \n", + "16963829776176506880 3562915 3562915 8770596893269328381 " ] }, - "execution_count": 11, + "execution_count": 18, "metadata": {}, "output_type": "execute_result" } @@ -538,7 +548,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 19, "id": "e46df3b8", "metadata": {}, "outputs": [ @@ -564,28 +574,37 @@ " \n", " \n", " name\n", + " pid\n", + " tid\n", + " hhash\n", " \n", " \n", " hash\n", " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", " \n", - " 5692\n", - " corona173\n", + " 8770596893269327872\n", + " corona82\n", + " 3562915\n", + " 3562915\n", + " 8770596893269328381\n", " \n", " \n", "\n", "" ], "text/plain": [ - " name\n", - "hash \n", - "5692 corona173" + " name pid tid hhash\n", + "hash \n", + "8770596893269327872 corona82 3562915 3562915 8770596893269328381" ] }, - "execution_count": 12, + "execution_count": 19, "metadata": {}, "output_type": "execute_result" } @@ -606,7 +625,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 20, "id": "543dfa22", "metadata": {}, "outputs": [ @@ -633,36 +652,39 @@ " \n", " name\n", " value\n", + " pid\n", + " tid\n", + " hhash\n", " \n", " \n", " \n", " \n", " 1\n", - " 3537829\n", + " 3562915\n", " thread_name\n", + " 3562915\n", + " 3562915\n", + " 8770596893269328381\n", " \n", " \n", - " 3744\n", - " rank\n", - " 45\n", - " \n", - " \n", - " 3745\n", - " Rank 45\n", - " process_name\n", + " 5\n", + " key\n", + " value\n", + " 3562915\n", + " 3562915\n", + " 8770596893269328381\n", " \n", " \n", "\n", "" ], "text/plain": [ - " name value\n", - "1 3537829 thread_name\n", - "3744 rank 45\n", - "3745 Rank 45 process_name" + " name value pid tid hhash\n", + "1 3562915 thread_name 3562915 3562915 8770596893269328381\n", + "5 key value 3562915 3562915 8770596893269328381" ] }, - "execution_count": 13, + "execution_count": 20, "metadata": {}, "output_type": "execute_result" } @@ -673,7 +695,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 21, "id": "9350218f", "metadata": {}, "outputs": [ @@ -681,7 +703,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "[INFO] [19:32:36] Total number of events in the workload are 284041 [/usr/WS2/haridev/dftracer/dfanalyzer/main.py:604]\n" + "[INFO] [15:02:00] Total number of events in the workload are 19 [/usr/WS2/haridev/dftracer/dfanalyzer/main.py:622]\n" ] }, { @@ -690,36 +712,32 @@ "
╭──────────────────────────────────────────────────── Summary ────────────────────────────────────────────────────╮\n",
                             "│  Allocation    Scheduler Allocation Details                                                                     │\n",
                             "│                ├── Nodes: 1                                                                                     │\n",
-                            "│                ├── Processes: 48                                                                                │\n",
+                            "│                ├── Processes: 1                                                                                 │\n",
                             "│                ├── Thread allocations across nodes (includes dynamically created threads)                       │\n",
                             "│                │   ├── Compute: 0                                                                               │\n",
-                            "│                │   └── I/O: 48                                                                                  │\n",
-                            "│                └── Events Recorded: 284K                                                                        │\n",
+                            "│                │   └── I/O: 1                                                                                   │\n",
+                            "│                └── Events Recorded: 19                                                                          │\n",
                             "│  Dataset       Description of Dataset Used                                                                      │\n",
-                            "│                └── Files: 2583                                                                                  │\n",
+                            "│                └── Files: 4                                                                                     │\n",
                             "│  I/O Behavior  Behavior of Application                                                                          │\n",
                             "│                ├── Split of Time in application                                                                 │\n",
-                            "│                │   ├── Total Time: 145.364 sec                                                                  │\n",
-                            "│                │   └── Overall I/O: 1.393 sec                                                                   │\n",
+                            "│                │   ├── Total Time: 0.129 sec                                                                    │\n",
+                            "│                │   └── Overall I/O: 0.092 sec                                                                   │\n",
                             "│                └── Metrics by function                                                                          │\n",
                             "│                    ├── Function       |count |                  size                   |                        │\n",
                             "│                    ├──                |      |min   |25    |mean  |median|75    |max   |                        │\n",
-                            "│                    ├── access         |672   |NA    |nan   |nan   |NA    |nan   |NA    |                        │\n",
-                            "│                    ├── opendir        |9K    |NA    |nan   |nan   |NA    |nan   |NA    |                        │\n",
-                            "│                    ├── __xstat        |47K   |NA    |nan   |nan   |NA    |nan   |NA    |                        │\n",
-                            "│                    ├── open           |22K   |NA    |nan   |nan   |NA    |nan   |NA    |                        │\n",
-                            "│                    ├── unlink         |192   |NA    |nan   |nan   |NA    |nan   |NA    |                        │\n",
-                            "│                    ├── read           |14K   |1     |7     |137   |14    |310   |7KB   |                        │\n",
-                            "│                    ├── close          |22K   |NA    |nan   |nan   |NA    |nan   |NA    |                        │\n",
-                            "│                    ├── mkdir          |76    |NA    |nan   |nan   |NA    |nan   |NA    |                        │\n",
-                            "│                    ├── ftruncate      |643   |NA    |nan   |nan   |NA    |nan   |NA    |                        │\n",
-                            "│                    ├── mmap           |576   |NA    |nan   |nan   |NA    |nan   |NA    |                        │\n",
-                            "│                    ├── readlink       |432   |NA    |nan   |nan   |NA    |nan   |NA    |                        │\n",
-                            "│                    ├── __fxstat       |3K    |NA    |nan   |nan   |NA    |nan   |NA    |                        │\n",
-                            "│                    ├── write          |112K  |1     |5KB   |6KB   |5KB   |5KB   |64KB  |                        │\n",
-                            "│                    ├── lseek          |224   |NA    |nan   |nan   |NA    |nan   |NA    |                        │\n",
-                            "│                    ├── fcntl          |96    |NA    |nan   |nan   |NA    |nan   |NA    |                        │\n",
-                            "│                    └── rmdir          |58    |NA    |nan   |nan   |NA    |nan   |NA    |                        │\n",
+                            "│                    ├── link           |1     |NA    |nan   |nan   |NA    |nan   |NA    |                        │\n",
+                            "│                    ├── unlink         |1     |NA    |nan   |nan   |NA    |nan   |NA    |                        │\n",
+                            "│                    ├── symlink        |1     |NA    |nan   |nan   |NA    |nan   |NA    |                        │\n",
+                            "│                    ├── chmod          |1     |NA    |nan   |nan   |NA    |nan   |NA    |                        │\n",
+                            "│                    ├── chown          |1     |NA    |nan   |nan   |NA    |nan   |NA    |                        │\n",
+                            "│                    ├── lchown         |1     |NA    |nan   |nan   |NA    |nan   |NA    |                        │\n",
+                            "│                    ├── utime          |1     |NA    |nan   |nan   |NA    |nan   |NA    |                        │\n",
+                            "│                    ├── mkfifo         |1     |NA    |nan   |nan   |NA    |nan   |NA    |                        │\n",
+                            "│                    ├── symlinkat      |1     |NA    |nan   |nan   |NA    |nan   |NA    |                        │\n",
+                            "│                    ├── chdir          |1     |NA    |nan   |nan   |NA    |nan   |NA    |                        │\n",
+                            "│                    ├── open           |1     |NA    |nan   |nan   |NA    |nan   |NA    |                        │\n",
+                            "│                    └── remove         |2     |NA    |nan   |nan   |NA    |nan   |NA    |                        │\n",
                             "╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n",
                             "
\n" ], @@ -727,36 +745,32 @@ "╭──────────────────────────────────────────────────── Summary ────────────────────────────────────────────────────╮\n", "│ \u001b[36m \u001b[0m\u001b[36mAllocation \u001b[0m\u001b[36m \u001b[0m Scheduler Allocation Details │\n", "│ \u001b[36m \u001b[0m ├── Nodes: 1 │\n", - "│ \u001b[36m \u001b[0m ├── Processes: 48 │\n", + "│ \u001b[36m \u001b[0m ├── Processes: 1 │\n", "│ \u001b[36m \u001b[0m ├── Thread allocations across nodes (includes dynamically created threads) │\n", "│ \u001b[36m \u001b[0m │ ├── Compute: 0 │\n", - "│ \u001b[36m \u001b[0m │ └── I/O: 48 │\n", - "│ \u001b[36m \u001b[0m └── Events Recorded: 284K │\n", + "│ \u001b[36m \u001b[0m │ └── I/O: 1 │\n", + "│ \u001b[36m \u001b[0m └── Events Recorded: 19 │\n", "│ \u001b[36m \u001b[0m\u001b[36mDataset \u001b[0m\u001b[36m \u001b[0m Description of Dataset Used │\n", - "│ \u001b[36m \u001b[0m └── Files: 2583 │\n", + "│ \u001b[36m \u001b[0m └── Files: 4 │\n", "│ \u001b[36m \u001b[0m\u001b[36mI/O Behavior\u001b[0m\u001b[36m \u001b[0m Behavior of Application │\n", "│ \u001b[36m \u001b[0m ├── Split of Time in application │\n", - "│ \u001b[36m \u001b[0m │ ├── Total Time: 145.364 sec │\n", - "│ \u001b[36m \u001b[0m │ └── Overall I/O: 1.393 sec │\n", + "│ \u001b[36m \u001b[0m │ ├── Total Time: 0.129 sec │\n", + "│ \u001b[36m \u001b[0m │ └── Overall I/O: 0.092 sec │\n", "│ \u001b[36m \u001b[0m └── Metrics by function │\n", "│ \u001b[36m \u001b[0m ├── Function |count | size | │\n", "│ \u001b[36m \u001b[0m ├── | |min |25 |mean |median|75 |max | │\n", - "│ \u001b[36m \u001b[0m ├── access |672 |NA |nan |nan |NA |nan |NA | │\n", - "│ \u001b[36m \u001b[0m ├── opendir |9K |NA |nan |nan |NA |nan |NA | │\n", - "│ \u001b[36m \u001b[0m ├── __xstat |47K |NA |nan |nan |NA |nan |NA | │\n", - "│ \u001b[36m \u001b[0m ├── open |22K |NA |nan |nan |NA |nan |NA | │\n", - "│ \u001b[36m \u001b[0m ├── unlink |192 |NA |nan |nan |NA |nan |NA | │\n", - "│ \u001b[36m \u001b[0m ├── read |14K |1 |7 |137 |14 |310 |7KB | │\n", - "│ \u001b[36m \u001b[0m ├── close |22K |NA |nan |nan |NA |nan |NA | │\n", - "│ \u001b[36m \u001b[0m ├── mkdir |76 |NA |nan |nan |NA |nan |NA | │\n", - "│ \u001b[36m \u001b[0m ├── ftruncate |643 |NA |nan |nan |NA |nan |NA | │\n", - "│ \u001b[36m \u001b[0m ├── mmap |576 |NA |nan |nan |NA |nan |NA | │\n", - "│ \u001b[36m \u001b[0m ├── readlink |432 |NA |nan |nan |NA |nan |NA | │\n", - "│ \u001b[36m \u001b[0m ├── __fxstat |3K |NA |nan |nan |NA |nan |NA | │\n", - "│ \u001b[36m \u001b[0m ├── write |112K |1 |5KB |6KB |5KB |5KB |64KB | │\n", - "│ \u001b[36m \u001b[0m ├── lseek |224 |NA |nan |nan |NA |nan |NA | │\n", - "│ \u001b[36m \u001b[0m ├── fcntl |96 |NA |nan |nan |NA |nan |NA | │\n", - "│ \u001b[36m \u001b[0m └── rmdir |58 |NA |nan |nan |NA |nan |NA | │\n", + "│ \u001b[36m \u001b[0m ├── link |1 |NA |nan |nan |NA |nan |NA | │\n", + "│ \u001b[36m \u001b[0m ├── unlink |1 |NA |nan |nan |NA |nan |NA | │\n", + "│ \u001b[36m \u001b[0m ├── symlink |1 |NA |nan |nan |NA |nan |NA | │\n", + "│ \u001b[36m \u001b[0m ├── chmod |1 |NA |nan |nan |NA |nan |NA | │\n", + "│ \u001b[36m \u001b[0m ├── chown |1 |NA |nan |nan |NA |nan |NA | │\n", + "│ \u001b[36m \u001b[0m ├── lchown |1 |NA |nan |nan |NA |nan |NA | │\n", + "│ \u001b[36m \u001b[0m ├── utime |1 |NA |nan |nan |NA |nan |NA | │\n", + "│ \u001b[36m \u001b[0m ├── mkfifo |1 |NA |nan |nan |NA |nan |NA | │\n", + "│ \u001b[36m \u001b[0m ├── symlinkat |1 |NA |nan |nan |NA |nan |NA | │\n", + "│ \u001b[36m \u001b[0m ├── chdir |1 |NA |nan |nan |NA |nan |NA | │\n", + "│ \u001b[36m \u001b[0m ├── open |1 |NA |nan |nan |NA |nan |NA | │\n", + "│ \u001b[36m \u001b[0m └── remove |2 |NA |nan |nan |NA |nan |NA | │\n", "╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n" ] }, diff --git a/include/dftracer/core/constants.h b/include/dftracer/core/constants.h index d888453..d8dc893 100644 --- a/include/dftracer/core/constants.h +++ b/include/dftracer/core/constants.h @@ -28,5 +28,6 @@ static const int EVENT_TYPE_SIZE = 128; static const unsigned int DFT_PATH_MAX = 1024 * 4; static const char SEPARATOR = ';'; +static const int HASH_OUTPUT = 16; #endif // DFTRACER_CONSTANTS_H diff --git a/src/dftracer/brahma/posix.h b/src/dftracer/brahma/posix.h index df6a869..802d03f 100644 --- a/src/dftracer/brahma/posix.h +++ b/src/dftracer/brahma/posix.h @@ -25,24 +25,24 @@ class POSIXDFTracer : public POSIX { static bool stop_trace; static std::shared_ptr instance; static const int MAX_FD = 1024; - uint16_t tracked_fd[MAX_FD]; + std::string tracked_fd[MAX_FD]; std::shared_ptr logger; bool trace_all_files; - inline uint16_t is_traced(int fd, const char *func) { - if (fd < 0) return 0; - uint16_t trace = tracked_fd[fd % MAX_FD]; - if (trace != 0) { + inline std::string is_traced(int fd, const char *func) { + if (fd < 0) return std::string(); + std::string trace = tracked_fd[fd % MAX_FD]; + if (trace.empty()) { DFTRACER_LOG_DEBUG( "Calling POSIXDFTracer.is_traced for %s and" " fd %d trace %d", - func, fd, trace != 0); + func, fd, !trace.empty()); } return trace; } - inline uint16_t is_traced(const char *filename, const char *func) { - if (stop_trace) return 0; + inline std::string is_traced(const char *filename, const char *func) { + if (stop_trace) return std::string(); if (trace_all_files) { return logger->hash_and_store(filename, METADATA_NAME_FILE_HASH); } else { @@ -56,7 +56,7 @@ class POSIXDFTracer : public POSIX { } } - inline void trace(int fd, uint16_t hash) { + inline void trace(int fd, std::string hash) { DFTRACER_LOG_DEBUG("Calling POSIXDFTracer.trace for %d and %d", fd, hash); if (fd == -1) return; tracked_fd[fd % MAX_FD] = hash; @@ -65,13 +65,13 @@ class POSIXDFTracer : public POSIX { inline void remove_trace(int fd) { DFTRACER_LOG_DEBUG("Calling POSIXDFTracer.remove_trace for %d", fd); if (fd == -1) return; - tracked_fd[fd % MAX_FD] = 0; + tracked_fd[fd % MAX_FD] = std::string(); } public: POSIXDFTracer(bool trace_all) : POSIX(), trace_all_files(trace_all) { DFTRACER_LOG_DEBUG("POSIX class intercepted", ""); - for (int i = 0; i < MAX_FD; ++i) tracked_fd[i] = 0; + for (int i = 0; i < MAX_FD; ++i) tracked_fd[i] = std::string(); logger = DFT_LOGGER_INIT(); } void finalize() { diff --git a/src/dftracer/brahma/stdio.h b/src/dftracer/brahma/stdio.h index db07bb4..dc1a43c 100644 --- a/src/dftracer/brahma/stdio.h +++ b/src/dftracer/brahma/stdio.h @@ -22,25 +22,25 @@ class STDIODFTracer : public STDIO { private: static bool stop_trace; static std::shared_ptr instance; - std::unordered_map tracked_fh; + std::unordered_map tracked_fh; std::shared_ptr logger; bool trace_all_files; - inline uint16_t is_traced(FILE *fh, const char *func) { + inline std::string is_traced(FILE *fh, const char *func) { DFTRACER_LOG_DEBUG("Calling STDIODFTracer.is_traced for %s", func); - if (stop_trace) return 0; - if (fh == NULL) return 0; + if (stop_trace) return std::string(); + if (fh == NULL) return std::string(); auto iter = tracked_fh.find(fh); if (iter != tracked_fh.end()) { return iter->second; } - return 0; + return std::string(); } - inline uint16_t is_traced(const char *filename, const char *func) { + inline std::string is_traced(const char *filename, const char *func) { DFTRACER_LOG_DEBUG("Calling STDIODFTracer.is_traced with filename for %s", func); - if (stop_trace) return 0; + if (stop_trace) return std::string(); if (trace_all_files) return logger->hash_and_store(filename, METADATA_NAME_FILE_HASH); else { @@ -49,7 +49,7 @@ class STDIODFTracer : public STDIO { } } - inline void trace(FILE *fh, uint16_t hash) { + inline void trace(FILE *fh, std::string hash) { DFTRACER_LOG_DEBUG("Calling STDIODFTracer.trace with hash %d", hash); tracked_fh.insert_or_assign(fh, hash); } diff --git a/src/dftracer/df_logger.h b/src/dftracer/df_logger.h index 556f072..09a666b 100644 --- a/src/dftracer/df_logger.h +++ b/src/dftracer/df_logger.h @@ -5,6 +5,7 @@ #ifndef DFTRACER_GENERIC_LOGGER_H #define DFTRACER_GENERIC_LOGGER_H +#include #include #include #include @@ -44,7 +45,7 @@ class DFTLogger { std::shared_ptr writer; uint32_t level; std::vector index_stack; - std::unordered_map computed_hash; + std::unordered_map computed_hash; std::atomic_int index; bool has_entry; #ifdef DFTRACER_MPI_ENABLE @@ -102,6 +103,19 @@ class DFTLogger { this->is_init = true; } ~DFTLogger() {} + + inline std::string get_hash(char *name) { + uint8_t result[HASH_OUTPUT]; + md5String(name, result); + std::string hash; + hash.reserve(HASH_OUTPUT + 1); + for (int i = 0; i < HASH_OUTPUT; ++i) { + sprintf(hash.data() + i, "%02x", result[i]); + } + hash.data()[HASH_OUTPUT] = '\0'; + return hash; + } + inline void update_log_file(std::string log_file, std::string exec_name, std::string cmd, ProcessID process_id = -1) { DFTRACER_LOG_DEBUG("DFTLogger.update_log_file %s", log_file.c_str()); @@ -111,15 +125,15 @@ class DFTLogger { tid = df_gettid(); } this->writer = dftracer::Singleton::get_instance(); - uint16_t hostname_hash; - uint16_t cmd_hash; - uint16_t exec_hash; + std::string hostname_hash; + std::string cmd_hash; + std::string exec_hash; if (this->writer != nullptr) { char hostname[256]; gethostname(hostname, 256); - md5String(hostname, &hostname_hash); + hostname_hash = get_hash(hostname); this->writer->initialize(log_file.data(), this->throw_error, - hostname_hash); + hostname_hash.c_str()); hostname_hash = hash_and_store(hostname, METADATA_NAME_HOSTNAME_HASH); char thread_name[128]; auto size = sprintf(thread_name, "%lu", this->process_id); @@ -218,16 +232,16 @@ class DFTLogger { return -1; } - inline uint16_t has_hash(ConstEventNameType key) { + inline std::string has_hash(ConstEventNameType key) { std::shared_lock lock(map_mtx); auto iter = computed_hash.find(key); - if (iter != computed_hash.end()) iter->second; - return 0; + if (iter != computed_hash.end()) return iter->second.c_str(); + return std::string(); } - inline void insert_hash(ConstEventNameType key, uint16_t hash) { + inline void insert_hash(ConstEventNameType key, std::string hash) { std::unique_lock lock(map_mtx); - computed_hash.insert_or_assign(key, hash); + computed_hash.insert_or_assign(key, hash.c_str()); } inline TimeResolution get_time() { @@ -321,38 +335,37 @@ class DFTLogger { } } - inline uint16_t hash_and_store(char *filename, ConstEventNameType name) { - if (filename == NULL) return 0; + inline std::string hash_and_store(char *filename, ConstEventNameType name) { + if (filename == NULL) return std::string(); char file[PATH_MAX]; strcpy(file, filename); file[PATH_MAX - 1] = '\0'; return hash_and_store_str(file, name); } - inline uint16_t hash_and_store_str(char file[PATH_MAX], - ConstEventNameType name) { - uint16_t hash = has_hash(file); - if (hash == 0) { - md5String(file, &hash); - insert_hash(file, hash); + inline std::string hash_and_store_str(char file[PATH_MAX], + ConstEventNameType name) { + std::string hash = has_hash(file); + if (hash.empty()) { + hash = get_hash(file); + insert_hash(file, hash.c_str()); if (this->writer != nullptr) { ThreadID tid = 0; if (dftracer_tid) { tid = df_gettid(); } int current_index = this->enter_event(); - this->writer->log_metadata(current_index, file, - std::to_string(hash).c_str(), name, - this->process_id, tid, false); + this->writer->log_metadata(current_index, file, hash.c_str(), name, + this->process_id, tid); this->exit_event(); } } return hash; } - inline uint16_t hash_and_store(const char *filename, - ConstEventNameType name) { - if (filename == NULL) return 0; + inline std::string hash_and_store(const char *filename, + ConstEventNameType name) { + if (filename == NULL) return std::string(); char file[PATH_MAX]; strcpy(file, filename); file[PATH_MAX - 1] = '\0'; @@ -386,15 +399,15 @@ class DFTLogger { #define DFT_LOGGER_UPDATE_HASH(value) \ if (trace && this->logger->include_metadata) { \ - uint16_t value##_hash = \ + std::string value##_hash = \ this->logger->hash_and_store(value, METADATA_NAME_FILE_HASH); \ DFT_LOGGER_UPDATE(value##_hash); \ } #define DFT_LOGGER_START(entity) \ DFTRACER_LOG_DEBUG("Calling function %s", __FUNCTION__); \ - uint16_t fhash = is_traced(entity, __FUNCTION__); \ - bool trace = fhash != 0; \ + std::string fhash = is_traced(entity, __FUNCTION__); \ + bool trace = !fhash.empty(); \ TimeResolution start_time = 0; \ std::unordered_map *metadata = nullptr; \ if (trace) { \ diff --git a/src/dftracer/utils/md5.cpp b/src/dftracer/utils/md5.cpp index ce00f86..7dab8a1 100644 --- a/src/dftracer/utils/md5.cpp +++ b/src/dftracer/utils/md5.cpp @@ -4,7 +4,7 @@ * structures. */ -#include +#include "md5.h" /* * Constants defined by the MD5 algorithm @@ -193,16 +193,17 @@ void md5Step(uint32_t *buffer, uint32_t *input) { * Functions that run the algorithm on the provided input and put the digest * into result. result should be able to store 16 bytes. */ -void md5String(char *input, uint16_t *result) { +void md5String(char *input, uint8_t *result) { MD5Context ctx; md5Init(&ctx); md5Update(&ctx, (uint8_t *)input, strlen(input)); md5Finalize(&ctx); + memcpy(result, ctx.digest, 16); } -void md5File(FILE *file, uint16_t *result) { - char *input_buffer = (char *)malloc(1024 * 1024); +void md5File(FILE *file, uint8_t *result) { + char *input_buffer = (char *)malloc(1024); size_t input_size = 0; MD5Context ctx; diff --git a/src/dftracer/utils/md5.h b/src/dftracer/utils/md5.h index d67766e..d61b95d 100644 --- a/src/dftracer/utils/md5.h +++ b/src/dftracer/utils/md5.h @@ -1,25 +1,24 @@ -#ifndef DFTRACER_MD5_H -#define DFTRACER_MD5_H +#ifndef MD5_H +#define MD5_H -#include -#include #include -#include +#include #include +#include -typedef struct { - uint64_t size; // Size of input in bytes - uint32_t buffer[4]; // Current accumulation of hash - uint8_t input[PATH_MAX]; // Input to be used in the next step - uint8_t digest[16]; // Result of algorithm -} MD5Context; +typedef struct{ + uint64_t size; // Size of input in bytes + uint32_t buffer[4]; // Current accumulation of hash + uint8_t input[64]; // Input to be used in the next step + uint8_t digest[16]; // Result of algorithm +}MD5Context; void md5Init(MD5Context *ctx); void md5Update(MD5Context *ctx, uint8_t *input, size_t input_len); void md5Finalize(MD5Context *ctx); void md5Step(uint32_t *buffer, uint32_t *input); -void md5String(char *input, uint16_t *result); -void md5File(FILE *file, uint16_t *result); +void md5String(char *input, uint8_t *result); +void md5File(FILE *file, uint8_t *result); -#endif // DFTRACER_MD5_H \ No newline at end of file +#endif \ No newline at end of file diff --git a/src/dftracer/writer/chrome_writer.cpp b/src/dftracer/writer/chrome_writer.cpp index 9be3a65..cee847a 100644 --- a/src/dftracer/writer/chrome_writer.cpp +++ b/src/dftracer/writer/chrome_writer.cpp @@ -22,7 +22,7 @@ template <> bool dftracer::Singleton::stop_creating_instances = false; void dftracer::ChromeWriter::initialize(char *filename, bool throw_error, - uint16_t hostname_hash) { + const char *hostname_hash) { this->hostname_hash = hostname_hash; this->throw_error = throw_error; this->filename = filename; @@ -214,9 +214,10 @@ void dftracer::ChromeWriter::convert_json( previous_index = current_index; auto written_size = sprintf( buffer.data() + current_index, - R"(%s{"id":%d,"name":"%s","cat":"%s","pid":%lu,"tid":%lu,"ts":%llu,"dur":%llu,"ph":"X","args":{"hhash":%d%s}})", + R"(%s{"id":%d,"name":"%s","cat":"%s","pid":%lu,"tid":%lu,"ts":%llu,"dur":%llu,"ph":"X","args":{"hhash":"%s"%s}})", is_first_char, index, event_name, category, process_id, thread_id, - start_time, duration, this->hostname_hash, all_stream.str().c_str()); + start_time, duration, this->hostname_hash.c_str(), + all_stream.str().c_str()); current_index += written_size; buffer[current_index] = '\n'; current_index++; @@ -255,13 +256,15 @@ void dftracer::ChromeWriter::convert_json_metadata( if (is_string) { written_size = sprintf( buffer.data() + current_index, - R"(%s{"id":%d,"name":"%s","cat":"dftracer","pid":%lu,"tid":%lu,"ph":"M","args":{"hhash":%d,"name":"%s","value":"%s"}})", - is_first_char, index, ph, process_id, thread_id, name, value); + R"(%s{"id":%d,"name":"%s","cat":"dftracer","pid":%lu,"tid":%lu,"ph":"M","args":{"hhash":"%s","name":"%s","value":"%s"}})", + is_first_char, index, ph, process_id, thread_id, + this->hostname_hash.c_str(), name, value); } else { written_size = sprintf( buffer.data() + current_index, - R"(%s{"id":%d,"name":"%s","cat":"dftracer","pid":%lu,"tid":%lu,"ph":"M","args":{"hhash":%d,"name":"%s","value":%s}})", - is_first_char, index, ph, process_id, thread_id, name, value); + R"(%s{"id":%d,"name":"%s","cat":"dftracer","pid":%lu,"tid":%lu,"ph":"M","args":{"hhash":"%s","name":"%s","value":%s}})", + is_first_char, index, ph, process_id, thread_id, + this->hostname_hash.c_str(), name, value); } current_index += written_size; buffer[current_index] = '\n'; diff --git a/src/dftracer/writer/chrome_writer.h b/src/dftracer/writer/chrome_writer.h index f3567e9..1c917ec 100644 --- a/src/dftracer/writer/chrome_writer.h +++ b/src/dftracer/writer/chrome_writer.h @@ -36,7 +36,7 @@ class ChromeWriter { bool enable_core_affinity; FILE *fh; - uint16_t hostname_hash; + std::string hostname_hash; static const int MAX_LINE_SIZE = 16 * 1024L; size_t write_buffer_size; @@ -67,7 +67,7 @@ class ChromeWriter { funlockfile(fh); if (written_elements != 1) { // GCOVR_EXCL_START DFTRACER_LOG_ERROR( - "unable to log write only %ld of %d trying to write %d with error " + "unable to log write only %ld of %d trying to write %ld with error " "code " "%d", written_elements, 1, current_index, errno); @@ -100,7 +100,7 @@ class ChromeWriter { } } ~ChromeWriter() { DFTRACER_LOG_DEBUG("Destructing ChromeWriter", ""); } - void initialize(char *filename, bool throw_error, uint16_t hostname_hash); + void initialize(char *filename, bool throw_error, const char *hostname_hash); void log(int index, ConstEventNameType event_name, ConstEventNameType category, TimeResolution start_time, diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index ea72b7c..59634ac 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -32,7 +32,7 @@ function(set_common_properties test_name) set_property(TEST ${test_name} APPEND PROPERTY ENVIRONMENT DFTRACER_LOG_FILE=${CMAKE_CURRENT_BINARY_DIR}/${test_name}) set_property(TEST ${test_name} APPEND PROPERTY ENVIRONMENT DFTRACER_ENABLE=1) set_property(TEST ${test_name} APPEND PROPERTY ENVIRONMENT DFTRACER_INC_METADATA=1) - set_property(TEST ${test_name} APPEND PROPERTY ENVIRONMENT DFTRACER_BIND_SIGNALS=1) + set_property(TEST ${test_name} APPEND PROPERTY ENVIRONMENT DFTRACER_BIND_SIGNALS=0) endfunction() file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/data) @@ -43,14 +43,14 @@ set_property(TEST ${test_name} APPEND PROPERTY ENVIRONMENT LD_PRELOAD=${CMAKE_BI set_property(TEST ${test_name} APPEND PROPERTY ENVIRONMENT DFTRACER_INIT=PRELOAD) find_program(BASH_PROGRAM bash) -df_add_test(check_file_exists_${test_name} ${BASH_PROGRAM} ${CMAKE_CURRENT_SOURCE_DIR}/check_file_at_least.sh ${CMAKE_CURRENT_BINARY_DIR}/${test_name}* 30) +df_add_test(check_file_exists_${test_name} ${BASH_PROGRAM} ${CMAKE_CURRENT_SOURCE_DIR}/check_file_at_least.sh ${CMAKE_CURRENT_BINARY_DIR}/${test_name}* 29) set_tests_properties(check_file_exists_${test_name} PROPERTIES DEPENDS ${test_name}) set(test_name test_cpp_basic_app_only) df_add_test(${test_name} ${CMAKE_BINARY_DIR}/bin/test_cpp ${CMAKE_CURRENT_BINARY_DIR}/data 1) set_common_properties(${test_name}) -df_add_test(check_file_exists_${test_name} ${BASH_PROGRAM} ${CMAKE_CURRENT_SOURCE_DIR}/check_file_at_least.sh ${CMAKE_CURRENT_BINARY_DIR}/${test_name}* 30) +df_add_test(check_file_exists_${test_name} ${BASH_PROGRAM} ${CMAKE_CURRENT_SOURCE_DIR}/check_file_at_least.sh ${CMAKE_CURRENT_BINARY_DIR}/${test_name}* 29) set_tests_properties(check_file_exists_${test_name} PROPERTIES DEPENDS ${test_name}) set(test_name test_cpp_basic_app_only_yaml) @@ -104,7 +104,7 @@ set_property(TEST ${test_name} APPEND PROPERTY ENVIRONMENT LD_PRELOAD=${CMAKE_BI set_property(TEST ${test_name} APPEND PROPERTY ENVIRONMENT DFTRACER_INIT=PRELOAD) set_property(TEST ${test_name} APPEND PROPERTY ENVIRONMENT DFTRACER_INC_METADATA=1) -df_add_test(check_file_exists_${test_name} ${BASH_PROGRAM} ${CMAKE_CURRENT_SOURCE_DIR}/check_file_at_least.sh ${CMAKE_CURRENT_BINARY_DIR}/${test_name}* 30) +df_add_test(check_file_exists_${test_name} ${BASH_PROGRAM} ${CMAKE_CURRENT_SOURCE_DIR}/check_file_at_least.sh ${CMAKE_CURRENT_BINARY_DIR}/${test_name}* 29) set_tests_properties(check_file_exists_${test_name} PROPERTIES DEPENDS ${test_name}) set(test_name test_cpp_basic_affinity) @@ -115,7 +115,7 @@ set_property(TEST ${test_name} APPEND PROPERTY ENVIRONMENT DFTRACER_INIT=PRELOAD set_property(TEST ${test_name} APPEND PROPERTY ENVIRONMENT DFTRACER_INC_METADATA=1) set_property(TEST ${test_name} APPEND PROPERTY ENVIRONMENT DFTRACER_SET_CORE_AFFINITY=1) -df_add_test(check_file_exists_${test_name} ${BASH_PROGRAM} ${CMAKE_CURRENT_SOURCE_DIR}/check_file_at_least.sh ${CMAKE_CURRENT_BINARY_DIR}/${test_name}* 30) +df_add_test(check_file_exists_${test_name} ${BASH_PROGRAM} ${CMAKE_CURRENT_SOURCE_DIR}/check_file_at_least.sh ${CMAKE_CURRENT_BINARY_DIR}/${test_name}* 29) set_tests_properties(check_file_exists_${test_name} PROPERTIES DEPENDS ${test_name}) set(test_name test_py_disable_only)