From 466592e6390eee5ad9f7bdcd24b71ab93c22d20e Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Wed, 5 Jun 2019 10:36:08 -0700 Subject: [PATCH] gpu: nvgpu: Remove understand script This script has been copied over to the core-private directory. Change-Id: Ied64f0d1722d61e207147508d28859b5c693a743 Signed-off-by: Alex Waterman Reviewed-on: https://git-master.nvidia.com/r/2131030 Reviewed-by: Nicolas Benech GVS: Gerrit_Virtual_Submit Reviewed-by: mobile promotions Tested-by: mobile promotions --- arch/understand_deps_analyze.py | 58 --------------------------------- 1 file changed, 58 deletions(-) delete mode 100755 arch/understand_deps_analyze.py diff --git a/arch/understand_deps_analyze.py b/arch/understand_deps_analyze.py deleted file mode 100755 index b59ddedf6..000000000 --- a/arch/understand_deps_analyze.py +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/python3 -# -# Python script to parse dependency export CSV from Understand. It detects -# these common architectural problems: -# * Common code depends on hardware headers -# * HAL unit depends directly on another HAL unit. The dependency should -# always be via HAL interface. -# * Two units have a circular dependency. -# -# Usage: -# -# understand_deps_analyze.py Dependency graphs->By nvgpu (nvgpu probably comes from the -# name of the architecture .xml file -# * Create arch dependendency report: -# * Reports->Dependency->Architecture Dependencies->Export CSV -# * Choose nvgpu as "Select an architecture to analyze" - -import sys -import re - -def checkMatch(fromUnit, toUnit): - ret = None - - if (not fromUnit.startswith("common/hal") and toUnit.startswith("gpu_hw")): - ret = "Common depends on HW" - - if (fromUnit.startswith("common/hal") and toUnit.startswith("common/hal")): - ret = "HAL depends on HAL" - - # We have still too many of these problems, and it's not clear if we want - # to fix them all. Comment out for now. - # if (fromUnit.startswith("interface") and not toUnit.startswith("interface")): - # ret = "Interface depends on non-interface" - - return ret - -stream = sys.stdin -deps = set() - -depRe = re.compile("(.+),(.+),\d+,\d+,\d+,\d+,\d+") -for line in stream.readlines(): - match = depRe.match(line) - if match: - ret = checkMatch(match.group(1), match.group(2)) - if (ret): - print("%s,%s,%s" % (ret, match.group(1), match.group(2))) - - if "%s,%s" % (match.group(2), match.group(1)) in deps: - print("Circular dependency,%s,%s" % (match.group(1), match.group(2))) - - deps.add("%s,%s" % (match.group(1), match.group(2)))