Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CTUApex
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Heldmann, Tim
CTUApex
Commits
bfce937f
Commit
bfce937f
authored
6 months ago
by
Heldmann, Tim
Browse files
Options
Downloads
Patches
Plain Diff
Fix bug in metacg usage and demo script
parent
b0b9f35d
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/CTUApexVisitor.cpp
+3
-0
3 additions, 0 deletions
src/CTUApexVisitor.cpp
src/main.cpp
+2
-9
2 additions, 9 deletions
src/main.cpp
test/4_Lulesh/CMakeLists.txt
+5
-5
5 additions, 5 deletions
test/4_Lulesh/CMakeLists.txt
test/4_Lulesh/demo.sh
+16
-12
16 additions, 12 deletions
test/4_Lulesh/demo.sh
with
26 additions
and
26 deletions
src/CTUApexVisitor.cpp
+
3
−
0
View file @
bfce937f
...
...
@@ -42,6 +42,9 @@ bool FunctionFinderVisitor::VisitFunctionDecl(clang::FunctionDecl *functionDecl)
//std::cout<<functionDecl->getNameAsString()<<col2str(possibleNames," All possible manglings are:(",",",")")<<"\n";
for
(
const
auto
&
name
:
possibleNames
){
assert
(
callgraph
->
hasNode
(
name
));
// we should find every node in the whole program callgraph
if
(
!
callgraph
->
hasNode
(
name
)){
SPDLOG_WARN
(
"Node {} is not in the call-graph. Graph might be wrong or incomplete!"
,
name
);
...
...
This diff is collapsed.
Click to expand it.
src/main.cpp
+
2
−
9
View file @
bfce937f
...
...
@@ -208,14 +208,9 @@ int main(int argc, const char **argv) {
}
auto
&
mcgManager
=
metacg
::
graph
::
MCGManager
::
get
();
mcgManager
.
addToManagedGraphs
(
"emptyGraph"
,
std
::
make_unique
<
metacg
::
Callgraph
>
());
nlohmann
::
json
j
=
fs
.
get
().
at
(
"_CG"
);
std
::
cout
<<
j
.
dump
(
4
);
metacg
::
io
::
VersionTwoMetaCGReader
::
upgradeV2FormatToV3Format
(
j
);
std
::
cout
<<
j
.
dump
(
4
);
mcgReader
->
read
();
mcgManager
.
addToManagedGraphs
(
"activeGraph"
,
mcgReader
->
read
());
auto
&
cg
=
*
mcgManager
.
getCallgraph
();
std
::
cout
<<
cg
.
size
()
<<
"
\n
"
;
//Add extraction point gotten via the CLI
for
(
const
auto
&
extractionFunc
:
extractionPoints
){
...
...
@@ -230,8 +225,6 @@ int main(int argc, const char **argv) {
markFunctionsAlongCallpaths
(
cg
);
tool
.
run
(
clang
::
tooling
::
newFrontendActionFactory
<
CTUApexFrontendAction
>
(
new
CTUApexFrontendAction
(
*
mcgManager
.
getCallgraph
())).
get
());
return
0
;
...
...
This diff is collapsed.
Click to expand it.
test/4_Lulesh/CMakeLists.txt
+
5
−
5
View file @
bfce937f
...
...
@@ -43,11 +43,11 @@ if (WITH_SILO)
endif
()
set
(
LULESH_SOURCES
lulesh-comm.
mini.
cc
lulesh-init.
mini.
cc
lulesh-util.
mini.
cc
lulesh-viz.
mini.
cc
lulesh.
mini.
cc
)
lulesh-comm.cc
lulesh-init.cc
lulesh-util.cc
lulesh-viz.cc
lulesh.cc
)
set
(
LULESH_EXEC lulesh2.0
)
...
...
This diff is collapsed.
Click to expand it.
test/4_Lulesh/demo.sh
100644 → 100755
+
16
−
12
View file @
bfce937f
# this is the cgcollector from metacg
cgcollector
--metacg-format-version
=
2 lulesh.cc
cgcollector
--metacg-format-version
=
2 lulesh-init.cc
cgcollector
--metacg-format-version
=
2 lulesh-comm.cc
cgcollector
--metacg-format-version
=
2 lulesh-util.cc
cgcollector
--metacg-format-version
=
2 lulesh-viz.cc
cgcollector
-p
build
--metacg-format-version
=
2 lulesh.cc
cgcollector
-p
build
--metacg-format-version
=
2 lulesh-init.cc
cgcollector
-p
build
--metacg-format-version
=
2 lulesh-comm.cc
cgcollector
-p
build
--metacg-format-version
=
2 lulesh-util.cc
cgcollector
-p
build
--metacg-format-version
=
2 lulesh-viz.cc
echo
"null"
>
merged.ipcg
#this is cgmerge from metacg
cgmerge merged.ipcg
*
.ipcg
sed
-i
's/fileProperties/FileProperties/g'
merged.ipcg
#this currently uses hardcoded include directories as to be compatible with C++
#this is a terrible solution and is currently being worked on
CTUApex
--extra-arg
=
-I
/home/groups/da_sc/moduletree/packages-2023-08-24/.gcc/8.5/clang/15.0.7.debug/include
\
--extra-arg
=
-I
/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12
\
--extra-arg
=
-I
/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/x86_64-redhat-linux
\
--extra-arg
=
-I
/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/backward
\
--extra-arg
=
-I
/work/groups/da_sc/moduletree/packages-2023-08-24/.gcc/8.5.0/clang/debug.15.0.7/lib/clang/15.0.7/include
\
--extra-arg
=
-I
/usr/local/include
\
--extra-arg
=
-I
/usr/include
\
#CTUApex --extra-arg=-I/home/groups/da_sc/moduletree/packages-2023-08-24/.gcc/11.2.0/clang/15.0.7.debug/include \
#--extra-arg=-I/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12 \
#--extra-arg=-I/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/x86_64-redhat-linux \
#--extra-arg=-I/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/backward \
#--extra-arg=-I/work/groups/da_sc/moduletree/packages-2023-08-24/.gcc/8.5.0/clang/debug.15.0.7/lib/clang/15.0.7/include \
#--extra-arg=-I/usr/local/include \
#--extra-arg=-I/usr/include \
CTUApex
\
--cg-file
=
merged.ipcg
\
--extra-arg
=
-DUSE_MPI
=
0
\
--log-level
=
debug
\
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment