Node matching between tracing and clang works [WIP]
This commit is contained in:
parent
dc689174c0
commit
5885be5974
3 changed files with 2521 additions and 27 deletions
|
@ -12,7 +12,7 @@ import termcolor
|
|||
from clang_interop.types import ClNode, ClField, ClTimer, ClMethod, ClPublisher, ClSubscription, ClMemberRef, ClContext, \
|
||||
ClTranslationUnit
|
||||
|
||||
IN_DIR = "/home/max/Projects/llvm-project/clang-tools-extra/ros2-internal-dependency-checker/output"
|
||||
IN_DIR = "/home/max/Projects/ma-ros2-internal-dependency-analyzer/output"
|
||||
SRC_DIR = "/home/max/Projects/autoware/src"
|
||||
|
||||
OUT_NAME = "clang_objects.pkl"
|
||||
|
@ -88,9 +88,6 @@ def find_data_deps(accesses: Iterable[ClMemberRef]):
|
|||
|
||||
reads = pd.DataFrame.from_records(list(reads), columns=['method_id', 'member_id'])
|
||||
writes = pd.DataFrame.from_records(list(writes), columns=['method_id', 'member_id'])
|
||||
pub_dict = {method: set() for method, _ in publications}
|
||||
for method, member in publications:
|
||||
pub_dict[method].add(member)
|
||||
|
||||
deps = {}
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ class ClNode:
|
|||
|
||||
def __init__(self, json_obj):
|
||||
self.id = json_obj['id']
|
||||
self.qualified_name = json_obj['id']
|
||||
self.qualified_name = json_obj['qualified_name']
|
||||
self.source_range = ClSourceRange(json_obj['source_range'])
|
||||
self.field_ids = list(map(lambda obj: obj['id'], json_obj['fields'])) if 'fields' in json_obj else None
|
||||
self.method_ids = list(map(lambda obj: obj['id'], json_obj['methods'])) if 'methods' in json_obj else None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue