diff --git a/CMakeLists.txt b/CMakeLists.txt index 84ccf6d05418c9bbc891df6fab6101c08775840a..b359967c3dffaa184a5f1510ce5b0d205054739e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,7 @@ set(COV_CHECK "1") # env args set(MAPLE_ROOT $ENV{MAPLE_ROOT}) set(ANDROID_ROOT ${MAPLE_ROOT}/android) +set(ENHANCED_CLANG_PATH $ENV{ENHANCED_CLANG_PATH}) set(AOSP_ROOT ${MAPLE_ROOT}/third_party/aosp_modified) set(MAPLE_BUILD_TYPE $ENV{MAPLE_BUILD_TYPE}) set(MAPLE_BUILD_OUTPUT $ENV{MAPLE_BUILD_OUTPUT}) @@ -65,7 +66,8 @@ set(PROJECT_BINARY_DIR ${MAPLE_BUILD_OUTPUT}/lib) #--------------------------------- toolchain ------------------------------------- -set(CLANG_PATH ${MAPLE_ROOT}/tools/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-18.04) +# ENHANCED_CLANG_PATH +set(CLANG_PATH ${ENHANCED_CLANG_PATH}) set(LLVMINC ${CLANG_PATH}/include) set(LLVMLIBDIR ${CLANG_PATH}/lib) set(CFE_SRC_DIR ${MAPLE_ROOT}/../third_party/clang-10.0.0.src) @@ -100,10 +102,12 @@ if(${CMAKE_BUILD_TYPE} STREQUAL "RELEASE") "${CMAKE_C_FLAGS} -O2 -fno-strict-aliasing -D_FORTIFY_SOURCE=2") elseif(${CMAKE_BUILD_TYPE} STREQUAL "DEBUG") add_definitions("-DDEBUG") + set(CMAKE_CXX_FLAGS_DEBUG "-g3 -gdwarf-4") + set(CMAKE_C_FLAGS_DEBUG "-g3 -gdwarf-4") set(CMAKE_CXX_FLAGS - "${CMAKE_CXX_FLAGS} -O0 -g3 -ftrapv -fstack-check") + "${CMAKE_CXX_FLAGS} -O0 -ftrapv -fstack-check") set(CMAKE_C_FLAGS - "${CMAKE_C_FLAGS} -O0 -g3 -ftrapv -fstack-check") + "${CMAKE_C_FLAGS} -O0 -ftrapv -fstack-check") if(${target_toolchain} STREQUAL "//build/toolchain:clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-limit-debug-info") @@ -160,7 +164,7 @@ endif() if(${ASAN} STREQUAL 1) add_definitions(" -fsanitize=address ") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -ldl ${LLVMLIBDIR}/libclang_rt.asan-x86_64.a") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -ldl ${LLVMLIBDIR}/clang/15.0.4/lib/x86_64-unknown-linux-gnu/libclang_rt.asan.a") endif() if(${COV} STREQUAL 1) diff --git a/Makefile b/Makefile index 7cc2a2860ef04a4e4d76b82c52b85c253cdd35de..4e7c22e01ebf2f184bd08051c5789daaee4f469b 100644 --- a/Makefile +++ b/Makefile @@ -184,12 +184,12 @@ java-core-def: install install: maple dex2mpl_install irbuild hir2mpl mplverf $(shell mkdir -p $(INSTALL_DIR)/ops/linker/; \ mkdir -p $(INSTALL_DIR)/lib/libc_enhanced/include/; \ + mkdir -p $(INSTALL_DIR)/lib/include/; \ + rsync -a -L $(MAPLE_ROOT)/src/hir2mpl/ast_input/clang/lib/sys/ $(INSTALL_DIR)/lib/include/; \ + rsync -a -L $(MAPLE_ROOT)/libc_enhanced/include/ $(INSTALL_DIR)/lib/libc_enhanced/include/; \ rsync -a -L $(MRT_ROOT)/maplert/linker/maplelld.so.lds $(INSTALL_DIR)/ops/linker/; \ rsync -a -L $(MAPLE_ROOT)/build/java2d8 $(INSTALL_DIR)/bin; \ - rsync -a -L $(MAPLE_BIN_DIR)/java2jar $(INSTALL_DIR)/bin/; \ - cp -rf $(MAPLE_ROOT)/tools $(INSTALL_DIR)/../; \ - rsync -a -L $(MAPLE_ROOT)/libc_enhanced/include/ $(INSTALL_DIR)/lib/libc_enhanced/include/; \ - rsync -a -L $(MAPLE_ROOT)/src/hir2mpl/ast_input/clang/lib/sys/ $(INSTALL_DIR)/lib/include/;) + rsync -a -L $(MAPLE_BIN_DIR)/java2jar $(INSTALL_DIR)/bin/;) .PHONY: all all: install libcore diff --git a/build/config.gni b/build/config.gni index 5db3bf2ce137c9fb04aad98a231669bab0537452..d6eeacddac4453c283502a50f6a06f751a47a0e2 100644 --- a/build/config.gni +++ b/build/config.gni @@ -14,12 +14,11 @@ # # Toolchain setup -CLANG_PATH = "${MAPLE_ROOT}/tools/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-18.04" +CLANG_PATH = "${ENHANCED_CLANG_PATH}" LLVMINC = "${CLANG_PATH}/include" LLVMLIBDIR = "${CLANG_PATH}/lib" -CFE_SRC_DIR = "${MAPLE_ROOT}/../third-party/clang-10.0.0.src" -CFE_SRC_PATH = "${MAPLE_ROOT}/third_party/llvm-12.0.0.src/clang" +CFE_SRC_PATH = "${MAPLE_ROOT}/third_party/llvm-15.0.4.src/clang" # MapleFE path MAPLE_PARSER_PATH = "" diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn index 9de64def59a5c3867a735c2bd09ecebe63e14218..8528733f5d73f4e6f1c22c2284591de2faa3305f 100755 --- a/build/config/BUILDCONFIG.gn +++ b/build/config/BUILDCONFIG.gn @@ -39,6 +39,7 @@ declare_args() { # Define global args MAPLE_ROOT = getenv("MAPLE_ROOT") +ENHANCED_CLANG_PATH = getenv("ENHANCED_CLANG_PATH") ANDROID_ROOT = "${MAPLE_ROOT}/android" AOSP_ROOT = "${MAPLE_ROOT}/third_party/aosp_modified" MAPLE_BUILD_TYPE = getenv("MAPLE_BUILD_TYPE") diff --git a/build/envsetup.sh b/build/envsetup.sh index eba899daa049e931443120fdc5ce7c65f41a51ec..529f3388edeaa99142e6a425692ad7fb6608d2b2 100644 --- a/build/envsetup.sh +++ b/build/envsetup.sh @@ -31,7 +31,12 @@ export PATH=${curdir}/tools/cmake/bin:${curdir}/tools/ninja:$PATH export MAPLE_ROOT=${curdir} export SPEC=${MAPLE_ROOT}/testsuite/c_test/spec_test -export LD_LIBRARY_PATH=${MAPLE_ROOT}/tools/gcc-linaro-7.5.0/aarch64-linux-gnu/libc/lib:${MAPLE_ROOT}/tools/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-18.04/lib:${LD_LIBRARY_PATH} +# enhanced clang patch, LD_LIBRARY_PATH +export ENHANCED_CLANG_PATH=${MAPLE_ROOT}/tools/clang+llvm-15.0.4-x86_64-linux-gnu-ubuntu-18.04-enhanced +export PURE_CLANG_PATH=${MAPLE_ROOT}/tools/clang+llvm-15.0.4-x86_64-linux-gnu-ubuntu-18.04-pure +export LLVM_PATH=${MAPLE_ROOT}/third_party/llvm-15.0.4.src + +export LD_LIBRARY_PATH=${MAPLE_ROOT}/tools/gcc-linaro-7.5.0/aarch64-linux-gnu/libc/lib:${ENHANCED_CLANG_PATH}/lib:${LD_LIBRARY_PATH} export SPECPERLLIB=${SPEC}/bin/lib:${SPEC}/bin:${SPEC}/SPEC500-perlbench_r/data/all/input/lib:${SPEC}/SPEC500-perlbench_r/t/lib export CASE_ROOT=${curdir}/testsuite export OUT_ROOT=${curdir}/output diff --git a/build/third_party/llvm_enhancec_001.patch b/build/third_party/llvm_enhancec_001.patch new file mode 100644 index 0000000000000000000000000000000000000000..1fb29b262cafc9e4ba547ab00bf6470e16550701 --- /dev/null +++ b/build/third_party/llvm_enhancec_001.patch @@ -0,0 +1,1454 @@ +diff --git a/clang/include/clang/AST/ASTDumper.h b/clang/include/clang/AST/ASTDumper.h +index a154bc2db3a7..a75bcea190c2 100644 +--- a/clang/include/clang/AST/ASTDumper.h ++++ b/clang/include/clang/AST/ASTDumper.h +@@ -43,6 +43,7 @@ public: + void VisitFunctionTemplateDecl(const FunctionTemplateDecl *D); + void VisitClassTemplateDecl(const ClassTemplateDecl *D); + void VisitVarTemplateDecl(const VarTemplateDecl *D); ++ void VisitCompoundStmt(const CompoundStmt *Node); + }; + + } // namespace clang +diff --git a/clang/include/clang/AST/Decl.h b/clang/include/clang/AST/Decl.h +index fb87a75a1241..28d099fc1f0b 100644 +--- a/clang/include/clang/AST/Decl.h ++++ b/clang/include/clang/AST/Decl.h +@@ -2112,6 +2112,14 @@ public: + return hasBody(Definition); + } + ++ void setSafeSpecifier(SafeScopeSpecifier SafeSpec) { ++ FunctionDeclBits.SafeSpecifier = SafeSpec; ++ } ++ ++ SafeScopeSpecifier getSafeSpecifier() const { ++ return (SafeScopeSpecifier) FunctionDeclBits.SafeSpecifier; ++ } ++ + /// Returns whether the function has a trivial body that does not require any + /// specific codegen. + bool hasTrivialBody() const; +diff --git a/clang/include/clang/AST/DeclBase.h b/clang/include/clang/AST/DeclBase.h +index d1193161fd75..dabd3bedc71a 100644 +--- a/clang/include/clang/AST/DeclBase.h ++++ b/clang/include/clang/AST/DeclBase.h +@@ -1642,6 +1642,8 @@ class DeclContext { + /// have a body, once we're done parsing it. + uint64_t WillHaveBody : 1; + ++ uint64_t SafeSpecifier : 2; ++ + /// Indicates that this function is a multiversioned + /// function using attribute 'target'. + uint64_t IsMultiVersion : 1; +diff --git a/clang/include/clang/AST/Stmt.h b/clang/include/clang/AST/Stmt.h +index 49a66a1ea5b8..87a4951ebf9c 100644 +--- a/clang/include/clang/AST/Stmt.h ++++ b/clang/include/clang/AST/Stmt.h +@@ -1415,9 +1415,13 @@ class CompoundStmt final + /// The location of the closing "}". + SourceLocation RBraceLoc; + +- CompoundStmt(ArrayRef Stmts, FPOptionsOverride FPFeatures, +- SourceLocation LB, SourceLocation RB); +- explicit CompoundStmt(EmptyShell Empty) : Stmt(CompoundStmtClass, Empty) {} ++ SafeScopeSpecifier SafeSpec; ++ SourceLocation SafeLoc; ++ ++ CompoundStmt(ArrayRef Stmts, FPOptionsOverride FPFeatures, SourceLocation LB, SourceLocation RB, ++ SafeScopeSpecifier SafeSpec = SS_None, SourceLocation SafeLoc = SourceLocation()); ++ explicit CompoundStmt(EmptyShell Empty) : Stmt(CompoundStmtClass, Empty), ++ SafeSpec(SS_None), SafeLoc() {} + + void setStmts(ArrayRef Stmts); + +@@ -1434,11 +1438,13 @@ class CompoundStmt final + public: + static CompoundStmt *Create(const ASTContext &C, ArrayRef Stmts, + FPOptionsOverride FPFeatures, SourceLocation LB, +- SourceLocation RB); ++ SourceLocation RB, ++ SafeScopeSpecifier SafeSpec = SS_None, ++ SourceLocation SafeLoc = SourceLocation()); + + // Build an empty compound statement with a location. + explicit CompoundStmt(SourceLocation Loc) +- : Stmt(CompoundStmtClass), LBraceLoc(Loc), RBraceLoc(Loc) { ++ : Stmt(CompoundStmtClass), RBraceLoc(Loc), SafeSpec(SS_None), SafeLoc() { + CompoundStmtBits.NumStmts = 0; + CompoundStmtBits.HasFPFeatures = 0; + } +@@ -1532,6 +1538,18 @@ public: + return const_cast(this)->getStmtExprResult(); + } + ++ SafeScopeSpecifier getSafeSpecifier() const { ++ return SafeSpec; ++ } ++ ++ void setSafeSpecifier(SafeScopeSpecifier spec) { ++ SafeSpec = spec; ++ } ++ ++ SourceLocation getSafeSpecifierLoc() const { ++ return SafeLoc; ++ } ++ + SourceLocation getBeginLoc() const { return LBraceLoc; } + SourceLocation getEndLoc() const { return RBraceLoc; } + +diff --git a/clang/include/clang/Basic/Attr.td b/clang/include/clang/Basic/Attr.td +index d61f3583281d..f9faec770851 100644 +--- a/clang/include/clang/Basic/Attr.td ++++ b/clang/include/clang/Basic/Attr.td +@@ -1942,8 +1942,8 @@ def NoSplitStack : InheritableAttr { + + def NonNull : InheritableParamAttr { + let Spellings = [GCC<"nonnull">]; +- let Subjects = SubjectList<[ObjCMethod, HasFunctionProto, ParmVar], WarnDiag, +- "functions, methods, and parameters">; ++ let Subjects = SubjectList<[ObjCMethod, HasFunctionProto, ParmVar, Var, Field], WarnDiag, ++ "functions, methods, and parameters (EnhanceC: additional applies to vars and fields)">; + let Args = [VariadicParamIdxArgument<"Args">]; + let AdditionalMembers = [{ + bool isNonNull(unsigned IdxAST) const { +@@ -1961,7 +1961,7 @@ def NonNull : InheritableParamAttr { + + def ReturnsNonNull : InheritableAttr { + let Spellings = [GCC<"returns_nonnull">]; +- let Subjects = SubjectList<[ObjCMethod, Function]>; ++ let Subjects = SubjectList<[ObjCMethod, Function, Var, Field]>; + let Documentation = [ReturnsNonNullDocs]; + } + +@@ -4047,3 +4047,80 @@ def FunctionReturnThunks : InheritableAttr, + let Subjects = SubjectList<[Function]>; + let Documentation = [FunctionReturnThunksDocs]; + } ++// EnhanceC attributes ++def Count : InheritableParamAttr { ++ let Spellings = [GNU<"count">]; ++ let Subjects = SubjectList<[Function, ParmVar, Field, Var]>; ++ let Documentation = [Undocumented]; ++ let Args = [ExprArgument<"LenExpr">, VariadicParamIdxArgument<"Index">]; ++ let InheritEvenIfAlreadyPresent = 1; ++ let LateParsed = 1; ++ let TemplateDependent = 1; ++} ++ ++def ReturnsCount : InheritableAttr { ++ let Spellings = [GNU<"returns_count">]; ++ let Subjects = SubjectList<[Function, Var, Field]>; ++ let Documentation = [Undocumented]; ++ let Args = [ExprArgument<"LenExpr">]; ++ let InheritEvenIfAlreadyPresent = 1; ++ let LateParsed = 1; ++ let TemplateDependent = 1; ++} ++ ++def CountIndex : InheritableParamAttr { ++ let Spellings = [GNU<"count_index">]; ++ let Subjects = SubjectList<[Function, ParmVar, Field, Var]>; ++ let Documentation = [Undocumented]; ++ let Args = [ParamIdxArgument<"LenVarIndex">, VariadicParamIdxArgument<"Index">]; ++ let InheritEvenIfAlreadyPresent = 1; ++ let TemplateDependent = 1; ++} ++ ++def ReturnsCountIndex : InheritableAttr { ++ let Spellings = [GNU<"returns_count_index">]; ++ let Subjects = SubjectList<[Function, Field, Var]>; ++ let Documentation = [Undocumented]; ++ let Args = [ParamIdxArgument<"LenVarIndex">]; ++ let InheritEvenIfAlreadyPresent = 1; ++ let TemplateDependent = 1; ++} ++ ++// byte_count ++def ByteCount : InheritableParamAttr { ++ let Spellings = [GNU<"byte_count">]; ++ let Subjects = SubjectList<[Function, ParmVar, Field, Var]>; ++ let Documentation = [Undocumented]; ++ let Args = [ExprArgument<"LenExpr">, VariadicParamIdxArgument<"Index">]; ++ let InheritEvenIfAlreadyPresent = 1; ++ let LateParsed = 1; ++ let TemplateDependent = 1; ++} ++ ++def ReturnsByteCount : InheritableAttr { ++ let Spellings = [GNU<"returns_byte_count">]; ++ let Subjects = SubjectList<[Function, Var, Field]>; ++ let Documentation = [Undocumented]; ++ let Args = [ExprArgument<"LenExpr">]; ++ let InheritEvenIfAlreadyPresent = 1; ++ let LateParsed = 1; ++ let TemplateDependent = 1; ++} ++ ++def ByteCountIndex : InheritableParamAttr { ++ let Spellings = [GNU<"byte_count_index">]; ++ let Subjects = SubjectList<[Function, ParmVar, Field, Var]>; ++ let Documentation = [Undocumented]; ++ let Args = [ParamIdxArgument<"LenVarIndex">, VariadicParamIdxArgument<"Index">]; ++ let InheritEvenIfAlreadyPresent = 1; ++ let TemplateDependent = 1; ++} ++ ++def ReturnsByteCountIndex : InheritableAttr { ++ let Spellings = [GNU<"returns_byte_count_index">]; ++ let Subjects = SubjectList<[Function, Var, Field]>; ++ let Documentation = [Undocumented]; ++ let Args = [ParamIdxArgument<"LenVarIndex">]; ++ let InheritEvenIfAlreadyPresent = 1; ++ let TemplateDependent = 1; ++} +diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td +index cb460401eb47..045e443db8a2 100644 +--- a/clang/include/clang/Basic/DiagnosticSemaKinds.td ++++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td +@@ -3087,9 +3087,22 @@ def err_attribute_only_once_per_parameter : Error< + "%0 attribute can only be applied once per parameter">; + def err_mismatched_uuid : Error<"uuid does not match previous declaration">; + def note_previous_uuid : Note<"previous uuid specified here">; ++// EnhanceC + def warn_attribute_pointers_only : Warning< +- "%0 attribute only applies to%select{| constant}1 pointer arguments">, ++ "(EnhanceC) %0 attribute only applies to%select{| constant}1 pointer arguments, vars or fields)">, + InGroup; ++def warn_attribute_no_pointers : Warning< ++ "(EnhanceC) %0 attribute applied to function with no pointer arguments">, ++ InGroup; ++def err_attribute_redundant_pointers : Error< ++ "(EnhanceC) %0 attribute applied to function with more than one pointer arguments, " ++ "please specify the index argument in the %0 attribute">; ++def warn_attribute_function_pointer : Warning< ++ "(EnhanceC) %0 attribute applied to function and function type pointer">, ++ InGroup; ++def err_attribute_zero_pointer : Error< ++ "(EnhanceC) %0 attribute: The number of pointer arguments index cannot be zero">; ++ + def err_attribute_pointers_only : Error; + def err_attribute_integers_only : Error< + "%0 attribute argument may only refer to a function parameter of integer " +diff --git a/clang/include/clang/Basic/Specifiers.h b/clang/include/clang/Basic/Specifiers.h +index 7657ae36d21b..65f8852c40a3 100644 +--- a/clang/include/clang/Basic/Specifiers.h ++++ b/clang/include/clang/Basic/Specifiers.h +@@ -390,6 +390,12 @@ namespace clang { + } + llvm_unreachable("Unknown AccessSpecifier"); + } ++ ++ enum SafeScopeSpecifier { ++ SS_None = 0, ++ SS_Safe = 1, ++ SS_Unsafe = 2, ++ }; + } // end namespace clang + + #endif // LLVM_CLANG_BASIC_SPECIFIERS_H +diff --git a/clang/include/clang/Basic/TokenKinds.def b/clang/include/clang/Basic/TokenKinds.def +index 84fc0893c8b5..077ceb41e715 100644 +--- a/clang/include/clang/Basic/TokenKinds.def ++++ b/clang/include/clang/Basic/TokenKinds.def +@@ -714,6 +714,10 @@ ALIAS("_uuidof" , __uuidof , KEYMS | KEYBORLAND) + ALIAS("_virtual_inheritance", __virtual_inheritance, KEYMSCOMPAT) + ALIAS("_w64" , __w64 , KEYMSCOMPAT) + ++// safe region key word ++KEYWORD(__Safe__ , KEYALL) ++KEYWORD(__Unsafe__ , KEYALL) ++ + // Borland Extensions which should be disabled in strict conformance mode. + ALIAS("_pascal" , __pascal , KEYBORLAND) + +@@ -794,6 +798,11 @@ ANNOTATION(decltype) // annotation for a decltype expression, + // one 'pragma_unused' annotation token followed by the argument token. + PRAGMA_ANNOTATION(pragma_unused) + ++// Annotations for SAFE pragma ++// The lexer produces these so that they only take effect when the parser ++// handles #pragma SAFE ... directives. ++PRAGMA_ANNOTATION(pragma_safe) ++ + // Annotation for #pragma GCC visibility... + // The lexer produces these so that they only take effect when the parser + // handles them. +diff --git a/clang/include/clang/Parse/Parser.h b/clang/include/clang/Parse/Parser.h +index 41bfc9f48ecc..e6cd5659e63f 100644 +--- a/clang/include/clang/Parse/Parser.h ++++ b/clang/include/clang/Parse/Parser.h +@@ -216,6 +216,7 @@ class Parser : public CodeCompletionHandler { + std::unique_ptr MaxTokensHerePragmaHandler; + std::unique_ptr MaxTokensTotalPragmaHandler; + std::unique_ptr RISCVPragmaHandler; ++ std::unique_ptr SafeHandler; + + std::unique_ptr CommentSemaHandler; + +@@ -790,6 +791,8 @@ private: + + void HandlePragmaAttribute(); + ++ void HandlePragmaSafe(); ++ + /// GetLookAheadToken - This peeks ahead N tokens and returns that token + /// without consuming any tokens. LookAhead(0) returns 'Tok', LookAhead(1) + /// returns the token after Tok, etc. +@@ -2092,7 +2095,9 @@ private: + unsigned ScopeFlags); + void ParseCompoundStatementLeadingPragmas(); + bool ConsumeNullStmt(StmtVector &Stmts); +- StmtResult ParseCompoundStatementBody(bool isStmtExpr = false); ++ StmtResult ParseCompoundStatementBody(bool isStmtExpr = false, ++ SafeScopeSpecifier SafeSpec = SS_None, ++ SourceLocation SafeLoc = SourceLocation()); + bool ParseParenExprOrCondition(StmtResult *InitStmt, + Sema::ConditionResult &CondResult, + SourceLocation Loc, Sema::ConditionKind CK, +diff --git a/clang/include/clang/Sema/DeclSpec.h b/clang/include/clang/Sema/DeclSpec.h +index 21d4a53d8e22..2a23d068e592 100644 +--- a/clang/include/clang/Sema/DeclSpec.h ++++ b/clang/include/clang/Sema/DeclSpec.h +@@ -367,6 +367,10 @@ private: + /// ExplicitSpecifier - Store information about explicit spicifer. + ExplicitSpecifier FS_explicit_specifier; + ++ SafeScopeSpecifier FS_safe_specified; ++ ++ SourceLocation FS_safe_loc; ++ + // attributes. + ParsedAttributes Attrs; + +@@ -434,6 +438,8 @@ public: + FS_noreturn_specified(false), Friend_specified(false), + ConstexprSpecifier( + static_cast(ConstexprSpecKind::Unspecified)), ++ FS_explicit_specifier(), ++ FS_safe_specified(SS_None), FS_safe_loc(), + Attrs(attrFactory), writtenBS(), ObjCQualifiers(nullptr) {} + + // storage-class-specifier +@@ -589,6 +595,14 @@ public: + : SourceRange(FS_explicitLoc); + } + ++ SafeScopeSpecifier getSafeSpecifier() const { ++ return FS_safe_specified; ++ } ++ ++ SourceLocation getSafeSpecifierLoc() const { ++ return FS_safe_loc; ++ } ++ + bool isNoreturnSpecified() const { return FS_noreturn_specified; } + SourceLocation getNoreturnSpecLoc() const { return FS_noreturnLoc; } + +@@ -602,6 +616,8 @@ public: + FS_explicit_specifier = ExplicitSpecifier(); + FS_explicitLoc = SourceLocation(); + FS_explicitCloseParenLoc = SourceLocation(); ++ FS_safe_specified = SS_None; ++ FS_safe_loc = SourceLocation(); + FS_noreturn_specified = false; + FS_noreturnLoc = SourceLocation(); + } +@@ -738,6 +754,8 @@ public: + SourceLocation CloseParenLoc); + bool setFunctionSpecNoreturn(SourceLocation Loc, const char *&PrevSpec, + unsigned &DiagID); ++ bool setFunctionSafeSpecifier(SourceLocation Loc, const char *&PrevSpec, ++ unsigned &DiagID, SafeScopeSpecifier SafeSpec); + + bool SetFriendSpec(SourceLocation Loc, const char *&PrevSpec, + unsigned &DiagID); +diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h +index 681a76dfa56a..6e70a9573fdf 100644 +--- a/clang/include/clang/Sema/Sema.h ++++ b/clang/include/clang/Sema/Sema.h +@@ -4899,7 +4899,28 @@ public: + void ActOnAfterCompoundStatementLeadingPragmas(); + void ActOnFinishOfCompoundStmt(); + StmtResult ActOnCompoundStmt(SourceLocation L, SourceLocation R, +- ArrayRef Elts, bool isStmtExpr); ++ ArrayRef Elts, bool isStmtExpr, ++ SafeScopeSpecifier SafeSpec = SS_None, ++ SourceLocation SafeLoc = SourceLocation()); ++ ++private: ++ SafeScopeSpecifier PragmaSafeInfo = SS_None; ++ ++public: ++ enum PragmaSafeStatus { ++ PSS_On, ++ PSS_Off, ++ }; ++ ++ void ActOnPragmaSafe(PragmaSafeStatus St); ++ ++ SafeScopeSpecifier GetPragmaSafeInfo() { ++ return PragmaSafeInfo; ++ } ++ ++ void SetPragmaSafeInfo(SafeScopeSpecifier SafeSpec) { ++ PragmaSafeInfo = SafeSpec; ++ } + + /// A RAII object to enter scope of a compound statement. + class CompoundScopeRAII { +diff --git a/clang/lib/AST/ASTDumper.cpp b/clang/lib/AST/ASTDumper.cpp +index c6df61f79e2e..839f57e2bb25 100644 +--- a/clang/lib/AST/ASTDumper.cpp ++++ b/clang/lib/AST/ASTDumper.cpp +@@ -143,6 +143,17 @@ void ASTDumper::VisitVarTemplateDecl(const VarTemplateDecl *D) { + dumpTemplateDecl(D, false); + } + ++void ASTDumper::VisitCompoundStmt(const CompoundStmt *Node) { ++ VisitStmt(Node); ++ SafeScopeSpecifier SafeSpec = Node->getSafeSpecifier(); ++ ++ if (SafeSpec == SS_Safe) { ++ OS << " safe"; ++ } else if (SafeSpec == SS_Unsafe) { ++ OS << " unsafe"; ++ } ++} ++ + //===----------------------------------------------------------------------===// + // Type method implementations + //===----------------------------------------------------------------------===// +diff --git a/clang/lib/AST/ASTImporter.cpp b/clang/lib/AST/ASTImporter.cpp +index 0273e5068371..0bb572b0f61d 100644 +--- a/clang/lib/AST/ASTImporter.cpp ++++ b/clang/lib/AST/ASTImporter.cpp +@@ -6368,10 +6368,17 @@ ExpectedStmt ASTNodeImporter::VisitCompoundStmt(CompoundStmt *S) { + if (!ToRBracLocOrErr) + return ToRBracLocOrErr.takeError(); + ++ ExpectedSLoc ToSafeSpecifierLocOrErr = import(S->getSafeSpecifierLoc()); ++ if (!ToSafeSpecifierLocOrErr) ++ return ToSafeSpecifierLocOrErr.takeError(); ++ + FPOptionsOverride FPO = + S->hasStoredFPFeatures() ? S->getStoredFPFeatures() : FPOptionsOverride(); +- return CompoundStmt::Create(Importer.getToContext(), ToStmts, FPO, +- *ToLBracLocOrErr, *ToRBracLocOrErr); ++ ++ return CompoundStmt::Create( ++ Importer.getToContext(), ToStmts, FPO, ++ *ToLBracLocOrErr, *ToRBracLocOrErr, ++ S->getSafeSpecifier(), *ToSafeSpecifierLocOrErr); + } + + ExpectedStmt ASTNodeImporter::VisitCaseStmt(CaseStmt *S) { +diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp +index aaba4345587b..94d1cad0317c 100644 +--- a/clang/lib/AST/Decl.cpp ++++ b/clang/lib/AST/Decl.cpp +@@ -2967,6 +2967,7 @@ FunctionDecl::FunctionDecl(Kind DK, ASTContext &C, DeclContext *DC, + FunctionDeclBits.UsesFPIntrin = UsesFPIntrin; + FunctionDeclBits.HasSkippedBody = false; + FunctionDeclBits.WillHaveBody = false; ++ FunctionDeclBits.SafeSpecifier = SS_None; + FunctionDeclBits.IsMultiVersion = false; + FunctionDeclBits.IsCopyDeductionCandidate = false; + FunctionDeclBits.HasODRHash = false; +diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp +index 9d92c848ccb8..cd852a076d81 100644 +--- a/clang/lib/AST/ExprConstant.cpp ++++ b/clang/lib/AST/ExprConstant.cpp +@@ -10686,6 +10686,8 @@ static bool EvaluateArrayNewConstructExpr(EvalInfo &Info, LValue &This, + + // Return true iff the given array filler may depend on the element index. + static bool MaybeElementDependentArrayFiller(const Expr *FillerExpr) { ++ if (!FillerExpr) ++ return false; + // For now, just allow non-class value-initialization and initialization + // lists comprised of them. + if (isa(FillerExpr)) +@@ -14843,6 +14845,8 @@ static bool Evaluate(APValue &Result, EvalInfo &Info, const Expr *E) { + /// an object can indirectly refer to subobjects which were initialized earlier. + static bool EvaluateInPlace(APValue &Result, EvalInfo &Info, const LValue &This, + const Expr *E, bool AllowNonLiteralTypes) { ++ if (!E) ++ return false; + assert(!E->isValueDependent()); + + if (!AllowNonLiteralTypes && !CheckLiteralType(Info, E, &This)) +diff --git a/clang/lib/AST/Stmt.cpp b/clang/lib/AST/Stmt.cpp +index 8eae04d0d9fd..955556b6230a 100644 +--- a/clang/lib/AST/Stmt.cpp ++++ b/clang/lib/AST/Stmt.cpp +@@ -362,8 +362,9 @@ int64_t Stmt::getID(const ASTContext &Context) const { + } + + CompoundStmt::CompoundStmt(ArrayRef Stmts, FPOptionsOverride FPFeatures, +- SourceLocation LB, SourceLocation RB) +- : Stmt(CompoundStmtClass), LBraceLoc(LB), RBraceLoc(RB) { ++ SourceLocation LB, SourceLocation RB, ++ SafeScopeSpecifier SafeSpec, SourceLocation SafeLoc) ++ : Stmt(CompoundStmtClass), LBraceLoc(LB), RBraceLoc(RB), SafeSpec(SafeSpec), SafeLoc(SafeLoc) { + CompoundStmtBits.NumStmts = Stmts.size(); + CompoundStmtBits.HasFPFeatures = FPFeatures.requiresTrailingStorage(); + setStmts(Stmts); +@@ -380,12 +381,12 @@ void CompoundStmt::setStmts(ArrayRef Stmts) { + + CompoundStmt *CompoundStmt::Create(const ASTContext &C, ArrayRef Stmts, + FPOptionsOverride FPFeatures, +- SourceLocation LB, SourceLocation RB) { ++ SourceLocation LB, SourceLocation RB, ++ SafeScopeSpecifier SafeSpec, SourceLocation SafeLoc) { + void *Mem = +- C.Allocate(totalSizeToAlloc( +- Stmts.size(), FPFeatures.requiresTrailingStorage()), +- alignof(CompoundStmt)); +- return new (Mem) CompoundStmt(Stmts, FPFeatures, LB, RB); ++ C.Allocate(totalSizeToAlloc(Stmts.size(), FPFeatures.requiresTrailingStorage()), ++ alignof(CompoundStmt)); ++ return new (Mem) CompoundStmt(Stmts, FPFeatures, LB, RB, SafeSpec, SafeLoc); + } + + CompoundStmt *CompoundStmt::CreateEmpty(const ASTContext &C, unsigned NumStmts, +diff --git a/clang/lib/AST/TextNodeDumper.cpp b/clang/lib/AST/TextNodeDumper.cpp +index 22643d4edbec..853a678545ef 100644 +--- a/clang/lib/AST/TextNodeDumper.cpp ++++ b/clang/lib/AST/TextNodeDumper.cpp +@@ -1684,6 +1684,12 @@ void TextNodeDumper::VisitFunctionDecl(const FunctionDecl *D) { + if (D->isIneligibleOrNotSelected()) + OS << (isa(D) ? " not_selected" : " ineligible"); + ++ if (D->getSafeSpecifier() == SS_Safe) { ++ OS << " safe"; ++ } else if (D->getSafeSpecifier() == SS_Unsafe) { ++ OS << " unsafe"; ++ } ++ + if (const auto *FPT = D->getType()->getAs()) { + FunctionProtoType::ExtProtoInfo EPI = FPT->getExtProtoInfo(); + switch (EPI.ExceptionSpec.Type) { +diff --git a/clang/lib/Basic/Targets/AArch64.cpp b/clang/lib/Basic/Targets/AArch64.cpp +index 8d8972c1613a..8c38e11aae07 100644 +--- a/clang/lib/Basic/Targets/AArch64.cpp ++++ b/clang/lib/Basic/Targets/AArch64.cpp +@@ -64,7 +64,8 @@ StringRef AArch64TargetInfo::getArchProfile() const { + AArch64TargetInfo::AArch64TargetInfo(const llvm::Triple &Triple, + const TargetOptions &Opts) + : TargetInfo(Triple), ABI("aapcs") { +- if (getTriple().isOSOpenBSD()) { ++ if (getTriple().isOSOpenBSD() || ++ getTriple().getEnvironment() == llvm::Triple::GNUILP32) { + Int64Type = SignedLongLong; + IntMaxType = SignedLongLong; + } else { +@@ -79,7 +80,8 @@ AArch64TargetInfo::AArch64TargetInfo(const llvm::Triple &Triple, + HasLegalHalfType = true; + HasFloat16 = true; + +- if (Triple.isArch64Bit()) ++ if (Triple.isArch64Bit() && ++ getTriple().getEnvironment() != llvm::Triple::GNUILP32) + LongWidth = LongAlign = PointerWidth = PointerAlign = 64; + else + LongWidth = LongAlign = PointerWidth = PointerAlign = 32; +@@ -264,10 +266,15 @@ void AArch64TargetInfo::getTargetDefines(const LangOptions &Opts, + Builder.defineMacro("__ELF__"); + + // Target properties. +- if (!getTriple().isOSWindows() && getTriple().isArch64Bit()) { ++ if (!getTriple().isOSWindows() && getTriple().isArch64Bit() && ++ getTriple().getEnvironment() != llvm::Triple::GNUILP32) { + Builder.defineMacro("_LP64"); + Builder.defineMacro("__LP64__"); + } ++ if (getTriple().getEnvironment() == llvm::Triple::GNUILP32) { ++ Builder.defineMacro("_ILP32"); ++ Builder.defineMacro("__ILP32__"); ++ } + + std::string CodeModel = getTargetOpts().CodeModel; + if (CodeModel == "default") +@@ -886,9 +893,14 @@ void AArch64leTargetInfo::setDataLayout() { + if(getTriple().isArch32Bit()) + resetDataLayout("e-m:o-p:32:32-i64:64-i128:128-n32:64-S128", "_"); + else +- resetDataLayout("e-m:o-i64:64-i128:128-n32:64-S128", "_"); +- } else +- resetDataLayout("e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"); ++ resetDataLayout("e-m:o-i64:64-i128:128-n32:64-S128"); ++ } else { ++ if (getTriple().getEnvironment() == llvm::Triple::GNUILP32) ++ resetDataLayout( ++ "e-m:e-p:32:32-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"); ++ else ++ resetDataLayout("e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"); ++ } + } + + void AArch64leTargetInfo::getTargetDefines(const LangOptions &Opts, +@@ -911,7 +923,11 @@ void AArch64beTargetInfo::getTargetDefines(const LangOptions &Opts, + + void AArch64beTargetInfo::setDataLayout() { + assert(!getTriple().isOSBinFormatMachO()); +- resetDataLayout("E-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"); ++ if (getTriple().getEnvironment() == llvm::Triple::GNUILP32) ++ resetDataLayout( ++ "E-m:e-p:32:32-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"); ++ else ++ resetDataLayout("E-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"); + } + + WindowsARM64TargetInfo::WindowsARM64TargetInfo(const llvm::Triple &Triple, +diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp +index aef9909a7c97..7c94c236a1da 100644 +--- a/clang/lib/Parse/ParseDecl.cpp ++++ b/clang/lib/Parse/ParseDecl.cpp +@@ -2631,7 +2631,7 @@ void Parser::ParseSpecifierQualifierList(DeclSpec &DS, AccessSpecifier AS, + static bool isValidAfterIdentifierInDeclarator(const Token &T) { + return T.isOneOf(tok::l_square, tok::l_paren, tok::r_paren, tok::semi, + tok::comma, tok::equal, tok::kw_asm, tok::l_brace, +- tok::colon); ++ tok::colon, tok::kw___Safe__, tok::kw___Unsafe__); + } + + /// ParseImplicitInt - This method is called when we have an non-typename +@@ -4127,6 +4127,22 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS, + PrevSpec, DiagID, Policy); + break; + ++ // safe-specifier: ++ case tok::kw___Safe__: ++ case tok::kw___Unsafe__: { ++ if (GetLookAheadToken(1).is(tok::l_square)) { ++ goto DoneWithDeclSpec; ++ } else if (GetLookAheadToken(1).is(tok::l_brace)) { ++ break; ++ } else { ++ SafeScopeSpecifier SafeSpec = SS_Unsafe; ++ if (Tok.is(tok::kw___Safe__)) { ++ SafeSpec = SS_Safe; ++ } ++ isInvalid = DS.setFunctionSafeSpecifier(Loc, PrevSpec, DiagID, SafeSpec); ++ break; ++ } ++ } + // class-specifier: + case tok::kw_class: + case tok::kw_struct: +diff --git a/clang/lib/Parse/ParsePragma.cpp b/clang/lib/Parse/ParsePragma.cpp +index 74fa70379858..7a1c87d30be4 100644 +--- a/clang/lib/Parse/ParsePragma.cpp ++++ b/clang/lib/Parse/ParsePragma.cpp +@@ -338,6 +338,12 @@ struct PragmaAttributeHandler : public PragmaHandler { + ParsedAttributes AttributesForPragmaAttribute; + }; + ++struct PragmaSafeHandler : public PragmaHandler { ++ PragmaSafeHandler() : PragmaHandler("SAFE") {} ++ void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, ++ Token &FirstToken) override; ++}; ++ + struct PragmaMaxTokensHereHandler : public PragmaHandler { + PragmaMaxTokensHereHandler() : PragmaHandler("max_tokens_here") {} + void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, +@@ -508,6 +514,9 @@ void Parser::initializePragmaHandlers() { + RISCVPragmaHandler = std::make_unique(Actions); + PP.AddPragmaHandler("clang", RISCVPragmaHandler.get()); + } ++ ++ SafeHandler.reset(new PragmaSafeHandler()); ++ PP.AddPragmaHandler(SafeHandler.get()); + } + + void Parser::resetPragmaHandlers() { +@@ -637,6 +646,9 @@ void Parser::resetPragmaHandlers() { + PP.RemovePragmaHandler("clang", RISCVPragmaHandler.get()); + RISCVPragmaHandler.reset(); + } ++ ++ PP.RemovePragmaHandler(SafeHandler.get()); ++ SafeHandler.reset(); + } + + /// Handle the annotation token produced for #pragma unused(...) +@@ -1896,6 +1908,14 @@ void Parser::HandlePragmaAttribute() { + } + } + ++void Parser::HandlePragmaSafe() { ++ assert(Tok.is(tok::annot_pragma_safe)); ++ Sema::PragmaSafeStatus St = static_cast( ++ reinterpret_cast(Tok.getAnnotationValue())); ++ (void)ConsumeAnnotationToken(); ++ Actions.ActOnPragmaSafe(St); ++} ++ + // #pragma GCC visibility comes in two variants: + // 'push' '(' [visibility] ')' + // 'pop' +@@ -3889,6 +3909,37 @@ void PragmaAttributeHandler::HandlePragma(Preprocessor &PP, + /*DisableMacroExpansion=*/false, /*IsReinject=*/false); + } + ++void PragmaSafeHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, ++ Token &Tok) { ++ PP.Lex(Tok); ++ Sema::PragmaSafeStatus St = Sema::PSS_On; ++ ++ if (!Tok.is(tok::identifier)) { ++ return; ++ } ++ ++ IdentifierInfo *II = Tok.getIdentifierInfo(); ++ if (II->isStr("ON")) ++ St = Sema::PSS_On; ++ else if (II->isStr("OFF")) ++ St = Sema::PSS_Off; ++ else ++ return; ++ ++ PP.Lex(Tok); ++ if (Tok.isNot(tok::eod)) ++ PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << "SAFE"; ++ ++ MutableArrayRef Toks(PP.getPreprocessorAllocator().Allocate(1), 1); ++ Toks[0].startToken(); ++ Toks[0].setKind(tok::annot_pragma_safe); ++ Toks[0].setLocation(Tok.getLocation()); ++ Toks[0].setAnnotationEndLoc(Tok.getLocation()); ++ Toks[0].setAnnotationValue( ++ reinterpret_cast(static_cast(St))); ++ PP.EnterTokenStream(Toks, true, false); ++} ++ + // Handle '#pragma clang max_tokens 12345'. + void PragmaMaxTokensHereHandler::HandlePragma(Preprocessor &PP, + PragmaIntroducer Introducer, +diff --git a/clang/lib/Parse/ParseStmt.cpp b/clang/lib/Parse/ParseStmt.cpp +index 1f6c74aeae7e..5f866402a1ad 100644 +--- a/clang/lib/Parse/ParseStmt.cpp ++++ b/clang/lib/Parse/ParseStmt.cpp +@@ -225,6 +225,7 @@ Retry: + LLVM_FALLTHROUGH; + } + ++Default: + default: { + bool HaveAttrs = !CXX11Attrs.empty() || !GNUAttrs.empty(); + auto IsStmtAttr = [](ParsedAttr &Attr) { return Attr.isStmtAttr(); }; +@@ -264,6 +265,14 @@ Retry: + return ParseExprStatement(StmtCtx); + } + ++ case tok::kw___Safe__: ++ case tok::kw___Unsafe__: { ++ Token Next = NextToken(); ++ if (Next.is(tok::l_brace)) ++ return ParseCompoundStatement(); ++ goto Default; ++ } ++ + case tok::kw___attribute: { + GNUAttributeLoc = Tok.getLocation(); + ParseGNUAttributes(GNUAttrs); +@@ -483,6 +492,10 @@ Retry: + case tok::annot_pragma_attribute: + HandlePragmaAttribute(); + return StmtEmpty(); ++ ++ case tok::annot_pragma_safe: ++ HandlePragmaSafe(); ++ return StmtEmpty(); + } + + // If we reached this code, the statement must end in a semicolon. +@@ -956,6 +969,18 @@ StmtResult Parser::ParseCompoundStatement(bool isStmtExpr) { + /// + StmtResult Parser::ParseCompoundStatement(bool isStmtExpr, + unsigned ScopeFlags) { ++ // Add security scope identification processing. ++ SafeScopeSpecifier SafeSpec = SS_None; ++ SourceLocation SafeLoc; ++ ++ if (Tok.is(tok::kw___Safe__)) { ++ SafeSpec = SS_Safe; ++ SafeLoc = ConsumeToken(); ++ } else if (Tok.is(tok::kw___Unsafe__)) { ++ SafeSpec = SS_Unsafe; ++ SafeLoc = ConsumeToken(); ++ } ++ + assert(Tok.is(tok::l_brace) && "Not a compount stmt!"); + + // Enter a scope to hold everything within the compound stmt. Compound +@@ -963,7 +988,7 @@ StmtResult Parser::ParseCompoundStatement(bool isStmtExpr, + ParseScope CompoundScope(this, ScopeFlags); + + // Parse the statements in the body. +- return ParseCompoundStatementBody(isStmtExpr); ++ return ParseCompoundStatementBody(isStmtExpr, SafeSpec, SafeLoc); + } + + /// Parse any pragmas at the start of the compound expression. We handle these +@@ -1025,6 +1050,9 @@ void Parser::ParseCompoundStatementLeadingPragmas() { + case tok::annot_pragma_dump: + HandlePragmaDump(); + break; ++ case tok::annot_pragma_safe: ++ HandlePragmaSafe(); ++ break; + default: + checkForPragmas = false; + break; +@@ -1086,7 +1114,7 @@ StmtResult Parser::handleExprStmt(ExprResult E, ParsedStmtContext StmtCtx) { + /// ActOnCompoundStmt action. This expects the '{' to be the current token, and + /// consume the '}' at the end of the block. It does not manipulate the scope + /// stack. +-StmtResult Parser::ParseCompoundStatementBody(bool isStmtExpr) { ++StmtResult Parser::ParseCompoundStatementBody(bool isStmtExpr, SafeScopeSpecifier SafeSpec, SourceLocation SafeLoc) { + PrettyStackTraceLoc CrashInfo(PP.getSourceManager(), + Tok.getLocation(), + "in compound statement ('{}')"); +@@ -1227,7 +1255,7 @@ StmtResult Parser::ParseCompoundStatementBody(bool isStmtExpr) { + CloseLoc = T.getCloseLocation(); + + return Actions.ActOnCompoundStmt(T.getOpenLocation(), CloseLoc, +- Stmts, isStmtExpr); ++ Stmts, isStmtExpr, SafeSpec, SafeLoc); + } + + /// ParseParenExprOrCondition: +diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp +index fd044660845b..58a759f7f1ca 100644 +--- a/clang/lib/Parse/Parser.cpp ++++ b/clang/lib/Parse/Parser.cpp +@@ -623,6 +623,10 @@ bool Parser::ParseTopLevelDecl(DeclGroupPtrTy &Result, + HandlePragmaUnused(); + return false; + ++ case tok::annot_pragma_safe: ++ HandlePragmaSafe(); ++ return false; ++ + case tok::kw_export: + switch (NextToken().getKind()) { + case tok::kw_module: +diff --git a/clang/lib/Sema/DeclSpec.cpp b/clang/lib/Sema/DeclSpec.cpp +index d4dc790c008a..a4d864950771 100644 +--- a/clang/lib/Sema/DeclSpec.cpp ++++ b/clang/lib/Sema/DeclSpec.cpp +@@ -462,7 +462,7 @@ unsigned DeclSpec::getParsedSpecifiers() const { + Res |= PQ_TypeSpecifier; + + if (FS_inline_specified || FS_virtual_specified || hasExplicitSpecifier() || +- FS_noreturn_specified || FS_forceinline_specified) ++ FS_noreturn_specified || FS_forceinline_specified || FS_safe_specified) + Res |= PQ_FunctionSpecifier; + return Res; + } +@@ -1059,6 +1059,24 @@ bool DeclSpec::setFunctionSpecNoreturn(SourceLocation Loc, + return false; + } + ++bool DeclSpec::setFunctionSafeSpecifier(SourceLocation Loc, ++ const char *&PrevSpec, ++ unsigned &DiagID, ++ SafeScopeSpecifier SafeSpec) { ++ if (FS_safe_specified == SS_None) { ++ FS_safe_specified = SafeSpec; ++ FS_safe_loc = Loc; ++ return false; ++ } else if (FS_safe_specified == SS_Safe) { ++ PrevSpec = "safe"; ++ } else if (FS_safe_specified == SS_Unsafe) { ++ PrevSpec = "unsafe"; ++ } else { ++ PrevSpec = ""; ++ } ++ return true; ++} ++ + bool DeclSpec::SetFriendSpec(SourceLocation Loc, const char *&PrevSpec, + unsigned &DiagID) { + if (Friend_specified) { +diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp +index 75ffa8b0a90a..e2199e5f9f69 100644 +--- a/clang/lib/Sema/SemaDecl.cpp ++++ b/clang/lib/Sema/SemaDecl.cpp +@@ -9473,6 +9473,12 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, + isVirtualOkay); + if (!NewFD) return nullptr; + ++ SafeScopeSpecifier FuncSpec = D.getDeclSpec().getSafeSpecifier(); ++ if (FuncSpec == SS_None) { ++ FuncSpec = GetPragmaSafeInfo(); ++ } ++ NewFD->setSafeSpecifier(FuncSpec); ++ + if (OriginalLexicalContext && OriginalLexicalContext->isObjCContainer()) + NewFD->setTopLevelDeclInObjCContainer(); + +diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp +index 838fd48357fb..64f1a75e054c 100644 +--- a/clang/lib/Sema/SemaDeclAttr.cpp ++++ b/clang/lib/Sema/SemaDeclAttr.cpp +@@ -1576,6 +1576,77 @@ static bool attrNonNullArgCheck(Sema &S, QualType T, const ParsedAttr &AL, + return true; + } + ++// EnhanceC ++template ++static bool checkFunctionTypeIndex( ++ Sema &S, const Decl *D, const AttrInfo &AI, unsigned AttrArgNum, ++ const Expr *IdxExpr, ParamIdx &Idx, const FunctionProtoType *Proto) { ++ ++ unsigned NumParams = Proto->getNumParams(); ++ ++ Optional IdxInt; ++ if (IdxExpr->isTypeDependent() || IdxExpr->isValueDependent() || ++ !(IdxInt = IdxExpr->getIntegerConstantExpr(S.Context))) { ++ S.Diag(getAttrLoc(AI), diag::err_attribute_argument_n_type) ++ << &AI << AttrArgNum << AANT_ArgumentIntegerConstant ++ << IdxExpr->getSourceRange(); ++ return false; ++ } ++ ++ unsigned IdxSource = IdxInt->getLimitedValue(UINT_MAX); ++ if (IdxSource < 1 || (!Proto->isVariadic() && IdxSource > NumParams)) { ++ S.Diag(getAttrLoc(AI), diag::err_attribute_argument_out_of_bounds) ++ << &AI << AttrArgNum << IdxExpr->getSourceRange(); ++ return false; ++ } ++ ++ Idx = ParamIdx(IdxSource, D); ++ return true; ++} ++ ++static void handleNonNullFuncPtrParams(Sema &S, Decl *D, const ParsedAttr &AL, QualType Ty) { ++ const FunctionProtoType *Proto = nullptr; ++ if (Ty->isFunctionPointerType() || Ty->isBlockPointerType()) ++ Ty = Ty->getPointeeType(); ++ const FunctionType *FT = Ty->getAs(); ++ if (FT) ++ Proto = dyn_cast(FT); ++ if (Proto == nullptr) ++ return; ++ SmallVector NonNullArgs; ++ for (unsigned I = 0; I < AL.getNumArgs(); ++I) { ++ Expr *Ex = AL.getArgAsExpr(I); ++ ParamIdx Idx; ++ if (!checkFunctionTypeIndex(S, D, AL, I + 1, Ex, Idx, Proto)) ++ return; ++ ++ // Is the function type argument a pointer type ++ if (!attrNonNullArgCheck( ++ S, Proto->getParamType(Idx.getASTIndex()), AL, ++ Ex->getSourceRange(), ++ SourceRange())) ++ continue; ++ ++ NonNullArgs.push_back(Idx); ++ } ++ ParamIdx *Start = NonNullArgs.data(); ++ unsigned Size = NonNullArgs.size(); ++ llvm::array_pod_sort(Start, Start + Size); ++ D->addAttr(::new (S.Context) NonNullAttr(S.Context, AL, Start, Size)); ++} ++ ++static void handleNonNullAttrVarAndField(Sema &S, Decl *D, const ParsedAttr &AL) { ++ const auto *VD = dyn_cast(D); ++ if (VD == nullptr || ++ !attrNonNullArgCheck(S, VD->getType(), AL, SourceRange(), D->getSourceRange())) { ++ return; ++ } ++ if (VD->getType()->isFunctionPointerType() && AL.getNumArgs() > 0) ++ handleNonNullFuncPtrParams(S, D, AL, VD->getType()); ++ else ++ D->addAttr(::new (S.Context) NonNullAttr(S.Context, AL, nullptr, 0)); ++} ++ + static void handleNonNullAttr(Sema &S, Decl *D, const ParsedAttr &AL) { + SmallVector NonNullArgs; + for (unsigned I = 0; I < AL.getNumArgs(); ++I) { +@@ -1639,6 +1710,22 @@ static void handleNonNullAttrParameter(Sema &S, ParmVarDecl *D, + D->addAttr(::new (S.Context) NonNullAttr(S.Context, AL, nullptr, 0)); + } + ++static void handleReturnsNonNullFuncPtr(Sema &S, Decl *D, const ParsedAttr &AL) { ++ const auto *VD = dyn_cast(D); ++ if (VD == nullptr || !VD->getType()->isFunctionPointerType()) { ++ S.Diag(AL.getLoc(), diag::warn_attribute_function_pointer) << AL; ++ return; ++ } ++ QualType Ty = VD->getType()->getPointeeType(); ++ const FunctionType *FT = Ty->getAs(); ++ if (FT == nullptr) ++ return; ++ if (!attrNonNullArgCheck(S, FT->getReturnType(), AL, SourceRange(), D->getSourceRange(), true)) { ++ return; ++ } ++ D->addAttr(::new (S.Context) ReturnsNonNullAttr(S.Context, AL)); ++} ++ + static void handleReturnsNonNullAttr(Sema &S, Decl *D, const ParsedAttr &AL) { + QualType ResultType = getFunctionOrMethodResultType(D); + SourceRange SR = getFunctionOrMethodResultSourceRange(D); +@@ -8295,6 +8382,296 @@ EnforceTCBLeafAttr *Sema::mergeEnforceTCBLeafAttr( + *this, D, AL); + } + ++//===----------------------------------------------------------------------===// ++// EnhanceC Attribute ++//===----------------------------------------------------------------------===// ++ ++// If no indexs were specified to `count` attribute and only one pointer argument in function ++// then the argument have the attribute; warn if there aren't any or more than one pointer argument. ++// Skip this check if the attribute came from a macro expansion or a template instantiation. ++static void checkPtrArgsInDefaultAttrIdx(SmallVector &Args, Sema &S, Decl *D, const ParsedAttr &AL) { ++ if (Args.empty() && AL.getLoc().isFileID() && !S.inTemplateInstantiation()) { ++ bool AnyPointers = isFunctionOrMethodVariadic(D); ++ unsigned PtrNum = 0; ++ for (unsigned I = 0, E = getFunctionOrMethodNumParams(D); ++ I != E; ++I) { ++ QualType T = getFunctionOrMethodParamType(D, I); ++ if (T->isDependentType() || S.isValidPointerAttrType(T)) { ++ AnyPointers = true; ++ PtrNum++; ++ } ++ } ++ ++ if (!AnyPointers) ++ S.Diag(AL.getLoc(), diag::warn_attribute_no_pointers) << AL; ++ else if (AnyPointers && PtrNum > 1) ++ S.Diag(AL.getLoc(), diag::err_attribute_redundant_pointers) << AL; ++ } ++} ++ ++static SmallVector handleFuncPtrParams(Sema &S, Decl *D, const ParsedAttr &AL, QualType Ty) { ++ const FunctionProtoType *Proto = nullptr; ++ SmallVector Args; ++ if (Ty->isFunctionPointerType() || Ty->isBlockPointerType()) ++ Ty = Ty->getPointeeType(); ++ const FunctionType *FT = Ty->getAs(); ++ if (FT) ++ Proto = dyn_cast(FT); ++ if (Proto == nullptr) ++ return Args; ++ ++ for (unsigned I = 1; I < AL.getNumArgs(); ++I) { ++ Expr *Ex = AL.getArgAsExpr(I); ++ ParamIdx Idx; ++ if (!checkFunctionTypeIndex(S, D, AL, I + 1, Ex, Idx, Proto)) ++ continue; ++ ++ // Is the function type argument a pointer type ++ if (!attrNonNullArgCheck( ++ S, Proto->getParamType(Idx.getASTIndex()), AL, ++ Ex->getSourceRange(), ++ SourceRange())) ++ continue; ++ ++ Args.push_back(Idx); ++ } ++ return Args; ++} ++ ++// `count` attribute ++static void handleCountFuncPtrParams(Sema &S, Decl *D, const ParsedAttr &AL, QualType Ty, Expr *LenExpr, bool isByte) { ++ SmallVector CountArgs = handleFuncPtrParams(S, D, AL, Ty); ++ unsigned Size = CountArgs.size(); ++ if (Size == 0) { ++ return; ++ } ++ ParamIdx *Start = CountArgs.data(); ++ llvm::array_pod_sort(Start, Start + Size); ++ if (isByte) ++ D->addAttr(::new (S.Context) ByteCountAttr(S.Context, AL, LenExpr, Start, Size)); ++ else ++ D->addAttr(::new (S.Context) CountAttr(S.Context, AL, LenExpr, Start, Size)); ++} ++ ++static void handleCountAttr(Sema &S, Decl *D, const ParsedAttr &AL, bool isByte = false) { ++ const auto *VD = dyn_cast(D); ++ if (VD != nullptr && ++ !attrNonNullArgCheck(S, VD->getType(), AL, SourceRange(), D->getSourceRange())) { ++ return; ++ } ++ // The first argument as `LenExpr` must exist ++ Expr *LenExpr = AL.getArgAsExpr(0); ++ if (VD->getType()->isFunctionPointerType() && AL.getNumArgs() > 1) { ++ handleCountFuncPtrParams(S, D, AL, VD->getType(), LenExpr, isByte); ++ } else { ++ if (isByte) ++ D->addAttr(::new (S.Context) ByteCountAttr(S.Context, AL, LenExpr)); ++ else ++ D->addAttr(::new (S.Context) CountAttr(S.Context, AL, LenExpr)); ++ } ++} ++ ++static void handleCountAttrFunc(Sema &S, Decl *D, const ParsedAttr &AL, bool isByte = false) { ++ SmallVector CountArgs; ++ // The first argument as `LenExpr` must exist ++ Expr *LenExpr = AL.getArgAsExpr(0); ++ for (unsigned I = 1; I < AL.getNumArgs(); ++I) { ++ Expr *Ex = AL.getArgAsExpr(I); ++ ParamIdx Idx; ++ if (!checkFunctionOrMethodParameterIndex(S, D, AL, I + 1, Ex, Idx)) ++ return; ++ // Is the function argument a pointer type? ++ if (Idx.getASTIndex() < getFunctionOrMethodNumParams(D) && ++ !attrNonNullArgCheck( ++ S, getFunctionOrMethodParamType(D, Idx.getASTIndex()), AL, ++ Ex->getSourceRange(), ++ getFunctionOrMethodParamRange(D, Idx.getASTIndex()))) ++ continue; ++ ++ CountArgs.push_back(Idx); ++ } ++ ++ checkPtrArgsInDefaultAttrIdx(CountArgs, S, D, AL); ++ ParamIdx *Start = CountArgs.data(); ++ unsigned Size = CountArgs.size(); ++ llvm::array_pod_sort(Start, Start + Size); ++ if (isByte) ++ D->addAttr(::new (S.Context) ByteCountAttr(S.Context, AL, LenExpr, Start, Size)); ++ else ++ D->addAttr(::new (S.Context) CountAttr(S.Context, AL, LenExpr, Start, Size)); ++ ++} ++ ++// `returns_count` attribute ++static void handleReturnsCountAttr(Sema &S, Decl *D, const ParsedAttr &AL, bool isByte = false) { ++ QualType ResultType = getFunctionOrMethodResultType(D); ++ SourceRange SR = getFunctionOrMethodResultSourceRange(D); ++ if (!attrNonNullArgCheck(S, ResultType, AL, SourceRange(), SR, ++ /* isReturnValue */ true)) ++ return; ++ Expr *LenExpr = AL.getArgAsExpr(0); ++ ++ if (isByte) ++ D->addAttr(::new (S.Context) ReturnsByteCountAttr(S.Context, AL, LenExpr)); ++ else ++ D->addAttr(::new (S.Context) ReturnsCountAttr(S.Context, AL, LenExpr)); ++} ++ ++static void handleReturnsCountFuncPtr(Sema &S, Decl *D, const ParsedAttr &AL, bool isByte = false) { ++ const auto *VD = dyn_cast(D); ++ if (VD == nullptr || !VD->getType()->isFunctionPointerType()) { ++ S.Diag(AL.getLoc(), diag::warn_attribute_function_pointer) << AL; ++ return; ++ } ++ QualType Ty = VD->getType()->getPointeeType(); ++ const FunctionType *FT = Ty->getAs(); ++ if (FT == nullptr) ++ return; ++ if (!attrNonNullArgCheck(S, FT->getReturnType(), AL, SourceRange(), D->getSourceRange(), true)) { ++ return; ++ } ++ Expr *LenExpr = AL.getArgAsExpr(0); ++ if (isByte) ++ D->addAttr(::new (S.Context) ReturnsByteCountAttr(S.Context, AL, LenExpr)); ++ else ++ D->addAttr(::new (S.Context) ReturnsCountAttr(S.Context, AL, LenExpr)); ++} ++ ++// `count_index` attribute ++static void handleCountIndexFuncPtrParams(Sema &S, Decl *D, const ParsedAttr &AL, QualType Ty, const ParamIdx &LenIdx, bool isByte) { ++ SmallVector CountIndexArgs = handleFuncPtrParams(S, D, AL, Ty); ++ unsigned Size = CountIndexArgs.size(); ++ if (Size == 0) { ++ return; ++ } ++ ParamIdx *Start = CountIndexArgs.data(); ++ llvm::array_pod_sort(Start, Start + Size); ++ if (isByte) ++ D->addAttr(::new (S.Context) ByteCountIndexAttr(S.Context, AL, LenIdx, Start, Size)); ++ else ++ D->addAttr(::new (S.Context) CountIndexAttr(S.Context, AL, LenIdx, Start, Size)); ++} ++ ++static void handleCountIndexAttr(Sema &S, Decl *D, const ParsedAttr &AL, bool isByte = false) { ++ const auto *VD = dyn_cast(D); ++ if (VD != nullptr && ++ !attrNonNullArgCheck(S, VD->getType(), AL, SourceRange(), D->getSourceRange())) { ++ return; ++ } ++ ++ const Expr *LenVarIdxExpr = AL.getArgAsExpr(0); ++ int Idx; ++ // Parameter indices are 1-indexed, hence Index=1 ++ if (!checkPositiveIntArgument(S, AL, LenVarIdxExpr, Idx, /*Idx=*/1)) ++ return; ++ ParamIdx LenVarIdx(Idx, D); ++ ++ if (VD->getType()->isFunctionPointerType() && AL.getNumArgs() > 1) { ++ handleCountIndexFuncPtrParams(S, D, AL, VD->getType(), LenVarIdx, isByte); ++ } else { ++ if (dyn_cast(D) == nullptr) { ++ S.Diag(AL.getLoc(), diag::warn_attribute_function_pointer) << AL; ++ return; ++ } ++ if (isByte) ++ D->addAttr(::new (S.Context) ByteCountIndexAttr(S.Context, AL, LenVarIdx)); ++ else ++ D->addAttr(::new (S.Context) CountIndexAttr(S.Context, AL, LenVarIdx)); ++ } ++} ++ ++static void handleCountIndexAttrFunc(Sema &S, Decl *D, const ParsedAttr &AL, bool isByte = false) { ++ if (AL.getNumArgs() == 1) { ++ S.Diag(AL.getLoc(), diag::err_attribute_zero_pointer) << AL; ++ return; ++ } ++ // The first argument as `LenVarIndex` must be integer type ++ ParamIdx LenVarIdx; ++ const Expr *LenExpr = AL.getArgAsExpr(0); ++ if (!checkFunctionOrMethodParameterIndex(S, D, AL, 1, LenExpr, LenVarIdx)) ++ return; ++ const ParmVarDecl *Param = dyn_cast(D)->getParamDecl(LenVarIdx.getASTIndex()); ++ if (!Param->getType()->isIntegerType()) { ++ SourceLocation SrcLoc = LenExpr->getBeginLoc(); ++ S.Diag(SrcLoc, diag::err_attribute_integers_only) << AL << Param->getSourceRange(); ++ return; ++ } ++ ++ SmallVector CountIndexArgs; ++ for (unsigned I = 1; I < AL.getNumArgs(); ++I) { ++ Expr *Ex = AL.getArgAsExpr(I); ++ ParamIdx Idx; ++ if (!checkFunctionOrMethodParameterIndex(S, D, AL, I + 1, Ex, Idx)) ++ return; ++ // Is the function argument a pointer type? ++ if (Idx.getASTIndex() < getFunctionOrMethodNumParams(D) && ++ !attrNonNullArgCheck( ++ S, getFunctionOrMethodParamType(D, Idx.getASTIndex()), AL, ++ Ex->getSourceRange(), ++ getFunctionOrMethodParamRange(D, Idx.getASTIndex()))) ++ continue; ++ ++ CountIndexArgs.push_back(Idx); ++ } ++ ++ checkPtrArgsInDefaultAttrIdx(CountIndexArgs, S, D, AL); ++ unsigned Size = CountIndexArgs.size(); ++ ParamIdx *Start = CountIndexArgs.data(); ++ llvm::array_pod_sort(Start, Start + Size); ++ if (isByte) ++ D->addAttr(::new (S.Context) ByteCountIndexAttr(S.Context, AL, LenVarIdx, Start, Size)); ++ else ++ D->addAttr(::new (S.Context) CountIndexAttr(S.Context, AL, LenVarIdx, Start, Size)); ++} ++ ++// `returns_count_index` attribute ++static void handleReturnsCountIndexAttr(Sema &S, Decl *D, const ParsedAttr &AL, bool isByte = false) { ++ QualType ResultType = getFunctionOrMethodResultType(D); ++ SourceRange SR = getFunctionOrMethodResultSourceRange(D); ++ if (!attrNonNullArgCheck(S, ResultType, AL, SourceRange(), SR, ++ /* isReturnValue */ true)) ++ return; ++ const Expr *LenVarIdxExpr = AL.getArgAsExpr(0); ++ ParamIdx LenVarIdx; ++ if (!checkFunctionOrMethodParameterIndex(S, D, AL, 1, LenVarIdxExpr, LenVarIdx)) ++ return; ++ const ParmVarDecl *Param = dyn_cast(D)->getParamDecl(LenVarIdx.getASTIndex()); ++ if (!Param->getType()->isIntegerType()) { ++ SourceLocation SrcLoc = LenVarIdxExpr->getBeginLoc(); ++ S.Diag(SrcLoc, diag::err_attribute_integers_only) << AL << Param->getSourceRange(); ++ return; ++ } ++ if (isByte) ++ D->addAttr(::new (S.Context) ReturnsByteCountIndexAttr(S.Context, AL, LenVarIdx)); ++ else ++ D->addAttr(::new (S.Context) ReturnsCountIndexAttr(S.Context, AL, LenVarIdx)); ++} ++ ++static void handleReturnsCountIndexFuncPtr(Sema &S, Decl *D, const ParsedAttr &AL, bool isByte = false) { ++ const auto *VD = dyn_cast(D); ++ if (VD == nullptr || !VD->getType()->isFunctionPointerType()) { ++ S.Diag(AL.getLoc(), diag::warn_attribute_function_pointer) << AL; ++ return; ++ } ++ QualType Ty = VD->getType()->getPointeeType(); ++ const FunctionType *FT = Ty->getAs(); ++ if (FT == nullptr) ++ return; ++ if (!attrNonNullArgCheck(S, FT->getReturnType(), AL, SourceRange(), D->getSourceRange(), true)) { ++ return; ++ } ++ const Expr *LenVarIdxExpr = AL.getArgAsExpr(0); ++ int Idx; ++ // Parameter indices are 1-indexed, hence Index=1 ++ if (!checkPositiveIntArgument(S, AL, LenVarIdxExpr, Idx, /*Idx=*/1)) ++ return; ++ ParamIdx LenVarIdx(Idx, D); ++ if (isByte) ++ D->addAttr(::new (S.Context) ReturnsByteCountIndexAttr(S.Context, AL, LenVarIdx)); ++ else ++ D->addAttr(::new (S.Context) ReturnsCountIndexAttr(S.Context, AL, LenVarIdx)); ++} ++ + //===----------------------------------------------------------------------===// + // Top Level Sema Entry Points + //===----------------------------------------------------------------------===// +@@ -8625,11 +9002,16 @@ ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D, const ParsedAttr &AL, + case ParsedAttr::AT_NonNull: + if (auto *PVD = dyn_cast(D)) + handleNonNullAttrParameter(S, PVD, AL); ++ else if ((dyn_cast(D) != nullptr) || dyn_cast(D) != nullptr) ++ handleNonNullAttrVarAndField(S, D, AL); + else + handleNonNullAttr(S, D, AL); + break; + case ParsedAttr::AT_ReturnsNonNull: +- handleReturnsNonNullAttr(S, D, AL); ++ if ((dyn_cast(D) != nullptr) || dyn_cast(D) != nullptr) ++ handleReturnsNonNullFuncPtr(S, D, AL); ++ else ++ handleReturnsNonNullAttr(S, D, AL); + break; + case ParsedAttr::AT_NoEscape: + handleNoEscapeAttr(S, D, AL); +@@ -9093,6 +9475,63 @@ ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D, const ParsedAttr &AL, + case ParsedAttr::AT_UsingIfExists: + handleSimpleAttribute(S, D, AL); + break; ++ ++ // EnhanceC attribute ++ case ParsedAttr::AT_Count: ++ if ((dyn_cast(D) != nullptr) || dyn_cast(D) != nullptr) ++ handleCountAttr(S, D, AL); ++ else ++ handleCountAttrFunc(S, D, AL); ++ break; ++ ++ case ParsedAttr::AT_ReturnsCount: ++ if ((dyn_cast(D) != nullptr) || dyn_cast(D) != nullptr) ++ handleReturnsCountFuncPtr(S, D, AL); ++ else ++ handleReturnsCountAttr(S, D, AL); ++ break; ++ ++ case ParsedAttr::AT_CountIndex: ++ if ((dyn_cast(D) != nullptr) || dyn_cast(D) != nullptr) ++ handleCountIndexAttr(S, D, AL); ++ else ++ handleCountIndexAttrFunc(S, D, AL); ++ break; ++ ++ case ParsedAttr::AT_ReturnsCountIndex: ++ if ((dyn_cast(D) != nullptr) || dyn_cast(D) != nullptr) ++ handleReturnsCountIndexFuncPtr(S, D, AL); ++ else ++ handleReturnsCountIndexAttr(S, D, AL); ++ break; ++ ++ case ParsedAttr::AT_ByteCount: ++ if ((dyn_cast(D) != nullptr) || dyn_cast(D) != nullptr) ++ handleCountAttr(S, D, AL, true); ++ else ++ handleCountAttrFunc(S, D, AL, true); ++ break; ++ ++ case ParsedAttr::AT_ReturnsByteCount: ++ if ((dyn_cast(D) != nullptr) || dyn_cast(D) != nullptr) ++ handleReturnsCountFuncPtr(S, D, AL, true); ++ else ++ handleReturnsCountAttr(S, D, AL, true); ++ break; ++ ++ case ParsedAttr::AT_ByteCountIndex: ++ if ((dyn_cast(D) != nullptr) || dyn_cast(D) != nullptr) ++ handleCountIndexAttr(S, D, AL, true); ++ else ++ handleCountIndexAttrFunc(S, D, AL, true); ++ break; ++ ++ case ParsedAttr::AT_ReturnsByteCountIndex: ++ if ((dyn_cast(D) != nullptr) || dyn_cast(D) != nullptr) ++ handleReturnsCountIndexFuncPtr(S, D, AL, true); ++ else ++ handleReturnsCountIndexAttr(S, D, AL, true); ++ break; + } + } + +diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp +index c6ca10c0342c..4878f8765e93 100644 +--- a/clang/lib/Sema/SemaStmt.cpp ++++ b/clang/lib/Sema/SemaStmt.cpp +@@ -407,7 +407,8 @@ sema::CompoundScopeInfo &Sema::getCurCompoundScope() const { + } + + StmtResult Sema::ActOnCompoundStmt(SourceLocation L, SourceLocation R, +- ArrayRef Elts, bool isStmtExpr) { ++ ArrayRef Elts, bool isStmtExpr, ++ SafeScopeSpecifier SafeSpec, SourceLocation SafeLoc) { + const unsigned NumElts = Elts.size(); + + // If we're in C mode, check that we don't have any decls after stmts. If +@@ -451,7 +452,13 @@ StmtResult Sema::ActOnCompoundStmt(SourceLocation L, SourceLocation R, + : getCurCompoundScope().InitialFPFeatures; + FPOptionsOverride FPDiff = getCurFPFeatures().getChangesFrom(FPO); + +- return CompoundStmt::Create(Context, Elts, FPDiff, L, R); ++ // return CompoundStmt::Create(Context, Elts, FPDiff, L, R); ++ return CompoundStmt::Create(Context, Elts, FPDiff, L, R, SafeSpec, SafeLoc); ++} ++ ++void Sema::ActOnPragmaSafe(PragmaSafeStatus St) { ++ SafeScopeSpecifier spec = St == PSS_On ? SS_Safe : SS_Unsafe; ++ SetPragmaSafeInfo(spec); + } + + ExprResult +diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp +index 73800191dfc1..8610df05b7a5 100644 +--- a/clang/lib/Serialization/ASTReaderDecl.cpp ++++ b/clang/lib/Serialization/ASTReaderDecl.cpp +@@ -909,6 +909,7 @@ void ASTDeclReader::VisitFunctionDecl(FunctionDecl *FD) { + // after everything else is read. + + FD->setStorageClass(static_cast(Record.readInt())); ++ FD->setSafeSpecifier(static_cast(Record.readInt())); + FD->setInlineSpecified(Record.readInt()); + FD->setImplicitlyInline(Record.readInt()); + FD->setVirtualAsWritten(Record.readInt()); +diff --git a/clang/lib/Serialization/ASTReaderStmt.cpp b/clang/lib/Serialization/ASTReaderStmt.cpp +index e0ae019bf803..08d592d1b9b0 100644 +--- a/clang/lib/Serialization/ASTReaderStmt.cpp ++++ b/clang/lib/Serialization/ASTReaderStmt.cpp +@@ -154,6 +154,7 @@ void ASTStmtReader::VisitCompoundStmt(CompoundStmt *S) { + unsigned NumStmts = Record.readInt(); + unsigned HasFPFeatures = Record.readInt(); + assert(S->hasStoredFPFeatures() == HasFPFeatures); ++ S->setSafeSpecifier(static_cast(Record.readInt())); + while (NumStmts--) + Stmts.push_back(Record.readSubStmt()); + S->setStmts(Stmts); +diff --git a/clang/lib/Serialization/ASTWriterDecl.cpp b/clang/lib/Serialization/ASTWriterDecl.cpp +index 35b8db27bd0e..3d181c144ab9 100644 +--- a/clang/lib/Serialization/ASTWriterDecl.cpp ++++ b/clang/lib/Serialization/ASTWriterDecl.cpp +@@ -547,6 +547,7 @@ void ASTDeclWriter::VisitFunctionDecl(FunctionDecl *D) { + // FunctionDecl's body is handled last at ASTWriterDecl::Visit, + // after everything else is written. + Record.push_back(static_cast(D->getStorageClass())); // FIXME: stable encoding ++ Record.push_back(D->getSafeSpecifier()); + Record.push_back(D->isInlineSpecified()); + Record.push_back(D->isInlined()); + Record.push_back(D->isVirtualAsWritten()); +diff --git a/clang/lib/Serialization/ASTWriterStmt.cpp b/clang/lib/Serialization/ASTWriterStmt.cpp +index 5e5a86ee01a2..ce622a1991da 100644 +--- a/clang/lib/Serialization/ASTWriterStmt.cpp ++++ b/clang/lib/Serialization/ASTWriterStmt.cpp +@@ -82,6 +82,7 @@ void ASTStmtWriter::VisitCompoundStmt(CompoundStmt *S) { + VisitStmt(S); + Record.push_back(S->size()); + Record.push_back(S->hasStoredFPFeatures()); ++ Record.push_back(S->getSafeSpecifier()); + for (auto *CS : S->body()) + Record.AddStmt(CS); + if (S->hasStoredFPFeatures()) diff --git a/build/third_party/patch.sh b/build/third_party/patch.sh index 171152b4f700bf4115c87b89904199a96738cb5d..62c0310d1116e31116f7be73f548a44c2ba3dc51 100644 --- a/build/third_party/patch.sh +++ b/build/third_party/patch.sh @@ -18,7 +18,7 @@ THIRD_PARTY_PATH=$MAPLE_ROOT/third_party TOOLS_PATH=$MAPLE_ROOT/build/third_party AOSP_PATH=$THIRD_PARTY_PATH/aosp_10.0.0_r35 AOSP_GN_PATH=$TOOLS_PATH/aosp_gn -LLVM_PATH=$THIRD_PARTY_PATH/llvm-12.0.0.src +LLVM_PATH=$THIRD_PARTY_PATH/llvm-15.0.4.src MODIFIED_AOSP_PATH=$THIRD_PARTY_PATH/aosp_modified MODIFIED_LLVM_PATH=$THIRD_PARTY_PATH/llvm_modified @@ -42,6 +42,10 @@ function install_patch { mkdir -p include/ cp -r ${MAPLE_ROOT}/src/hir2mpl/bytecode_input/dex/include/string_view_format.h include/ + cd $MODIFIED_LLVM_PATH + # llvm_enhancedc_001.patch 重新生成llvm 15的 C增强特性 的patch + patch -p1 < $TOOLS_PATH/llvm_enhancec_001.patch + #add third_party gn cp -f $AOSP_GN_PATH/art/libdexfile/BUILD.gn $MODIFIED_AOSP_PATH/art/libdexfile/ cp -f $AOSP_GN_PATH/system/core/libziparchive/BUILD.gn $MODIFIED_AOSP_PATH/system/core/libziparchive/ diff --git a/format.sh b/format.sh index 1189a7868479d16a67d2db24b67a054fca1fdaba..171c887a120ab22972d6df07104ab358ac256bb7 100755 --- a/format.sh +++ b/format.sh @@ -1,7 +1,8 @@ #!/bin/bash # usage: in OpenArkCompiler dir, ./format.sh xxx.cpp -CLANG_FORMAT=$MAPLE_ROOT/tools/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/clang-format +ROOT_DIR=$(cd "$(dirname $0)"; pwd) +CLANG_FORMAT=$ROOT/tools/clang+llvm-15.0.4-x86_64-linux-gnu-ubuntu-18.04-enhanced/bin/clang-format $CLANG_FORMAT -style=file -i $1 sed -i -e 's/ \*,/\*,/g' -e 's/ \*>/\*>/g' -e 's/ \*)/\*)/g' -e 's/ \&,/\&,/g' -e 's/ \&>/\&>/g' -e 's/ \&)/\&)/g' $1 diff --git a/libc_enhanced/include/stdio.h b/libc_enhanced/include/stdio.h index 936863e7f0fc3c5f5e9ad61a09be96d1bd68e100..1dff5676dceed5da6759912e744e1534c1f34968 100644 --- a/libc_enhanced/include/stdio.h +++ b/libc_enhanced/include/stdio.h @@ -14,8 +14,10 @@ */ #include_next #ifndef __STDIO_C_ENHANCED_H -#if !defined __need_FILE && !defined __need___FILE +// no stdio header guard if (defined __need_FILE or defined __need___FILE => !defined STDIO_H) +#ifdef _STDIO_H #define __STDIO_C_ENHANCED_H +#ifdef C_ENHANCED #include "c_enhanced.h" #include @@ -35,5 +37,6 @@ CNTI(2, 1) SAFE char *fgets(char *__restrict str, int, FILE *__restrict); #endif -#endif -#endif // __STDIO_C_ENHANCED_H +#endif // C_ENHANCED +#endif // _STDIO_H +#endif // __STDIO_C_ENHANCED_H \ No newline at end of file diff --git a/libc_enhanced/include/stdlib.h b/libc_enhanced/include/stdlib.h index cfeb7517c1523c07269246d12586561e2fd2b521..cc7e7b5c257913f4d9ea9d9dcc25e3e12d43b273 100644 --- a/libc_enhanced/include/stdlib.h +++ b/libc_enhanced/include/stdlib.h @@ -12,9 +12,12 @@ * FIT FOR A PARTICULAR PURPOSE. * See the Mulan PSL v2 for more details. */ +#include_next #ifndef __STDLIB_C_ENHANCED_H +// no stdlib header guard if (defined __need_malloc_and_calloc => !defined _STDLIB_H) +#ifdef _STDLIB_H #define __STDLIB_C_ENHANCED_H -#include_next +#ifdef C_ENHANCED #include "c_enhanced.h" BRCNTI(1) @@ -25,4 +28,6 @@ SAFE void *calloc(size_t n_elements, size_t element_size) BRCNT(n_elements * ele BRCNTI(2) SAFE void *realloc(void *, size_t); +#endif // C_ENHANCED +#endif // _STDLIB_H #endif // __STDLIB_C_ENHANCED_H diff --git a/testsuite/driver/config/aarch64-clang-debug.conf b/testsuite/driver/.config/aarch64-clang-debug.conf similarity index 100% rename from testsuite/driver/config/aarch64-clang-debug.conf rename to testsuite/driver/.config/aarch64-clang-debug.conf diff --git a/testsuite/driver/config/aarch64-clang-release.conf b/testsuite/driver/.config/aarch64-clang-release.conf similarity index 100% rename from testsuite/driver/config/aarch64-clang-release.conf rename to testsuite/driver/.config/aarch64-clang-release.conf diff --git a/testsuite/driver/config/x86_64-clang-debug.conf b/testsuite/driver/.config/x86_64-clang-debug.conf similarity index 100% rename from testsuite/driver/config/x86_64-clang-debug.conf rename to testsuite/driver/.config/x86_64-clang-debug.conf diff --git a/testsuite/driver/config/x86_64-clang-release.conf b/testsuite/driver/.config/x86_64-clang-release.conf similarity index 100% rename from testsuite/driver/config/x86_64-clang-release.conf rename to testsuite/driver/.config/x86_64-clang-release.conf diff --git a/testsuite/driver/config b/testsuite/driver/config new file mode 120000 index 0000000000000000000000000000000000000000..2ec2572c7eb97791c85771794a3eb7415f191a8b --- /dev/null +++ b/testsuite/driver/config @@ -0,0 +1 @@ +.config \ No newline at end of file diff --git a/testsuite/driver/src/api/.api/__init__.py b/testsuite/driver/src/.api/__init__.py similarity index 100% rename from testsuite/driver/src/api/.api/__init__.py rename to testsuite/driver/src/.api/__init__.py diff --git a/testsuite/driver/src/api/.api/c2ast.py b/testsuite/driver/src/.api/c2ast.py similarity index 100% rename from testsuite/driver/src/api/.api/c2ast.py rename to testsuite/driver/src/.api/c2ast.py diff --git a/testsuite/driver/src/api/.api/c_linker.py b/testsuite/driver/src/.api/c_linker.py similarity index 100% rename from testsuite/driver/src/api/.api/c_linker.py rename to testsuite/driver/src/.api/c_linker.py diff --git a/testsuite/driver/src/api/.api/c_linker_all.py b/testsuite/driver/src/.api/c_linker_all.py similarity index 100% rename from testsuite/driver/src/api/.api/c_linker_all.py rename to testsuite/driver/src/.api/c_linker_all.py diff --git a/testsuite/driver/src/api/.api/check_file_equal.py b/testsuite/driver/src/.api/check_file_equal.py similarity index 100% rename from testsuite/driver/src/api/.api/check_file_equal.py rename to testsuite/driver/src/.api/check_file_equal.py diff --git a/testsuite/driver/src/api/.api/check_reg_contain.py b/testsuite/driver/src/.api/check_reg_contain.py similarity index 100% rename from testsuite/driver/src/api/.api/check_reg_contain.py rename to testsuite/driver/src/.api/check_reg_contain.py diff --git a/testsuite/driver/src/api/.api/clang_linker.py b/testsuite/driver/src/.api/clang_linker.py similarity index 100% rename from testsuite/driver/src/api/.api/clang_linker.py rename to testsuite/driver/src/.api/clang_linker.py diff --git a/testsuite/driver/src/api/.api/driver.py b/testsuite/driver/src/.api/driver.py similarity index 100% rename from testsuite/driver/src/api/.api/driver.py rename to testsuite/driver/src/.api/driver.py diff --git a/testsuite/driver/src/api/.api/gen_bin.py b/testsuite/driver/src/.api/gen_bin.py similarity index 100% rename from testsuite/driver/src/api/.api/gen_bin.py rename to testsuite/driver/src/.api/gen_bin.py diff --git a/testsuite/driver/src/api/.api/hir2mpl.py b/testsuite/driver/src/.api/hir2mpl.py similarity index 100% rename from testsuite/driver/src/api/.api/hir2mpl.py rename to testsuite/driver/src/.api/hir2mpl.py diff --git a/testsuite/driver/src/api/.api/irbuild.py b/testsuite/driver/src/.api/irbuild.py similarity index 100% rename from testsuite/driver/src/api/.api/irbuild.py rename to testsuite/driver/src/.api/irbuild.py diff --git a/testsuite/driver/src/api/.api/java2dex.py b/testsuite/driver/src/.api/java2dex.py similarity index 100% rename from testsuite/driver/src/api/.api/java2dex.py rename to testsuite/driver/src/.api/java2dex.py diff --git a/testsuite/driver/src/api/.api/linker.py b/testsuite/driver/src/.api/linker.py similarity index 100% rename from testsuite/driver/src/api/.api/linker.py rename to testsuite/driver/src/.api/linker.py diff --git a/testsuite/driver/src/api/.api/maple.py b/testsuite/driver/src/.api/maple.py similarity index 100% rename from testsuite/driver/src/api/.api/maple.py rename to testsuite/driver/src/.api/maple.py diff --git a/testsuite/driver/src/api/.api/maple_cg.py b/testsuite/driver/src/.api/maple_cg.py similarity index 100% rename from testsuite/driver/src/api/.api/maple_cg.py rename to testsuite/driver/src/.api/maple_cg.py diff --git a/testsuite/driver/src/api/.api/maple_driver.py b/testsuite/driver/src/.api/maple_driver.py similarity index 100% rename from testsuite/driver/src/api/.api/maple_driver.py rename to testsuite/driver/src/.api/maple_driver.py diff --git a/testsuite/driver/src/api/.api/mplsh.py b/testsuite/driver/src/.api/mplsh.py similarity index 100% rename from testsuite/driver/src/api/.api/mplsh.py rename to testsuite/driver/src/.api/mplsh.py diff --git a/testsuite/driver/src/api/.api/qemu.py b/testsuite/driver/src/.api/qemu.py similarity index 100% rename from testsuite/driver/src/api/.api/qemu.py rename to testsuite/driver/src/.api/qemu.py diff --git a/testsuite/driver/src/api/.api/shell.py b/testsuite/driver/src/.api/shell.py similarity index 100% rename from testsuite/driver/src/api/.api/shell.py rename to testsuite/driver/src/.api/shell.py diff --git a/testsuite/driver/src/api/.api/shell_operator.py b/testsuite/driver/src/.api/shell_operator.py similarity index 100% rename from testsuite/driver/src/api/.api/shell_operator.py rename to testsuite/driver/src/.api/shell_operator.py diff --git a/testsuite/driver/src/api/.api/simple_maple.py b/testsuite/driver/src/.api/simple_maple.py similarity index 100% rename from testsuite/driver/src/api/.api/simple_maple.py rename to testsuite/driver/src/.api/simple_maple.py diff --git a/testsuite/driver/src/mode/.mode/AAPCS64_O0.py b/testsuite/driver/src/.mode/AAPCS64_O0.py similarity index 100% rename from testsuite/driver/src/mode/.mode/AAPCS64_O0.py rename to testsuite/driver/src/.mode/AAPCS64_O0.py diff --git a/testsuite/driver/src/mode/.mode/AAPCS64_O2.py b/testsuite/driver/src/.mode/AAPCS64_O2.py similarity index 100% rename from testsuite/driver/src/mode/.mode/AAPCS64_O2.py rename to testsuite/driver/src/.mode/AAPCS64_O2.py diff --git a/testsuite/driver/src/mode/.mode/ASAN_O0.py b/testsuite/driver/src/.mode/ASAN_O0.py similarity index 100% rename from testsuite/driver/src/mode/.mode/ASAN_O0.py rename to testsuite/driver/src/.mode/ASAN_O0.py diff --git a/testsuite/driver/src/mode/.mode/AST2MPL.py b/testsuite/driver/src/.mode/AST2MPL.py similarity index 100% rename from testsuite/driver/src/mode/.mode/AST2MPL.py rename to testsuite/driver/src/.mode/AST2MPL.py diff --git a/testsuite/driver/src/mode/.mode/ASTMBC.py b/testsuite/driver/src/.mode/ASTMBC.py similarity index 100% rename from testsuite/driver/src/mode/.mode/ASTMBC.py rename to testsuite/driver/src/.mode/ASTMBC.py diff --git a/testsuite/driver/src/mode/.mode/ASTO0.py b/testsuite/driver/src/.mode/ASTO0.py similarity index 100% rename from testsuite/driver/src/mode/.mode/ASTO0.py rename to testsuite/driver/src/.mode/ASTO0.py diff --git a/testsuite/driver/src/mode/.mode/ASTO0_OLD.py b/testsuite/driver/src/.mode/ASTO0_OLD.py similarity index 100% rename from testsuite/driver/src/mode/.mode/ASTO0_OLD.py rename to testsuite/driver/src/.mode/ASTO0_OLD.py diff --git a/testsuite/driver/src/mode/.mode/ASTO2.py b/testsuite/driver/src/.mode/ASTO2.py similarity index 100% rename from testsuite/driver/src/mode/.mode/ASTO2.py rename to testsuite/driver/src/.mode/ASTO2.py diff --git a/testsuite/driver/src/mode/.mode/ASTO2_OLD.py b/testsuite/driver/src/.mode/ASTO2_OLD.py similarity index 100% rename from testsuite/driver/src/mode/.mode/ASTO2_OLD.py rename to testsuite/driver/src/.mode/ASTO2_OLD.py diff --git a/testsuite/driver/src/mode/.mode/CMBCO2.py b/testsuite/driver/src/.mode/CMBCO2.py similarity index 100% rename from testsuite/driver/src/mode/.mode/CMBCO2.py rename to testsuite/driver/src/.mode/CMBCO2.py diff --git a/testsuite/driver/src/mode/.mode/CO0.py b/testsuite/driver/src/.mode/CO0.py similarity index 100% rename from testsuite/driver/src/mode/.mode/CO0.py rename to testsuite/driver/src/.mode/CO0.py diff --git a/testsuite/driver/src/mode/.mode/CO0_MPL_C2M.py b/testsuite/driver/src/.mode/CO0_MPL_C2M.py similarity index 100% rename from testsuite/driver/src/mode/.mode/CO0_MPL_C2M.py rename to testsuite/driver/src/.mode/CO0_MPL_C2M.py diff --git a/testsuite/driver/src/mode/.mode/CO0_OLD.py b/testsuite/driver/src/.mode/CO0_OLD.py similarity index 100% rename from testsuite/driver/src/mode/.mode/CO0_OLD.py rename to testsuite/driver/src/.mode/CO0_OLD.py diff --git a/testsuite/driver/src/mode/.mode/CO0_PIE.py b/testsuite/driver/src/.mode/CO0_PIE.py similarity index 100% rename from testsuite/driver/src/mode/.mode/CO0_PIE.py rename to testsuite/driver/src/.mode/CO0_PIE.py diff --git a/testsuite/driver/src/mode/.mode/CO0_SHARED.py b/testsuite/driver/src/.mode/CO0_SHARED.py similarity index 100% rename from testsuite/driver/src/mode/.mode/CO0_SHARED.py rename to testsuite/driver/src/.mode/CO0_SHARED.py diff --git a/testsuite/driver/src/mode/.mode/CO0_SHARED_OLD.py b/testsuite/driver/src/.mode/CO0_SHARED_OLD.py similarity index 100% rename from testsuite/driver/src/mode/.mode/CO0_SHARED_OLD.py rename to testsuite/driver/src/.mode/CO0_SHARED_OLD.py diff --git a/testsuite/driver/src/mode/.mode/CO2.py b/testsuite/driver/src/.mode/CO2.py similarity index 100% rename from testsuite/driver/src/mode/.mode/CO2.py rename to testsuite/driver/src/.mode/CO2.py diff --git a/testsuite/driver/src/mode/.mode/CO2_BPL_C2M.py b/testsuite/driver/src/.mode/CO2_BPL_C2M.py similarity index 100% rename from testsuite/driver/src/mode/.mode/CO2_BPL_C2M.py rename to testsuite/driver/src/.mode/CO2_BPL_C2M.py diff --git a/testsuite/driver/src/mode/.mode/CO2_MPL_C2M.py b/testsuite/driver/src/.mode/CO2_MPL_C2M.py similarity index 100% rename from testsuite/driver/src/mode/.mode/CO2_MPL_C2M.py rename to testsuite/driver/src/.mode/CO2_MPL_C2M.py diff --git a/testsuite/driver/src/mode/.mode/CO2_MPL_NOINLINE_C2M.py b/testsuite/driver/src/.mode/CO2_MPL_NOINLINE_C2M.py similarity index 100% rename from testsuite/driver/src/mode/.mode/CO2_MPL_NOINLINE_C2M.py rename to testsuite/driver/src/.mode/CO2_MPL_NOINLINE_C2M.py diff --git a/testsuite/driver/src/mode/.mode/CO2_MUXED.py b/testsuite/driver/src/.mode/CO2_MUXED.py similarity index 100% rename from testsuite/driver/src/mode/.mode/CO2_MUXED.py rename to testsuite/driver/src/.mode/CO2_MUXED.py diff --git a/testsuite/driver/src/mode/.mode/CO2_OLD.py b/testsuite/driver/src/.mode/CO2_OLD.py similarity index 100% rename from testsuite/driver/src/mode/.mode/CO2_OLD.py rename to testsuite/driver/src/.mode/CO2_OLD.py diff --git a/testsuite/driver/src/mode/.mode/CO2_PIE.py b/testsuite/driver/src/.mode/CO2_PIE.py similarity index 100% rename from testsuite/driver/src/mode/.mode/CO2_PIE.py rename to testsuite/driver/src/.mode/CO2_PIE.py diff --git a/testsuite/driver/src/mode/.mode/CO2_SHARED.py b/testsuite/driver/src/.mode/CO2_SHARED.py similarity index 100% rename from testsuite/driver/src/mode/.mode/CO2_SHARED.py rename to testsuite/driver/src/.mode/CO2_SHARED.py diff --git a/testsuite/driver/src/mode/.mode/CO2_SHARED_OLD.py b/testsuite/driver/src/.mode/CO2_SHARED_OLD.py similarity index 100% rename from testsuite/driver/src/mode/.mode/CO2_SHARED_OLD.py rename to testsuite/driver/src/.mode/CO2_SHARED_OLD.py diff --git a/testsuite/driver/src/mode/.mode/CO3.py b/testsuite/driver/src/.mode/CO3.py similarity index 100% rename from testsuite/driver/src/mode/.mode/CO3.py rename to testsuite/driver/src/.mode/CO3.py diff --git a/testsuite/driver/src/mode/.mode/CO3_BPL_C2M.py b/testsuite/driver/src/.mode/CO3_BPL_C2M.py similarity index 100% rename from testsuite/driver/src/mode/.mode/CO3_BPL_C2M.py rename to testsuite/driver/src/.mode/CO3_BPL_C2M.py diff --git a/testsuite/driver/src/mode/.mode/CO3_BPL_NOINLINE_C2M.py b/testsuite/driver/src/.mode/CO3_BPL_NOINLINE_C2M.py similarity index 100% rename from testsuite/driver/src/mode/.mode/CO3_BPL_NOINLINE_C2M.py rename to testsuite/driver/src/.mode/CO3_BPL_NOINLINE_C2M.py diff --git a/testsuite/driver/src/mode/.mode/CO3_MPL_C2M.py b/testsuite/driver/src/.mode/CO3_MPL_C2M.py similarity index 100% rename from testsuite/driver/src/mode/.mode/CO3_MPL_C2M.py rename to testsuite/driver/src/.mode/CO3_MPL_C2M.py diff --git a/testsuite/driver/src/mode/.mode/CO3_MPL_NOINLINE_C2M.py b/testsuite/driver/src/.mode/CO3_MPL_NOINLINE_C2M.py similarity index 100% rename from testsuite/driver/src/mode/.mode/CO3_MPL_NOINLINE_C2M.py rename to testsuite/driver/src/.mode/CO3_MPL_NOINLINE_C2M.py diff --git a/testsuite/driver/src/mode/.mode/CO3_NOINLINE.py b/testsuite/driver/src/.mode/CO3_NOINLINE.py similarity index 100% rename from testsuite/driver/src/mode/.mode/CO3_NOINLINE.py rename to testsuite/driver/src/.mode/CO3_NOINLINE.py diff --git a/testsuite/driver/src/mode/.mode/CO3_NOINLINE_OLD.py b/testsuite/driver/src/.mode/CO3_NOINLINE_OLD.py similarity index 100% rename from testsuite/driver/src/mode/.mode/CO3_NOINLINE_OLD.py rename to testsuite/driver/src/.mode/CO3_NOINLINE_OLD.py diff --git a/testsuite/driver/src/mode/.mode/CO3_OLD.py b/testsuite/driver/src/.mode/CO3_OLD.py similarity index 100% rename from testsuite/driver/src/mode/.mode/CO3_OLD.py rename to testsuite/driver/src/.mode/CO3_OLD.py diff --git a/testsuite/driver/src/mode/.mode/COS.py b/testsuite/driver/src/.mode/COS.py similarity index 100% rename from testsuite/driver/src/mode/.mode/COS.py rename to testsuite/driver/src/.mode/COS.py diff --git a/testsuite/driver/src/mode/.mode/COS_OLD.py b/testsuite/driver/src/.mode/COS_OLD.py similarity index 100% rename from testsuite/driver/src/mode/.mode/COS_OLD.py rename to testsuite/driver/src/.mode/COS_OLD.py diff --git a/testsuite/driver/src/mode/.mode/DEJAO0.py b/testsuite/driver/src/.mode/DEJAO0.py similarity index 100% rename from testsuite/driver/src/mode/.mode/DEJAO0.py rename to testsuite/driver/src/.mode/DEJAO0.py diff --git a/testsuite/driver/src/mode/.mode/DEJAO0_OLD.py b/testsuite/driver/src/.mode/DEJAO0_OLD.py similarity index 100% rename from testsuite/driver/src/mode/.mode/DEJAO0_OLD.py rename to testsuite/driver/src/.mode/DEJAO0_OLD.py diff --git a/testsuite/driver/src/mode/.mode/DRIVER.py b/testsuite/driver/src/.mode/DRIVER.py similarity index 100% rename from testsuite/driver/src/mode/.mode/DRIVER.py rename to testsuite/driver/src/.mode/DRIVER.py diff --git a/testsuite/driver/src/mode/.mode/ENCO2_B_D.py b/testsuite/driver/src/.mode/ENCO2_B_D.py similarity index 100% rename from testsuite/driver/src/mode/.mode/ENCO2_B_D.py rename to testsuite/driver/src/.mode/ENCO2_B_D.py diff --git a/testsuite/driver/src/mode/.mode/ENCO2_B_D_A_C.py b/testsuite/driver/src/.mode/ENCO2_B_D_A_C.py similarity index 100% rename from testsuite/driver/src/mode/.mode/ENCO2_B_D_A_C.py rename to testsuite/driver/src/.mode/ENCO2_B_D_A_C.py diff --git a/testsuite/driver/src/mode/.mode/ENCO2_B_D_A_C_OLD.py b/testsuite/driver/src/.mode/ENCO2_B_D_A_C_OLD.py similarity index 100% rename from testsuite/driver/src/mode/.mode/ENCO2_B_D_A_C_OLD.py rename to testsuite/driver/src/.mode/ENCO2_B_D_A_C_OLD.py diff --git a/testsuite/driver/src/mode/.mode/ENCO2_B_D_OLD.py b/testsuite/driver/src/.mode/ENCO2_B_D_OLD.py similarity index 100% rename from testsuite/driver/src/mode/.mode/ENCO2_B_D_OLD.py rename to testsuite/driver/src/.mode/ENCO2_B_D_OLD.py diff --git a/testsuite/driver/src/mode/.mode/ENCO2_N_D.py b/testsuite/driver/src/.mode/ENCO2_N_D.py similarity index 100% rename from testsuite/driver/src/mode/.mode/ENCO2_N_D.py rename to testsuite/driver/src/.mode/ENCO2_N_D.py diff --git a/testsuite/driver/src/mode/.mode/ENCO2_N_D_ALL.py b/testsuite/driver/src/.mode/ENCO2_N_D_ALL.py similarity index 100% rename from testsuite/driver/src/mode/.mode/ENCO2_N_D_ALL.py rename to testsuite/driver/src/.mode/ENCO2_N_D_ALL.py diff --git a/testsuite/driver/src/mode/.mode/ENCO2_N_D_ALL_OLD.py b/testsuite/driver/src/.mode/ENCO2_N_D_ALL_OLD.py similarity index 100% rename from testsuite/driver/src/mode/.mode/ENCO2_N_D_ALL_OLD.py rename to testsuite/driver/src/.mode/ENCO2_N_D_ALL_OLD.py diff --git a/testsuite/driver/src/mode/.mode/ENCO2_N_D_NO_LINK.py b/testsuite/driver/src/.mode/ENCO2_N_D_NO_LINK.py similarity index 100% rename from testsuite/driver/src/mode/.mode/ENCO2_N_D_NO_LINK.py rename to testsuite/driver/src/.mode/ENCO2_N_D_NO_LINK.py diff --git a/testsuite/driver/src/mode/.mode/ENCO2_N_D_NO_LINK_OLD.py b/testsuite/driver/src/.mode/ENCO2_N_D_NO_LINK_OLD.py similarity index 100% rename from testsuite/driver/src/mode/.mode/ENCO2_N_D_NO_LINK_OLD.py rename to testsuite/driver/src/.mode/ENCO2_N_D_NO_LINK_OLD.py diff --git a/testsuite/driver/src/mode/.mode/ENCO2_N_D_OLD.py b/testsuite/driver/src/.mode/ENCO2_N_D_OLD.py similarity index 100% rename from testsuite/driver/src/mode/.mode/ENCO2_N_D_OLD.py rename to testsuite/driver/src/.mode/ENCO2_N_D_OLD.py diff --git a/testsuite/driver/src/mode/.mode/ENCO2_S_D.py b/testsuite/driver/src/.mode/ENCO2_S_D.py similarity index 100% rename from testsuite/driver/src/mode/.mode/ENCO2_S_D.py rename to testsuite/driver/src/.mode/ENCO2_S_D.py diff --git a/testsuite/driver/src/mode/.mode/ENCO2_S_D_OLD.py b/testsuite/driver/src/.mode/ENCO2_S_D_OLD.py similarity index 100% rename from testsuite/driver/src/mode/.mode/ENCO2_S_D_OLD.py rename to testsuite/driver/src/.mode/ENCO2_S_D_OLD.py diff --git a/testsuite/driver/src/mode/.mode/FORTIFY_O1.py b/testsuite/driver/src/.mode/FORTIFY_O1.py similarity index 100% rename from testsuite/driver/src/mode/.mode/FORTIFY_O1.py rename to testsuite/driver/src/.mode/FORTIFY_O1.py diff --git a/testsuite/driver/src/mode/.mode/FORTIFY_O1_OLD.py b/testsuite/driver/src/.mode/FORTIFY_O1_OLD.py similarity index 100% rename from testsuite/driver/src/mode/.mode/FORTIFY_O1_OLD.py rename to testsuite/driver/src/.mode/FORTIFY_O1_OLD.py diff --git a/testsuite/driver/src/mode/.mode/FORTIFY_O2.py b/testsuite/driver/src/.mode/FORTIFY_O2.py similarity index 100% rename from testsuite/driver/src/mode/.mode/FORTIFY_O2.py rename to testsuite/driver/src/.mode/FORTIFY_O2.py diff --git a/testsuite/driver/src/mode/.mode/FORTIFY_O2_OLD.py b/testsuite/driver/src/.mode/FORTIFY_O2_OLD.py similarity index 100% rename from testsuite/driver/src/mode/.mode/FORTIFY_O2_OLD.py rename to testsuite/driver/src/.mode/FORTIFY_O2_OLD.py diff --git a/testsuite/driver/src/mode/.mode/GC_O0.py b/testsuite/driver/src/.mode/GC_O0.py similarity index 100% rename from testsuite/driver/src/mode/.mode/GC_O0.py rename to testsuite/driver/src/.mode/GC_O0.py diff --git a/testsuite/driver/src/mode/.mode/GC_O2.py b/testsuite/driver/src/.mode/GC_O2.py similarity index 100% rename from testsuite/driver/src/mode/.mode/GC_O2.py rename to testsuite/driver/src/.mode/GC_O2.py diff --git a/testsuite/driver/src/mode/.mode/IR.py b/testsuite/driver/src/.mode/IR.py similarity index 100% rename from testsuite/driver/src/mode/.mode/IR.py rename to testsuite/driver/src/.mode/IR.py diff --git a/testsuite/driver/src/mode/.mode/LTOASTO0.py b/testsuite/driver/src/.mode/LTOASTO0.py similarity index 100% rename from testsuite/driver/src/mode/.mode/LTOASTO0.py rename to testsuite/driver/src/.mode/LTOASTO0.py diff --git a/testsuite/driver/src/mode/.mode/LTO_ENC.py b/testsuite/driver/src/.mode/LTO_ENC.py similarity index 100% rename from testsuite/driver/src/mode/.mode/LTO_ENC.py rename to testsuite/driver/src/.mode/LTO_ENC.py diff --git a/testsuite/driver/src/mode/.mode/LTO_TEST.py b/testsuite/driver/src/.mode/LTO_TEST.py similarity index 100% rename from testsuite/driver/src/mode/.mode/LTO_TEST.py rename to testsuite/driver/src/.mode/LTO_TEST.py diff --git a/testsuite/driver/src/mode/.mode/LVMMBCO2.py b/testsuite/driver/src/.mode/LVMMBCO2.py similarity index 100% rename from testsuite/driver/src/mode/.mode/LVMMBCO2.py rename to testsuite/driver/src/.mode/LVMMBCO2.py diff --git a/testsuite/driver/src/mode/.mode/LVMO0_DEBUG.py b/testsuite/driver/src/.mode/LVMO0_DEBUG.py similarity index 100% rename from testsuite/driver/src/mode/.mode/LVMO0_DEBUG.py rename to testsuite/driver/src/.mode/LVMO0_DEBUG.py diff --git a/testsuite/driver/src/mode/.mode/LVMO0_DEBUG_OLD.py b/testsuite/driver/src/.mode/LVMO0_DEBUG_OLD.py similarity index 100% rename from testsuite/driver/src/mode/.mode/LVMO0_DEBUG_OLD.py rename to testsuite/driver/src/.mode/LVMO0_DEBUG_OLD.py diff --git a/testsuite/driver/src/mode/.mode/LVMO2.py b/testsuite/driver/src/.mode/LVMO2.py similarity index 100% rename from testsuite/driver/src/mode/.mode/LVMO2.py rename to testsuite/driver/src/.mode/LVMO2.py diff --git a/testsuite/driver/src/mode/.mode/LVMO2_OLD.py b/testsuite/driver/src/.mode/LVMO2_OLD.py similarity index 100% rename from testsuite/driver/src/mode/.mode/LVMO2_OLD.py rename to testsuite/driver/src/.mode/LVMO2_OLD.py diff --git a/testsuite/driver/src/mode/.mode/LVMO2_SAFE.py b/testsuite/driver/src/.mode/LVMO2_SAFE.py similarity index 100% rename from testsuite/driver/src/mode/.mode/LVMO2_SAFE.py rename to testsuite/driver/src/.mode/LVMO2_SAFE.py diff --git a/testsuite/driver/src/mode/.mode/LVMO2_SAFE_OLD.py b/testsuite/driver/src/.mode/LVMO2_SAFE_OLD.py similarity index 100% rename from testsuite/driver/src/mode/.mode/LVMO2_SAFE_OLD.py rename to testsuite/driver/src/.mode/LVMO2_SAFE_OLD.py diff --git a/testsuite/driver/src/mode/.mode/MPLIR.py b/testsuite/driver/src/.mode/MPLIR.py similarity index 100% rename from testsuite/driver/src/mode/.mode/MPLIR.py rename to testsuite/driver/src/.mode/MPLIR.py diff --git a/testsuite/driver/src/mode/.mode/NEONO0.py b/testsuite/driver/src/.mode/NEONO0.py similarity index 100% rename from testsuite/driver/src/mode/.mode/NEONO0.py rename to testsuite/driver/src/.mode/NEONO0.py diff --git a/testsuite/driver/src/mode/.mode/NEONO0_OLD.py b/testsuite/driver/src/.mode/NEONO0_OLD.py similarity index 100% rename from testsuite/driver/src/mode/.mode/NEONO0_OLD.py rename to testsuite/driver/src/.mode/NEONO0_OLD.py diff --git a/testsuite/driver/src/mode/.mode/NEONO2.py b/testsuite/driver/src/.mode/NEONO2.py similarity index 100% rename from testsuite/driver/src/mode/.mode/NEONO2.py rename to testsuite/driver/src/.mode/NEONO2.py diff --git a/testsuite/driver/src/mode/.mode/NEONO2_OLD.py b/testsuite/driver/src/.mode/NEONO2_OLD.py similarity index 100% rename from testsuite/driver/src/mode/.mode/NEONO2_OLD.py rename to testsuite/driver/src/.mode/NEONO2_OLD.py diff --git a/testsuite/driver/src/mode/.mode/O0.py b/testsuite/driver/src/.mode/O0.py similarity index 100% rename from testsuite/driver/src/mode/.mode/O0.py rename to testsuite/driver/src/.mode/O0.py diff --git a/testsuite/driver/src/mode/.mode/O2.py b/testsuite/driver/src/.mode/O2.py similarity index 100% rename from testsuite/driver/src/mode/.mode/O2.py rename to testsuite/driver/src/.mode/O2.py diff --git a/testsuite/driver/src/mode/.mode/OPTMBCO2.py b/testsuite/driver/src/.mode/OPTMBCO2.py similarity index 100% rename from testsuite/driver/src/mode/.mode/OPTMBCO2.py rename to testsuite/driver/src/.mode/OPTMBCO2.py diff --git a/testsuite/driver/src/mode/.mode/OPTO2.py b/testsuite/driver/src/.mode/OPTO2.py similarity index 100% rename from testsuite/driver/src/mode/.mode/OPTO2.py rename to testsuite/driver/src/.mode/OPTO2.py diff --git a/testsuite/driver/src/mode/.mode/OPTO2_OLD.py b/testsuite/driver/src/.mode/OPTO2_OLD.py similarity index 100% rename from testsuite/driver/src/mode/.mode/OPTO2_OLD.py rename to testsuite/driver/src/.mode/OPTO2_OLD.py diff --git a/testsuite/driver/src/mode/.mode/OPTO2_SAFE.py b/testsuite/driver/src/.mode/OPTO2_SAFE.py similarity index 100% rename from testsuite/driver/src/mode/.mode/OPTO2_SAFE.py rename to testsuite/driver/src/.mode/OPTO2_SAFE.py diff --git a/testsuite/driver/src/mode/.mode/OPTO2_SAFE_OLD.py b/testsuite/driver/src/.mode/OPTO2_SAFE_OLD.py similarity index 100% rename from testsuite/driver/src/mode/.mode/OPTO2_SAFE_OLD.py rename to testsuite/driver/src/.mode/OPTO2_SAFE_OLD.py diff --git a/testsuite/driver/src/mode/.mode/SAFEO2_TEST.py b/testsuite/driver/src/.mode/SAFEO2_TEST.py similarity index 100% rename from testsuite/driver/src/mode/.mode/SAFEO2_TEST.py rename to testsuite/driver/src/.mode/SAFEO2_TEST.py diff --git a/testsuite/driver/src/mode/.mode/SAFEO2_TRAIN.py b/testsuite/driver/src/.mode/SAFEO2_TRAIN.py similarity index 100% rename from testsuite/driver/src/mode/.mode/SAFEO2_TRAIN.py rename to testsuite/driver/src/.mode/SAFEO2_TRAIN.py diff --git a/testsuite/driver/src/mode/.mode/SCMBCO2_TEST.py b/testsuite/driver/src/.mode/SCMBCO2_TEST.py similarity index 100% rename from testsuite/driver/src/mode/.mode/SCMBCO2_TEST.py rename to testsuite/driver/src/.mode/SCMBCO2_TEST.py diff --git a/testsuite/driver/src/mode/.mode/SCMBCO2_TRAIN.py b/testsuite/driver/src/.mode/SCMBCO2_TRAIN.py similarity index 100% rename from testsuite/driver/src/mode/.mode/SCMBCO2_TRAIN.py rename to testsuite/driver/src/.mode/SCMBCO2_TRAIN.py diff --git a/testsuite/driver/src/mode/.mode/SCO0_TEST.py b/testsuite/driver/src/.mode/SCO0_TEST.py similarity index 100% rename from testsuite/driver/src/mode/.mode/SCO0_TEST.py rename to testsuite/driver/src/.mode/SCO0_TEST.py diff --git a/testsuite/driver/src/mode/.mode/SCO0_TEST_MERGE.py b/testsuite/driver/src/.mode/SCO0_TEST_MERGE.py similarity index 100% rename from testsuite/driver/src/mode/.mode/SCO0_TEST_MERGE.py rename to testsuite/driver/src/.mode/SCO0_TEST_MERGE.py diff --git a/testsuite/driver/src/mode/.mode/SCO0_TRAIN.py b/testsuite/driver/src/.mode/SCO0_TRAIN.py similarity index 100% rename from testsuite/driver/src/mode/.mode/SCO0_TRAIN.py rename to testsuite/driver/src/.mode/SCO0_TRAIN.py diff --git a/testsuite/driver/src/mode/.mode/SCO0_TRAIN_MERGE.py b/testsuite/driver/src/.mode/SCO0_TRAIN_MERGE.py similarity index 100% rename from testsuite/driver/src/mode/.mode/SCO0_TRAIN_MERGE.py rename to testsuite/driver/src/.mode/SCO0_TRAIN_MERGE.py diff --git a/testsuite/driver/src/mode/.mode/SCO2_TEST.py b/testsuite/driver/src/.mode/SCO2_TEST.py similarity index 100% rename from testsuite/driver/src/mode/.mode/SCO2_TEST.py rename to testsuite/driver/src/.mode/SCO2_TEST.py diff --git a/testsuite/driver/src/mode/.mode/SCO2_TEST_MERGE.py b/testsuite/driver/src/.mode/SCO2_TEST_MERGE.py similarity index 100% rename from testsuite/driver/src/mode/.mode/SCO2_TEST_MERGE.py rename to testsuite/driver/src/.mode/SCO2_TEST_MERGE.py diff --git a/testsuite/driver/src/mode/.mode/SCO2_TRAIN.py b/testsuite/driver/src/.mode/SCO2_TRAIN.py similarity index 100% rename from testsuite/driver/src/mode/.mode/SCO2_TRAIN.py rename to testsuite/driver/src/.mode/SCO2_TRAIN.py diff --git a/testsuite/driver/src/mode/.mode/SCO2_TRAIN_MERGE.py b/testsuite/driver/src/.mode/SCO2_TRAIN_MERGE.py similarity index 100% rename from testsuite/driver/src/mode/.mode/SCO2_TRAIN_MERGE.py rename to testsuite/driver/src/.mode/SCO2_TRAIN_MERGE.py diff --git a/testsuite/driver/src/mode/.mode/SCOS_TRAIN.py b/testsuite/driver/src/.mode/SCOS_TRAIN.py similarity index 100% rename from testsuite/driver/src/mode/.mode/SCOS_TRAIN.py rename to testsuite/driver/src/.mode/SCOS_TRAIN.py diff --git a/testsuite/driver/src/mode/.mode/SCOS_TRAIN_MERGE.py b/testsuite/driver/src/.mode/SCOS_TRAIN_MERGE.py similarity index 100% rename from testsuite/driver/src/mode/.mode/SCOS_TRAIN_MERGE.py rename to testsuite/driver/src/.mode/SCOS_TRAIN_MERGE.py diff --git a/testsuite/driver/src/mode/.mode/SP_ALL.py b/testsuite/driver/src/.mode/SP_ALL.py similarity index 100% rename from testsuite/driver/src/mode/.mode/SP_ALL.py rename to testsuite/driver/src/.mode/SP_ALL.py diff --git a/testsuite/driver/src/mode/.mode/SP_ALL_OLD.py b/testsuite/driver/src/.mode/SP_ALL_OLD.py similarity index 100% rename from testsuite/driver/src/mode/.mode/SP_ALL_OLD.py rename to testsuite/driver/src/.mode/SP_ALL_OLD.py diff --git a/testsuite/driver/src/mode/.mode/SP_STRONG.py b/testsuite/driver/src/.mode/SP_STRONG.py similarity index 100% rename from testsuite/driver/src/mode/.mode/SP_STRONG.py rename to testsuite/driver/src/.mode/SP_STRONG.py diff --git a/testsuite/driver/src/mode/.mode/SP_STRONG_OLD.py b/testsuite/driver/src/.mode/SP_STRONG_OLD.py similarity index 100% rename from testsuite/driver/src/mode/.mode/SP_STRONG_OLD.py rename to testsuite/driver/src/.mode/SP_STRONG_OLD.py diff --git a/testsuite/driver/src/mode/.mode/SUPMBCO2.py b/testsuite/driver/src/.mode/SUPMBCO2.py similarity index 100% rename from testsuite/driver/src/mode/.mode/SUPMBCO2.py rename to testsuite/driver/src/.mode/SUPMBCO2.py diff --git a/testsuite/driver/src/mode/.mode/SUPO0.py b/testsuite/driver/src/.mode/SUPO0.py similarity index 100% rename from testsuite/driver/src/mode/.mode/SUPO0.py rename to testsuite/driver/src/.mode/SUPO0.py diff --git a/testsuite/driver/src/mode/.mode/SUPO0_OLD.py b/testsuite/driver/src/.mode/SUPO0_OLD.py similarity index 100% rename from testsuite/driver/src/mode/.mode/SUPO0_OLD.py rename to testsuite/driver/src/.mode/SUPO0_OLD.py diff --git a/testsuite/driver/src/mode/.mode/SUPO2.py b/testsuite/driver/src/.mode/SUPO2.py similarity index 100% rename from testsuite/driver/src/mode/.mode/SUPO2.py rename to testsuite/driver/src/.mode/SUPO2.py diff --git a/testsuite/driver/src/mode/.mode/SUPO2_OLD.py b/testsuite/driver/src/.mode/SUPO2_OLD.py similarity index 100% rename from testsuite/driver/src/mode/.mode/SUPO2_OLD.py rename to testsuite/driver/src/.mode/SUPO2_OLD.py diff --git a/testsuite/driver/src/mode/.mode/SUPO2_SAFE.py b/testsuite/driver/src/.mode/SUPO2_SAFE.py similarity index 100% rename from testsuite/driver/src/mode/.mode/SUPO2_SAFE.py rename to testsuite/driver/src/.mode/SUPO2_SAFE.py diff --git a/testsuite/driver/src/mode/.mode/SUPO2_SAFE_OLD.py b/testsuite/driver/src/.mode/SUPO2_SAFE_OLD.py similarity index 100% rename from testsuite/driver/src/mode/.mode/SUPO2_SAFE_OLD.py rename to testsuite/driver/src/.mode/SUPO2_SAFE_OLD.py diff --git a/testsuite/driver/src/mode/.mode/TEST_O2.py b/testsuite/driver/src/.mode/TEST_O2.py similarity index 100% rename from testsuite/driver/src/mode/.mode/TEST_O2.py rename to testsuite/driver/src/.mode/TEST_O2.py diff --git a/testsuite/driver/src/mode/.mode/TEST_OS.py b/testsuite/driver/src/.mode/TEST_OS.py similarity index 100% rename from testsuite/driver/src/mode/.mode/TEST_OS.py rename to testsuite/driver/src/.mode/TEST_OS.py diff --git a/testsuite/driver/src/mode/.mode/TSVO2.py b/testsuite/driver/src/.mode/TSVO2.py similarity index 100% rename from testsuite/driver/src/mode/.mode/TSVO2.py rename to testsuite/driver/src/.mode/TSVO2.py diff --git a/testsuite/driver/src/mode/.mode/TSVO2_OLD.py b/testsuite/driver/src/.mode/TSVO2_OLD.py similarity index 100% rename from testsuite/driver/src/mode/.mode/TSVO2_OLD.py rename to testsuite/driver/src/.mode/TSVO2_OLD.py diff --git a/testsuite/driver/src/mode/.mode/X64_LITECG.py b/testsuite/driver/src/.mode/X64_LITECG.py similarity index 100% rename from testsuite/driver/src/mode/.mode/X64_LITECG.py rename to testsuite/driver/src/.mode/X64_LITECG.py diff --git a/testsuite/driver/src/mode/.mode/X64_LITECG_ME_O2.py b/testsuite/driver/src/.mode/X64_LITECG_ME_O2.py similarity index 100% rename from testsuite/driver/src/mode/.mode/X64_LITECG_ME_O2.py rename to testsuite/driver/src/.mode/X64_LITECG_ME_O2.py diff --git a/testsuite/driver/src/mode/.mode/X64_LITECG_MPL2MPL_O2.py b/testsuite/driver/src/.mode/X64_LITECG_MPL2MPL_O2.py similarity index 100% rename from testsuite/driver/src/mode/.mode/X64_LITECG_MPL2MPL_O2.py rename to testsuite/driver/src/.mode/X64_LITECG_MPL2MPL_O2.py diff --git a/testsuite/driver/src/mode/.mode/X64_O0.py b/testsuite/driver/src/.mode/X64_O0.py similarity index 100% rename from testsuite/driver/src/mode/.mode/X64_O0.py rename to testsuite/driver/src/.mode/X64_O0.py diff --git a/testsuite/driver/src/mode/.mode/X64_O2.py b/testsuite/driver/src/.mode/X64_O2.py similarity index 100% rename from testsuite/driver/src/mode/.mode/X64_O2.py rename to testsuite/driver/src/.mode/X64_O2.py diff --git a/testsuite/driver/src/mode/.mode/__init__.py b/testsuite/driver/src/.mode/__init__.py similarity index 100% rename from testsuite/driver/src/mode/.mode/__init__.py rename to testsuite/driver/src/.mode/__init__.py diff --git a/testsuite/driver/src/api b/testsuite/driver/src/api new file mode 120000 index 0000000000000000000000000000000000000000..0e2167fe5a36e0a118321a9a10fcab50e01190c8 --- /dev/null +++ b/testsuite/driver/src/api @@ -0,0 +1 @@ +.api \ No newline at end of file diff --git a/testsuite/driver/src/api/__init__.py b/testsuite/driver/src/api/__init__.py deleted file mode 100644 index 3a055c3126768375451e1e962ccf8ba049192afc..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/api/__init__.py +++ /dev/null @@ -1,32 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -import os - -names = locals() - -my_dir = os.path.dirname(__file__) -for py in os.listdir(my_dir): - if py == '__init__.py': - continue - - if py.endswith('.py'): - name = py[:-3] - - clsn = name.capitalize() - while clsn.find('_') > 0: - h = clsn.index('_') - clsn = clsn[0:h] + clsn[h + 1:].capitalize() - api = __import__("api." + name, fromlist=[clsn]) - names[clsn] = getattr(api, clsn) diff --git a/testsuite/driver/src/api/benchmark_native.py b/testsuite/driver/src/api/benchmark_native.py deleted file mode 100644 index c2c970cd97afda13a01466b8ac1b4de1d243e45f..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/api/benchmark_native.py +++ /dev/null @@ -1,34 +0,0 @@ -import os -import re -from api.shell_operator import ShellOperator - - -class BenchmarkNative(ShellOperator): - - def __init__(self, return_value_list=None, redirection=None): - super().__init__(return_value_list, redirection) - self.command = "" - self.native_lib_name = "" - self.native_src = "" - self.native_include = "-I${MAPLE_ROOT}/../libnativehelper/include_jni" - self.native_linker = "" - - def get_command(self, variables): - if "NATIVE_LIB_NAME" in variables: - self.native_lib_name = variables["NATIVE_LIB_NAME"] - if "NATIVE_SRC" in variables: - srcs = variables["NATIVE_SRC"].split(":") - for src in srcs: - self.native_src += " " + src - if "NATIVE_INCLUDE" in variables: - includes = variables["NATIVE_INCLUDE"].split(":") - for include in includes: - if include != "": - self.native_include += " -I${MAPLE_ROOT}/../" + include - if "NATIVE_LINKE" in variables: - links = variables["NATIVE_LINKE"].split(":") - for link in links: - if link != "": - self.native_linker += " ${MAPLE_ROOT}/../" + link - self.command = "${MAPLE_ROOT}/../prebuilts/clang/host/linux-x86/clang-r353983c/bin/clang++ " + self.native_include + " " + self.native_src + " ${MAPLE_ROOT}/../out/soong/.intermediates/bionic/libc/crtbegin_so/android_arm64_armv8-a_core/crtbegin_so.o ${MAPLE_ROOT}/../prebuilts/clang/host/linux-x86/clang-r353983c/lib64/clang/9.0.3/lib/linux/libclang_rt.builtins-aarch64-android.a ${MAPLE_ROOT}/../prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/lib64/libatomic.a ${MAPLE_ROOT}/../out/soong/.intermediates/build/soong/libgcc_stripped/android_arm64_armv8-a_core_static/libgcc_stripped.a " + self.native_linker + " ${MAPLE_ROOT}/../out/soong/.intermediates/external/libcxx/libc++/android_arm64_armv8-a_core_shared/libc++.so ${MAPLE_ROOT}/../out/soong/.intermediates/bionic/libc/libc/android_arm64_armv8-a_core_shared_10000/libc.so ${MAPLE_ROOT}/../out/soong/.intermediates/bionic/libm/libm/android_arm64_armv8-a_core_shared_10000/libm.so ${MAPLE_ROOT}/../out/soong/.intermediates/bionic/libdl/libdl/android_arm64_armv8-a_core_shared_10000/libdl.so ${MAPLE_ROOT}/../out/soong/.intermediates/bionic/libc/crtend_so/android_arm64_armv8-a_core/obj/bionic/libc/arch-common/bionic/crtend_so.o -o ${BENCHMARK_ACTION}/lib" + self.native_lib_name + ".so -nostdlib -Wl,--gc-sections -shared -Wl,-soname,lib" + self.native_lib_name + ".so -target aarch64-linux-android -B${MAPLE_ROOT}/../prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--build-id=md5 -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--no-undefined-version -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libgcc_stripped.a -fuse-ld=lld -Wl,--pack-dyn-relocs=android+relr -Wl,--use-android-relr-tags -Wl,--no-undefined -Wl,--hash-style=gnu -Wl,--icf=safe -Wl,-z,max-page-size=4096 ${MAPLE_ROOT}/../prebuilts/clang/host/linux-x86/clang-r353983c/lib64/clang/9.0.3/lib/linux/libclang_rt.ubsan_minimal-aarch64-android.a -Wl,--exclude-libs,libclang_rt.ubsan_minimal-aarch64-android.a -Wl,-execute-only -fPIC" - return super().get_final_command(variables) \ No newline at end of file diff --git a/testsuite/driver/src/api/benchmark_vogar.py b/testsuite/driver/src/api/benchmark_vogar.py deleted file mode 100644 index 67e55bccc483f74f6b92ead011b819dc2695513e..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/api/benchmark_vogar.py +++ /dev/null @@ -1,18 +0,0 @@ -import os -import re -from api.shell_operator import ShellOperator - - -class BenchmarkVogar(ShellOperator): - - def __init__(self, return_value_list=None, redirection=None): - super().__init__(return_value_list, redirection) - self.command = "" - self.vogar_deps_dir = "${MAPLE_ROOT}/zeiss/prebuilt/tools/mygote_script/benchmark_scripts" - self.sourcepath = "" - - def get_command(self, variables): - if "SOURCEPATH" in variables: - self.sourcepath = "--sourcepath " + variables["SOURCEPATH"] - self.command = "PATH=${MAPLE_ROOT}/../out/soong/host/linux-x86/bin:/$PATH ANDROID_BUILD_TOP=${MAPLE_ROOT}/.. VOGAR_DEPS_DIR=" + self.vogar_deps_dir + " java -classpath " + self.vogar_deps_dir + "/vogar.jar vogar.Vogar --results-dir . --toolchain D8 --mode DEVICE --variant X64 " + self.sourcepath + " --benchmark " + variables["BENCHMARK_CASE"] - return super().get_final_command(variables) \ No newline at end of file diff --git a/testsuite/driver/src/api/check_file_equal.py b/testsuite/driver/src/api/check_file_equal.py deleted file mode 100644 index d4472a1981e5486e0e8c0828f9adbccc9ffe520c..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/api/check_file_equal.py +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api.shell_operator import ShellOperator - - -class CheckFileEqual(ShellOperator): - - def __init__(self, file1, file2, return_value_list=None): - super().__init__(return_value_list) - self.file1 = file1 - self.file2 = file2 - - def get_command(self, variables): - self.command = "diff " + self.file1 + " " + self.file2 - return super().get_final_command(variables) \ No newline at end of file diff --git a/testsuite/driver/src/api/check_reg_contain.py b/testsuite/driver/src/api/check_reg_contain.py deleted file mode 100644 index 49007a19c3576f65e3f955c1b8f2b60966392359..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/api/check_reg_contain.py +++ /dev/null @@ -1,31 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api.shell_operator import ShellOperator - - -class CheckRegContain(ShellOperator): - - def __init__(self, reg, file, choice=None, return_value_list=None): - super().__init__(return_value_list) - self.reg = reg - self.file = file - self.choice = choice - - def get_command(self, variables): - if self.choice is None: - self.command = "python3 ${OUT_ROOT}/target/product/public/bin/check.py --check=contain --str=\"" + self.reg + "\" --result=" + self.file - elif self.choice == "num": - self.command = "python3 ${OUT_ROOT}/target/product/public/bin/check.py --check=num --result=" + self.file + " --str=" + self.reg + " --num=${EXPECTNUM}" - return super().get_final_command(variables) diff --git a/testsuite/driver/src/api/class2panda.py b/testsuite/driver/src/api/class2panda.py deleted file mode 100644 index bdc94ccfb69a76b853dc2e3842023876c6f8d2cb..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/api/class2panda.py +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api.shell_operator import ShellOperator - - -class Class2panda(ShellOperator): - - def __init__(self, class2panda, infile, outfile, return_value_list=None, redirection=None): - super().__init__(return_value_list, redirection) - self.class2panda = class2panda - self.infile = infile - self.outfile = outfile - - def get_command(self, variables): - self.command = "LD_LIBRARY_PATH=${OUT_ROOT}/target/product/public/lib:$LD_LIBRARY_PATH " + self.class2panda + " " + self.infile + " " + self.outfile - return super().get_final_command(variables) \ No newline at end of file diff --git a/testsuite/driver/src/api/dex2mpl.py b/testsuite/driver/src/api/dex2mpl.py deleted file mode 100644 index cc5715b92c5debc8298cdc926ba893010364e3b2..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/api/dex2mpl.py +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api.shell_operator import ShellOperator - - -class Dex2mpl(ShellOperator): - - def __init__(self, dex2mpl, option, infile, return_value_list=None, redirection=None): - super().__init__(return_value_list, redirection) - self.dex2mpl = dex2mpl - self.option = option - self.infile = infile - - def get_command(self, variables): - self.command = self.dex2mpl + " " + self.option + " " + self.infile - return super().get_final_command(variables) \ No newline at end of file diff --git a/testsuite/driver/src/api/gendeps.py b/testsuite/driver/src/api/gendeps.py deleted file mode 100644 index 44dc09c5035e51046e8c9c65c7a44e594effc33c..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/api/gendeps.py +++ /dev/null @@ -1,34 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api.shell_operator import ShellOperator - - -class Gendeps(ShellOperator): - - def __init__(self, gendeps, apk, emui, infile, return_value_list=None, redirection=None, extra_option=""): - super().__init__(return_value_list, redirection) - self.gendeps = gendeps - self.apk = apk - self.emui = emui - self.infile = infile - self.extra_option = extra_option - - def get_command(self, variables): - self.command = self.gendeps + " -emui-map ${OUT_ROOT}/target/product/public/lib/dex_module_map_sdk.list -classpath libmaplecore-all -verbose -out-module-name " - self.command += "-apk " + self.apk + " " - self.command += "-emui " + self.emui + " " - self.command += self.extra_option + " " - self.command +="-in-dex " + self.infile - return super().get_final_command(variables) \ No newline at end of file diff --git a/testsuite/driver/src/api/irbuild.py b/testsuite/driver/src/api/irbuild.py deleted file mode 100644 index 3688c00e9387ef3a2ac29eba163737133a2e00d3..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/api/irbuild.py +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api.shell_operator import ShellOperator - - -class Irbuild(ShellOperator): - - def __init__(self, irbuild, infile, return_value_list=None, redirection=None): - super().__init__(return_value_list, redirection) - self.irbuild = irbuild - self.infile = infile - - def get_command(self, variables): - self.command = self.irbuild + " " + self.infile - return super().get_final_command(variables) \ No newline at end of file diff --git a/testsuite/driver/src/api/jar2dex.py b/testsuite/driver/src/api/jar2dex.py deleted file mode 100644 index 327a2dbd552f01efaa4cd66f065b05f5ab93e204..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/api/jar2dex.py +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api.shell_operator import ShellOperator - - -class Jar2dex(ShellOperator): - - def __init__(self, jar_file, infile, return_value_list=None, redirection=None): - super().__init__(return_value_list, redirection) - self.jar_file = jar_file - self.infile = infile - - def get_command(self, variables): - self.command = "${OUT_ROOT}/target/product/public/bin/jar2dex " + " -p " + ":".join(self.jar_file) + " -i " + self.infile - return super().get_final_command(variables) diff --git a/testsuite/driver/src/api/jasm2jar.py b/testsuite/driver/src/api/jasm2jar.py deleted file mode 100644 index 252119e227628dacb9f1cedecbbb057d01d875c3..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/api/jasm2jar.py +++ /dev/null @@ -1,26 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api.shell_operator import ShellOperator - - -class Jasm2jar(ShellOperator): - - def __init__(self, file, return_value_list=None, redirection=None): - super().__init__(return_value_list, redirection) - self.file = file - - def get_command(self, variables): - self.command = "java -jar ${OUT_ROOT}/target/product/public/bin/asmtools.jar jasm " + " ".join(self.file) + ";jar -cvf ${APP}.jar *.class" - return super().get_final_command(variables) \ No newline at end of file diff --git a/testsuite/driver/src/api/java2dex.py b/testsuite/driver/src/api/java2dex.py deleted file mode 100644 index fcc25c966ecb50c54ce343ac6d3f9c6341e0fa09..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/api/java2dex.py +++ /dev/null @@ -1,39 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api.shell_operator import ShellOperator - - -class Java2dex(ShellOperator): - - def __init__(self, jar_file, outfile, infile, usesimplejava=False, return_value_list=None, redirection=None): - super().__init__(return_value_list, redirection) - self.jar_file = jar_file - self.outfile = outfile - self.infile = infile - self.usesimplejava = usesimplejava - - def java2dex_i_output(self, variables): - if 'EXTRA_JAVA_FILE' in variables.keys(): - variables['EXTRA_JAVA_FILE'] = variables['EXTRA_JAVA_FILE'].replace('[','').replace(']','').replace(',',':') - return ':'.join(self.infile) - return self.infile[0] - - def get_command(self, variables): - if not self.usesimplejava: - self.command = "${OUT_ROOT}/target/product/public/bin/java2dex -o " + self.outfile + " -p " + ":".join(self.jar_file) + " -i " + self.java2dex_i_output(variables) - else: - self.command = "${OUT_ROOT}/target/product/public/bin/java2dex -o " + self.outfile + " -p " + ":".join(self.jar_file) + " -i " + self.java2dex_i_output(variables) + " -s useSimpleJava" - # print(super().get_final_command(variables)) - return super().get_final_command(variables) diff --git a/testsuite/driver/src/api/jcod2jar.py b/testsuite/driver/src/api/jcod2jar.py deleted file mode 100644 index bd066a69ca5db331ecf1980e4c9c8b6ee950bb18..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/api/jcod2jar.py +++ /dev/null @@ -1,26 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api.shell_operator import ShellOperator - - -class Jcod2jar(ShellOperator): - - def __init__(self, file, return_value_list=None, redirection=None): - super().__init__(return_value_list, redirection) - self.file = file - - def get_command(self, variables): - self.command = "java -jar ${OUT_ROOT}/target/product/public/bin/asmtools.jar jcoder " + " ".join(self.file) + ";jar -cvf ${APP}.jar *.class" - return super().get_final_command(variables) \ No newline at end of file diff --git a/testsuite/driver/src/api/linker.py b/testsuite/driver/src/api/linker.py deleted file mode 100644 index f912c36ba93c1d61ffb7763e47fa03f9ea3d355b..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/api/linker.py +++ /dev/null @@ -1,32 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api.shell_operator import ShellOperator - - -class Linker(ShellOperator): - - def __init__(self, infile, lib, model, native_src=None, return_value_list=None, redirection=None): - super().__init__(return_value_list, redirection) - self.model = model - self.lib = lib - self.native_src = native_src - self.infile = infile - - def get_command(self, variables): - if self.native_src: - self.command = "${OUT_ROOT}/target/product/public/bin/linker -m " + self.model + " -l " + self.lib + " -i " + self.infile + " -n " + self.native_src - else: - self.command = "${OUT_ROOT}/target/product/public/bin/linker -m " + self.model + " -l " + self.lib + " -i " + self.infile - return super().get_final_command(variables) \ No newline at end of file diff --git a/testsuite/driver/src/api/maple.py b/testsuite/driver/src/api/maple.py deleted file mode 100644 index 6417addd2d0e0e6cf97d12717e6e0eb5f2fb6996..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/api/maple.py +++ /dev/null @@ -1,36 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api.shell_operator import ShellOperator - - -class Maple(ShellOperator): - - def __init__(self, maple, run, option, global_option, infile, return_value_list=None, redirection=None): - super().__init__(return_value_list, redirection) - self.maple = maple - self.run = run - self.option_dict = option - self.global_option = global_option - self.infile = infile - - def get_command(self, variables): - self.command = self.maple + " --run=" + ":".join(self.run) + " " - option = [] - for cmd in self.run: - option.append(self.option_dict[cmd]) - self.command += "--option=\"" + ":".join(option) + "\" " - self.command += self.global_option + " " - self.command += "--infile " + self.infile - return super().get_final_command(variables) diff --git a/testsuite/driver/src/api/mplme.py b/testsuite/driver/src/api/mplme.py deleted file mode 100644 index 627343c0ca18e1a7974ee340155f44220af317fd..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/api/mplme.py +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api.shell_operator import ShellOperator - - -class Mplme(ShellOperator): - - def __init__(self, mplme, option, infile, return_value_list=None, redirection=None): - super().__init__(return_value_list, redirection) - self.mplme = mplme - self.option = option - self.infile = infile - - def get_command(self, variables): - self.command = self.mplme + " " + self.option + " " + self.infile - return super().get_final_command(variables) \ No newline at end of file diff --git a/testsuite/driver/src/api/mplsh.py b/testsuite/driver/src/api/mplsh.py deleted file mode 100644 index ec379177b9716c738a8c0f0356e3df8402d77fff..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/api/mplsh.py +++ /dev/null @@ -1,47 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api.shell_operator import ShellOperator - - -class Mplsh(ShellOperator): - - def __init__(self, mplsh, xbootclasspath, infile, garbage_collection_kind, return_value_list=None, env=None, qemu=None, qemu_libc=None, qemu_ld_lib=None, main="${APP}", args=None, redirection=None): - super().__init__(return_value_list, redirection) - self.env = env - self.qemu = qemu - self.qemu_libc = qemu_libc - self.qemu_ld_lib = qemu_ld_lib - self.mplsh = mplsh - self.garbage_collection_kind = garbage_collection_kind - self.xbootclasspath = xbootclasspath - self.infile = infile - self.main = main - self.args = args - - def get_command(self, variables): - self.command = "" - if self.env is not None: - for env_var in self.env.keys(): - self.command += env_var + "=" + self.env[env_var] + " " - if self.qemu is not None: - self.command += self.qemu + " -L " + self.qemu_libc + " -E LD_LIBRARY_PATH=" + ":".join(self.qemu_ld_lib) + " " - self.command += self.mplsh + " " - if self.garbage_collection_kind == "GC": - self.command += "-Xgconly " - if self.args is not None: - self.command +="-Xbootclasspath:" + self.xbootclasspath + " -cp " + self.infile + " " + self.main + " " + self.args - else: - self.command += "-Xbootclasspath:" + self.xbootclasspath + " -cp " + self.infile + " " + self.main - return super().get_final_command(variables) diff --git a/testsuite/driver/src/api/mplverf.py b/testsuite/driver/src/api/mplverf.py deleted file mode 100644 index 00297886b87372664c10ddf992d14c73ecc77af2..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/api/mplverf.py +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api.shell_operator import ShellOperator - - -class Mplverf(ShellOperator): - - def __init__(self, mplverf, infile, return_value_list=None, redirection=None): - super().__init__(return_value_list, redirection) - self.mplverf = mplverf - self.infile = infile - - def get_command(self, variables): - self.command = self.mplverf + " " + self.infile - return super().get_final_command(variables) \ No newline at end of file diff --git a/testsuite/driver/src/api/native_compile.py b/testsuite/driver/src/api/native_compile.py deleted file mode 100644 index 68cc06b8152501d9a781b2b319ed5d06718e947b..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/api/native_compile.py +++ /dev/null @@ -1,75 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api.shell_operator import ShellOperator - - -class NativeCompile(ShellOperator): - - def __init__(self, mpldep, infile, model, return_value_list=None, redirection=None): - super().__init__(return_value_list, redirection) - self.mpldep = mpldep - self.infile = infile - self.model =model - - def get_command(self, variables): - if self.model == "arm32_hard": - self.command = "/usr/bin/clang++-9 -O2 -g3 -c -fPIC -march=armv7-a -mfpu=vfpv4 -mfloat-abi=hard -target armv7a-linux-gnueabihf -c " - for file in self.mpldep: - self.command += "-I" + file + " " - self.command += " -isystem /usr/arm-linux-gnueabihf/include/c++/5 -isystem /usr/arm-linux-gnueabihf/include/c++/5/arm-linux-gnueabihf -isystem /usr/arm-linux-gnueabihf/include/c++/5/backward -isystem /usr/lib/gcc-cross/arm-linux-gnueabihf/5/include -isystem /usr/lib/gcc-cross/arm-linux-gnueabihf/5/include-fixed -isystem /usr/arm-linux-gnueabihf/include" - self.command += " " + self.infile + ".cpp; " - self.command += " /usr/bin/clang++-9 " - self.command += " " + self.infile + ".o" - self.command += " -O2 -Wall -Werror -Wno-unused-command-line-argument -fstack-protector-strong -std=c++14 -nostdlibinc -march=armv7-a -mfpu=vfpv4 -mfloat-abi=hard -target armv7a-linux-gnueabihf -fPIC -shared -fuse-ld=lld -rdynamic" - self.command += " -L" + self.mpldep[0] + " -lcore-all -lcommon-bridge" - self.command += " -Wl,-z,notext -o" - self.command += " lib" + self.infile + ".so;" - if self.model == "arm32_softfp": - self.command = "/usr/bin/clang++-9 -O2 -g3 -c -fPIC -march=armv7-a -mfpu=vfpv4 -mfloat-abi=softfp -target armv7a-linux-gnueabi -c " - for file in self.mpldep: - self.command += "-I" + file + " " - self.command += " -isystem /usr/arm-linux-gnueabi/include/c++/5 -isystem /usr/arm-linux-gnueabi/include/c++/5/arm-linux-gnueabi -isystem /usr/arm-linux-gnueabi/include/c++/5/backward -isystem /usr/lib/gcc-cross/arm-linux-gnueabi/5/include -isystem /usr/lib/gcc-cross/arm-linux-gnueabi/5/include-fixed -isystem /usr/arm-linux-gnueabi/include" - self.command += " " + self.infile + ".cpp; " - self.command += " /usr/bin/clang++-9 " - self.command += " " + self.infile + ".o" - self.command += " -O2 -Wall -Werror -Wno-unused-command-line-argument -fstack-protector-strong -std=c++14 -nostdlibinc -march=armv7-a -mfpu=vfpv4 -mfloat-abi=softfp -target armv7a-linux-gnueabi -fPIC -shared -fuse-ld=lld -rdynamic" - self.command += " -L" + self.mpldep[0] + " -lcore-all -lcommon-bridge" - self.command += " -Wl,-z,notext -o" - self.command += " lib" + self.infile + ".so;" - if self.model == "arm64": - self.command = " /usr/bin/clang++-9 -O2 -g3 -c -fPIC -march=armv8-a -target aarch64-linux-gnu " - for file in self.mpldep: - self.command += "-I" + file + " " - self.command += " -isystem /usr/aarch64-linux-gnu/include/c++/5 -isystem /usr/aarch64-linux-gnu/include/c++/5/aarch64-linux-gnu -isystem /usr/aarch64-linux-gnu/include/c++/5/backward -isystem /usr/lib/gcc-cross/aarch64-linux-gnu/5/include -isystem /usr/lib/gcc-cross/aarch64-linux-gnu/5/include-fixed -isystem /usr/aarch64-linux-gnu/include" - self.command += " " + self.infile + ".cpp; " - self.command += " /usr/bin/clang++-9 " - self.command += " " + self.infile + ".o" - self.command += " -O2 -Wall -Werror -Wno-unused-command-line-argument -fstack-protector-strong -std=c++14 -nostdlibinc -march=armv8-a -target aarch64-linux-gnu -fPIC -shared -fuse-ld=lld -rdynamic" - self.command += " -L" + self.mpldep[0] + " -lcore-all -lcommon-bridge" - self.command += " -Wl,-z,notext -o" - self.command += " lib" + self.infile + ".so;" - if self.model == "arm64_ifile": - self.command = " /usr/bin/clang++-9 -O2 -g3 -c -fPIC -march=armv8-a -target aarch64-linux-gnu " - for file in self.mpldep: - self.command += "-I" + file + " " - self.command += " -isystem /usr/aarch64-linux-gnu/include/c++/5 -isystem /usr/aarch64-linux-gnu/include/c++/5/aarch64-linux-gnu -isystem /usr/aarch64-linux-gnu/include/c++/5/backward -isystem /usr/lib/gcc-cross/aarch64-linux-gnu/5/include -isystem /usr/lib/gcc-cross/aarch64-linux-gnu/5/include-fixed -isystem /usr/aarch64-linux-gnu/include" - self.command += " " + self.infile + ".cpp; " - self.command += " /usr/bin/clang++-9 " - self.command += " " + self.infile + ".o" - self.command += " -O2 -Wall -Werror -Wno-unused-command-line-argument -fstack-protector-strong -std=c++14 -nostdlibinc -march=armv8-a -target aarch64-linux-gnu -fPIC -shared -fuse-ld=lld -rdynamic" - self.command += " -L" + self.mpldep[0] + " -lmrt -lcommon-bridge" - self.command += " -Wl,-z,notext -o" - self.command += " lib" + self.infile + ".so;" - return super().get_final_command(variables) diff --git a/testsuite/driver/src/api/qemu_linker_arm32.py b/testsuite/driver/src/api/qemu_linker_arm32.py deleted file mode 100644 index 429fe3b2bea976659ce454dafa1d3ad2e412afc8..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/api/qemu_linker_arm32.py +++ /dev/null @@ -1,38 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api.shell_operator import ShellOperator - - -class QemuLinkerArm32(ShellOperator): - - def __init__(self, lib, model, parse=None, return_value_list=None, redirection=None): - super().__init__(return_value_list, redirection) - self.lib = lib - self.model = model - if parse is None: - self.parse = '${APP}' - else: - self.parse = parse - - def get_command(self, variables): - if self.model == "hard": - self.command = "/usr/bin/clang++-9 -march=armv7-a -mfpu=vfpv4 -mfloat-abi=hard -g3 -O2 -x assembler-with-cpp -target armv7a-linux-gnueabihf -c " + self.parse + ".VtableImpl.s -o " + self.parse + ".VtableImpl.qemu.o;/usr/bin/clang++-9 -g3 -O2 -march=armv7-a -mfpu=vfpv4 -mfloat-abi=hard -target armv7a-linux-gnueabihf -fPIC -shared -o " + self.parse + ".so ${OUT_ROOT}/target/product/maple_arm32/lib/hard/mrt_module_init.o -I${OUT_ROOT}/target/product/maple_arm32/lib/nativehelper " + self.parse + ".VtableImpl.qemu.o -fuse-ld=lld -rdynamic -L${OUT_ROOT}/target/product/maple_arm32/lib/" + self.lib + "/ -lcore-all -lcommon-bridge -Wl\,-z\,notext -Wl\,-T ${OUT_ROOT}/target/product/public/lib/linker/mapleArm32lld.so.lds" - if self.model == "native_hard": - self.command = "/usr/bin/clang++-9 -march=armv7-a -mfpu=vfpv4 -mfloat-abi=hard -g3 -O2 -x assembler-with-cpp -target armv7a-linux-gnueabihf -c " + self.parse + ".VtableImpl.s -o " + self.parse + ".VtableImpl.qemu.o;/usr/bin/clang++-9 -march=armv7-a -mfpu=vfpv4 -mfloat-abi=hard -g3 -O2 -Wall -Werror -Wno-unused-command-line-argument -fstack-protector-strong -fPIC -std=c++14 -nostdlibinc -isystem /usr/arm-linux-gnueabihf/include/c++/5 -isystem /usr/arm-linux-gnueabihf/include/c++/5/arm-linux-gnueabihf -isystem /usr/arm-linux-gnueabihf/include/c++/5/backward -isystem /usr/lib/gcc-cross/arm-linux-gnueabihf/5/include -isystem /usr/lib/gcc-cross/arm-linux-gnueabihf/5/include-fixed -isystem /usr/arm-linux-gnueabihf/include -target armv7a-linux-gnueabihf -fPIC -shared -o " + self.parse + ".so ${OUT_ROOT}/target/product/maple_arm32/lib/hard/mrt_module_init.o ${NATIVE_SRC} -I${OUT_ROOT}/target/product/public/lib " + self.parse + ".VtableImpl.qemu.o -fuse-ld=lld -rdynamic -L${OUT_ROOT}/target/product/maple_arm32/lib/" + self.lib + "/ -lcore-all -lcommon-bridge -Wl\,-z\,notext -Wl\,-T ${OUT_ROOT}/target/product/public/lib/linker/mapleArm32lld.so.lds" - if self.model == "native_softfp": - self.command = "/usr/bin/clang++-9 -march=armv7-a -mfpu=vfpv4 -mfloat-abi=softfp -g3 -O2 -x assembler-with-cpp -target armv7a-linux-gnueabi -c " + self.parse + ".VtableImpl.s -o " + self.parse + ".VtableImpl.qemu.o;/usr/bin/clang++-9 -march=armv7-a -mfpu=vfpv4 -mfloat-abi=softfp -g3 -O2 -Wall -Werror -Wno-unused-command-line-argument -fstack-protector-strong -fPIC -std=c++14 -nostdlibinc -isystem /usr/arm-linux-gnueabi/include/c++/5 -isystem /usr/arm-linux-gnueabi/include/c++/5/arm-linux-gnueabi -isystem /usr/arm-linux-gnueabi/include/c++/5/backward -isystem /usr/lib/gcc-cross/arm-linux-gnueabi/5/include -isystem /usr/lib/gcc-cross/arm-linux-gnueabi/5/include-fixed -isystem /usr/arm-linux-gnueabi/include -target armv7a-linux-gnueabi -fPIC -shared -o " + self.parse + ".so ${OUT_ROOT}/target/product/maple_arm32/lib/softfp/mrt_module_init.o ${NATIVE_SRC} -I${OUT_ROOT}/target/product/public/lib " + self.parse + ".VtableImpl.qemu.o -fuse-ld=lld -rdynamic -L${OUT_ROOT}/target/product/maple_arm32/lib/" + self.lib + "/ -lcore-all -lcommon-bridge -Wl\,-z\,notext -Wl\,-T ${OUT_ROOT}/target/product/public/lib/linker/mapleArm32lld.so.lds" - if self.model == "softfp": - self.command = "/usr/bin/clang++-9 -march=armv7-a -mfpu=vfpv4 -mfloat-abi=softfp -g3 -O2 -x assembler-with-cpp -target armv7a-linux-gnueabi -c " + self.parse + ".VtableImpl.s -o " + self.parse + ".VtableImpl.qemu.o;/usr/bin/clang++-9 -g3 -O2 -march=armv7-a -mfpu=vfpv4 -mfloat-abi=softfp -target armv7a-linux-gnueabi -fPIC -shared -o " + self.parse + ".so ${OUT_ROOT}/target/product/maple_arm32/lib/softfp/mrt_module_init.o -I${OUT_ROOT}/target/product/maple_arm32/lib/nativehelper " + self.parse + ".VtableImpl.qemu.o -fuse-ld=lld -rdynamic -L${OUT_ROOT}/target/product/maple_arm32/lib/" + self.lib + "/ -lcore-all -lcommon-bridge -Wl\,-z\,notext -Wl\,-T ${OUT_ROOT}/target/product/public/lib/linker/mapleArm32lld.so.lds" - return super().get_final_command(variables) diff --git a/testsuite/driver/src/api/qemu_linker_arm64.py b/testsuite/driver/src/api/qemu_linker_arm64.py deleted file mode 100644 index ddc7549c24dfac768581b88bef7bc5b2e631859a..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/api/qemu_linker_arm64.py +++ /dev/null @@ -1,30 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api.shell_operator import ShellOperator - - -class QemuLinkerArm64(ShellOperator): - - def __init__(self, lib, parse=None, return_value_list=None, redirection=None): - super().__init__(return_value_list, redirection) - self.lib = lib - if parse is None: - self.parse = '${APP}' - else: - self.parse = parse - - def get_command(self, variables): - self.command = "/usr/bin/clang++-9 -march=armv8-a -g3 -O2 -x assembler-with-cpp -target aarch64-linux-gnu -c " + self.parse + ".VtableImpl.s -o " + self.parse + ".VtableImpl.qemu.o;/usr/bin/clang++-9 -g3 -O2 -march=armv8-a -target aarch64-linux-gnu -fPIC -shared -o " + self.parse + ".so ${OUT_ROOT}/target/product/maple_arm64/lib/mrt_module_init.o -I${OUT_ROOT}/target/product/maple_arm64/lib/nativehelper " + self.parse + ".VtableImpl.qemu.o -fuse-ld=lld -rdynamic -L${OUT_ROOT}/target/product/maple_arm64/lib/" + self.lib + "/ -lcore-all -lcommon-bridge -Wl,-z,notext -Wl,-T ${OUT_ROOT}/target/product/public/lib/linker/maplelld.so.lds" - return super().get_final_command(variables) diff --git a/testsuite/driver/src/api/qemu_native_linker.py b/testsuite/driver/src/api/qemu_native_linker.py deleted file mode 100644 index 7007bff9a2ac8ca03d392925f315c0a51b5a4bc2..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/api/qemu_native_linker.py +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api.shell_operator import ShellOperator - - -class QemuNativeLinker(ShellOperator): - def __init__(self, lib, return_value_list=None, redirection=None): - super().__init__(return_value_list, redirection) - self.lib = lib - - def get_command(self, variables): - self.command = "/usr/bin/clang++-9 -march=armv8-a -g3 -O2 -x assembler-with-cpp -target aarch64-linux-gnu -c ${APP}.VtableImpl.s -o ${APP}.VtableImpl.qemu.o;/usr/bin/clang++-9 -g3 -O2 -Wall -Werror -Wno-unused-command-line-argument -fstack-protector-strong -fPIC -std=c++14 -nostdlibinc -march=armv8-a -isystem /usr/lib/gcc-cross/aarch64-linux-gnu/5/../../../../aarch64-linux-gnu/include/c++/5 -isystem /usr/lib/gcc-cross/aarch64-linux-gnu/5/../../../../aarch64-linux-gnu/include/c++/5/aarch64-linux-gnu -isystem /usr/lib/gcc-cross/aarch64-linux-gnu/5/../../../../aarch64-linux-gnu/include/c++/5/backward -isystem /usr/lib/gcc-cross/aarch64-linux-gnu/5/include -isystem /usr/lib/gcc-cross/aarch64-linux-gnu/5/include-fixed -isystem /usr/aarch64-linux-gnu/include -target aarch64-linux-gnu -fPIC -shared -o ${APP}.so ${OUT_ROOT}/target/product/maple_arm64/lib/mrt_module_init.o ${NATIVE_SRC} -I${OUT_ROOT}/target/product/public/lib ${APP}.VtableImpl.qemu.o -fuse-ld=lld -rdynamic -L${OUT_ROOT}/target/product/maple_arm64/lib/" + self.lib + "/ -lcore-all -lcommon-bridge -Wl\,-z\,notext -Wl\,-T ${OUT_ROOT}/target/product/public/lib/linker/maplelld.so.lds" - return super().get_final_command(variables) diff --git a/testsuite/driver/src/api/shell.py b/testsuite/driver/src/api/shell.py deleted file mode 100644 index 04d6a776103405f7c9c1031e9cfb9276a9d8d82d..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/api/shell.py +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api.shell_operator import ShellOperator - - -class Shell(ShellOperator): - - def __init__(self, command, return_value_list=None, redirection=None): - super().__init__(return_value_list, redirection) - self.command = command - - def get_command(self, variables): - return super().get_final_command(variables) \ No newline at end of file diff --git a/testsuite/driver/src/api/shell_operator.py b/testsuite/driver/src/api/shell_operator.py deleted file mode 100644 index a33412022d04f367a410e8b4461311a3dd3d60d6..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/api/shell_operator.py +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -class ShellOperator(object): - - def __init__(self, return_value_list, redirection=None): - self.command = "" - if return_value_list is None: - self.return_value_list = [0] - else: - self.return_value_list = return_value_list - self.redirection = redirection - - def get_redirection(self): - if self.redirection is not None: - return " > " + self.redirection + " 2>&1" - else: - return "" - - def get_check_command(self): - if len(self.return_value_list) == 1: - if 0 in self.return_value_list: - return "" - else: - return " || [ $? -eq " + str(self.return_value_list[0]) + " ]" - elif len(self.return_value_list) == 0: - return " || true" - else: - return_value_check_str_list = [] - for return_value in self.return_value_list: - return_value_check_str_list.append("[ ${return_value} -eq " + str(return_value) + " ]") - return " || (return_value=$? && (" + " || ".join(return_value_check_str_list) + "))" - - def get_final_command(self, variables): - final_command = self.command - if variables is not None: - for variable in variables.keys(): - if "${" + variable + "}" in final_command: - final_command = final_command.replace("${" + variable + "}", variables[variable]) - final_command += self.get_redirection() - final_command += self.get_check_command() - return final_command \ No newline at end of file diff --git a/testsuite/driver/src/api/smali2dex.py b/testsuite/driver/src/api/smali2dex.py deleted file mode 100644 index 3e8050ebfd72bca486931b115099f8671248e8bd..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/api/smali2dex.py +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api.shell_operator import ShellOperator - - -class Smali2dex(ShellOperator): - - def __init__(self, file, return_value_list=None, redirection=None): - super().__init__(return_value_list, redirection) - self.file = file - - def get_command(self, variables): - self.command = "java -jar ${OUT_ROOT}/target/product/public/bin/smali-2.2.4.jar ass " + " ".join(self.file) + "; mv out.dex ${APP}.dex" - self.command += super().get_redirection() - return super().get_final_command(variables) diff --git a/testsuite/driver/src/api/unzip.py b/testsuite/driver/src/api/unzip.py deleted file mode 100644 index 11faffe74b65aec7e71b0e67305023746921400d..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/api/unzip.py +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api.shell_operator import ShellOperator - - -class Unzip(ShellOperator): - - def __init__(self, file, target_path, return_value_list=None, redirection=None): - super().__init__(return_value_list, redirection) - self.file = file - self.target_path = target_path - - def get_command(self, variables): - self.command = "unzip -o " + self.file + " -d " + self.target_path - return super().get_final_command(variables) diff --git a/testsuite/driver/src/mode b/testsuite/driver/src/mode new file mode 120000 index 0000000000000000000000000000000000000000..09d75d39961ee7dbbeb279d4c7b1435aedbf0a8d --- /dev/null +++ b/testsuite/driver/src/mode @@ -0,0 +1 @@ +.mode \ No newline at end of file diff --git a/testsuite/driver/src/mode/AOT.py b/testsuite/driver/src/mode/AOT.py deleted file mode 100644 index 9a33481bf58de4e786b5a3c816a5891b3efab867..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/AOT.py +++ /dev/null @@ -1,116 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -AOT = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_AOT/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-AOT/libcore-all.mplt -dexcatch -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -j=16 -j100 -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -refine-catch -staticstringcheck", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --nativeopt --replaceasm" - }, - global_option="--save-temps --aot", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-AOT", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-AOT", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-AOT", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "MAPLE_VERIFY_RC": "1", - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-AOT", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - infile="${APP}.so", - xbootclasspath="libcore-all.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/ARM32O0HD.py b/testsuite/driver/src/mode/ARM32O0HD.py deleted file mode 100644 index c60923aba8f4d0824750d588a957747011e14318..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/ARM32O0HD.py +++ /dev/null @@ -1,120 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -ARM32O0HD = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm32/bin/maple", - run=["dex2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O0/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list ", - "me": "--quiet", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --FastNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/fastNative.list --CriticalNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/criticalNative.list --nativefunc-property-list=${OUT_ROOT}/target/product/public/lib/codetricks/native_binding/native_func_property.list", - "mplcg": "--quiet --no-pie --verbose-asm --maplelinker --fPIC" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-hard_O0", - model="arm32_hard", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabihf", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/hard", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_hard", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabihf", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/hard", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_hard", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_VERIFY_RC": "1", - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabihf", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/hard", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_hard", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/ARM32O0NATIVEHD.py b/testsuite/driver/src/mode/ARM32O0NATIVEHD.py deleted file mode 100644 index 031639fa111e9a92a0f11c68c23b57cbf1301c09..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/ARM32O0NATIVEHD.py +++ /dev/null @@ -1,131 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -ARM32O0NATIVEHD = { - "compile": [ - NativeCompile( - mpldep=[ - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O0", - "${OUT_ROOT}/target/product/public/lib/libnativehelper/include" - ], - infile="${NATIVE_SRC}", - model="arm32_hard" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm32/bin/maple", - run=["dex2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O0/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list ", - "me": "--quiet", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --FastNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/fastNative.list --CriticalNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/criticalNative.list --nativefunc-property-list=${OUT_ROOT}/target/product/public/lib/codetricks/native_binding/native_func_property.list", - "mplcg": "--quiet --no-pie --verbose-asm --maplelinker --fPIC" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-hard_O0", - model="arm32_hard", - infile="${APP}", - ) - ], - "run": [ - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabihf", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm32/third-party/hard", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O0" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_hard", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_REPORT_RC_LEAK": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabihf", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm32/third-party/hard", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O0" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_hard", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_VERIFY_RC": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabihf", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm32/third-party/hard", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O0" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_hard", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/ARM32O0NATIVESFP.py b/testsuite/driver/src/mode/ARM32O0NATIVESFP.py deleted file mode 100644 index 4b72c675e549d88d0ac9099e33d8536bdfc830f4..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/ARM32O0NATIVESFP.py +++ /dev/null @@ -1,131 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -ARM32O0NATIVESFP = { - "compile": [ - NativeCompile( - mpldep=[ - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O0", - "${OUT_ROOT}/target/product/public/lib/libnativehelper/include" - ], - infile="${NATIVE_SRC}", - model="arm32_softfp" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm32/bin/maple", - run=["dex2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O0/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list", - "me": "--quiet", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --FastNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/fastNative.list --CriticalNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/criticalNative.list --nativefunc-property-list=${OUT_ROOT}/target/product/public/lib/codetricks/native_binding/native_func_property.list", - "mplcg": "--quiet --float-abi=softfp --no-pie --verbose-asm --maplelinker --fPIC" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-softfp_O0", - model="arm32_softfp", - infile="${APP}", - ) - ], - "run": [ - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabi", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm32/third-party/softfp", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O0", - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_softfp", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_REPORT_RC_LEAK": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabi", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm32/third-party/softfp", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O0", - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_softfp", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_VERIFY_RC": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabi", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm32/third-party/softfp", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O0", - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_softfp", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/ARM32O0RCHD.py b/testsuite/driver/src/mode/ARM32O0RCHD.py deleted file mode 100644 index 204f4d1413ff2eb1c8be5594101d21eb9e05303a..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/ARM32O0RCHD.py +++ /dev/null @@ -1,79 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -ARM32O0RCHD = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm32/bin/maple", - run=["dex2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O0/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list ", - "me": "--quiet", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --FastNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/fastNative.list --CriticalNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/criticalNative.list --nativefunc-property-list=${OUT_ROOT}/target/product/public/lib/codetricks/native_binding/native_func_property.list", - "mplcg": "--quiet --no-pie --verbose-asm --maplelinker --fPIC" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-hard_O0", - model="arm32_hard", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_REPORT_RC_LEAK": "1", - "PATTERN_FROM_BACKUP_TRACING": "1" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabihf", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/hard", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_hard", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="cycle.log" - ), - CheckRegContain( - reg="ExpectResult", - file="cycle.log" - ), - CheckRegContain( - reg="Total Leak Count 0", - file="cycle.log" - ), - CheckRegContain( - choice="num", - reg="ExpectResult", - file="cycle.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/ARM32O0RCSFP.py b/testsuite/driver/src/mode/ARM32O0RCSFP.py deleted file mode 100644 index 58655cbb47c91896da7a58035547b7943df37f24..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/ARM32O0RCSFP.py +++ /dev/null @@ -1,79 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -ARM32O0RCSFP = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm32/bin/maple", - run=["dex2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O0/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list", - "me": "--quiet", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --FastNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/fastNative.list --CriticalNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/criticalNative.list --nativefunc-property-list=${OUT_ROOT}/target/product/public/lib/codetricks/native_binding/native_func_property.list", - "mplcg": "--quiet --float-abi=softfp --no-pie --verbose-asm --maplelinker --fPIC" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-softfp_O0", - model="arm32_softfp", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_REPORT_RC_LEAK": "1", - "PATTERN_FROM_BACKUP_TRACING": "1" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabi", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/softfp", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_softfp", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="cycle.log" - ), - CheckRegContain( - reg="ExpectResult", - file="cycle.log" - ), - CheckRegContain( - reg="Total Leak Count 0", - file="cycle.log" - ), - CheckRegContain( - choice="num", - reg="ExpectResult", - file="cycle.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/ARM32O0SFP.py b/testsuite/driver/src/mode/ARM32O0SFP.py deleted file mode 100644 index 6506189a0f13ca253ed4aee2b5e3af87fa06a915..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/ARM32O0SFP.py +++ /dev/null @@ -1,120 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -ARM32O0SFP = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm32/bin/maple", - run=["dex2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O0/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list", - "me": "--quiet", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --FastNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/fastNative.list --CriticalNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/criticalNative.list --nativefunc-property-list=${OUT_ROOT}/target/product/public/lib/codetricks/native_binding/native_func_property.list", - "mplcg": "--quiet --float-abi=softfp --no-pie --verbose-asm --maplelinker --fPIC" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-softfp_O0", - model="arm32_softfp", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabi", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/softfp", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_softfp", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabi", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/softfp", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_softfp", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_VERIFY_RC": "1" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabi", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/softfp", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_softfp", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/ARM32O2HD.py b/testsuite/driver/src/mode/ARM32O2HD.py deleted file mode 100644 index 011adf0a490748d1494a74fad39887a16751d70c..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/ARM32O2HD.py +++ /dev/null @@ -1,116 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -ARM32O2HD = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm32/bin/maple", - run=["dex2mpl","mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O2/libcore-all.mplt -dexcatch -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -j=16 -j100 -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -refine-catch -staticstringcheck", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg":"--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --maplelinker --gsrc --nativeopt --replaceasm" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-hard_O2", - model="arm32_hard", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabihf", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/hard", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_hard", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabihf", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/hard", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_hard", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "MAPLE_VERIFY_RC": "1", - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabihf", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/hard", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_hard", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/ARM32O2NATIVEHD.py b/testsuite/driver/src/mode/ARM32O2NATIVEHD.py deleted file mode 100644 index 01eb181bfe4ae47aa695928ebb294fae31f60858..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/ARM32O2NATIVEHD.py +++ /dev/null @@ -1,129 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -ARM32O2NATIVEHD = { - "compile": [ - NativeCompile( - mpldep=[ - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O2", - "${OUT_ROOT}/target/product/public/lib/libnativehelper/include" - ], - infile="${NATIVE_SRC}", - model="arm32_hard" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm32/bin/maple", - run=["dex2mpl","mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O2/libcore-all.mplt -dexcatch -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -j=16 -j100 -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -refine-catch -staticstringcheck", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg":"--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --maplelinker --gsrc --nativeopt --replaceasm" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-hard_O2", - model="arm32_hard", - infile="${APP}", - ) - ], - "run": [ - Mplsh( - env={ - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabihf", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm32/third-party/hard", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O2", - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_hard", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabihf", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm32/third-party/hard", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O2", - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_hard", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "MAPLE_VERIFY_RC": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabihf", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm32/third-party/hard", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O2", - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_hard", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/ARM32O2NATIVESFP.py b/testsuite/driver/src/mode/ARM32O2NATIVESFP.py deleted file mode 100644 index 8cf5ff48a70fdaaa34e20faa772b86efd6005030..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/ARM32O2NATIVESFP.py +++ /dev/null @@ -1,129 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -ARM32O2NATIVESFP = { - "compile": [ - NativeCompile( - mpldep=[ - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O2", - "${OUT_ROOT}/target/product/public/lib/libnativehelper/include" - ], - infile="${NATIVE_SRC}", - model="arm32_softfp" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm32/bin/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O2/libcore-all.mplt -dexcatch -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -j=16 -j100 -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -refine-catch -staticstringcheck", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--O2 --quiet --float-abi=softfp --no-pie --verbose-asm --fPIC --gen-c-macro-def --maplelinker --gsrc --nativeopt --replaceasm" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-softfp_O2", - model="arm32_softfp", - infile="${APP}", - ) - ], - "run": [ - Mplsh( - env={ - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabi", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm32/third-party/softfp", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O2" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_softfp", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabi", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm32/third-party/softfp", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O2" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_softfp", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "MAPLE_VERIFY_RC": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabi", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm32/third-party/softfp", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O2" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_softfp", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/ARM32O2RCHD.py b/testsuite/driver/src/mode/ARM32O2RCHD.py deleted file mode 100644 index 4afbf9dc569f2e03d8c34683cd2a2d7bef725d59..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/ARM32O2RCHD.py +++ /dev/null @@ -1,79 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -ARM32O2RCHD = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm32/bin/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O2/libcore-all.mplt -dexcatch -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -j=16 -j100 -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -refine-catch -staticstringcheck", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --maplelinker --gsrc --nativeopt --replaceasm" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-hard_O2", - model="arm32_hard", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1", - "PATTERN_FROM_BACKUP_TRACING": "1" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabihf", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/hard", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_hard", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="cycle.log" - ), - CheckRegContain( - reg="ExpectResult", - file="cycle.log" - ), - CheckRegContain( - reg="Total Leak Count 0", - file="cycle.log" - ), - CheckRegContain( - choice="num", - reg="ExpectResult", - file="cycle.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/ARM32O2RCSFP.py b/testsuite/driver/src/mode/ARM32O2RCSFP.py deleted file mode 100644 index e8fa848d2b8dc04e944b691e34984f7654c5950f..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/ARM32O2RCSFP.py +++ /dev/null @@ -1,79 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -ARM32O2RCSFP = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm32/bin/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O2/libcore-all.mplt -dexcatch -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -j=16 -j100 -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -refine-catch -staticstringcheck", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--O2 --quiet --float-abi=softfp --no-pie --verbose-asm --fPIC --gen-c-macro-def --maplelinker --gsrc --nativeopt --replaceasm" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-softfp_O2", - model="arm32_softfp", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1", - "PATTERN_FROM_BACKUP_TRACING": "1" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabi", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/softfp", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_softfp", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="cycle.log" - ), - CheckRegContain( - reg="ExpectResult", - file="cycle.log" - ), - CheckRegContain( - reg="Total Leak Count 0", - file="cycle.log" - ), - CheckRegContain( - choice="num", - reg="ExpectResult", - file="cycle.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/ARM32O2SFP.py b/testsuite/driver/src/mode/ARM32O2SFP.py deleted file mode 100644 index 71adc72007452b7cea00a39c7d9e2ff25cefeef7..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/ARM32O2SFP.py +++ /dev/null @@ -1,116 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -ARM32O2SFP = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm32/bin/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O2/libcore-all.mplt -dexcatch -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -j=16 -j100 -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -refine-catch -staticstringcheck", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--O2 --quiet --float-abi=softfp --no-pie --verbose-asm --fPIC --gen-c-macro-def --maplelinker --gsrc --nativeopt --replaceasm" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-softfp_O2", - model="arm32_softfp", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabi", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/softfp", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_softfp", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabi", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/softfp", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_softfp", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "MAPLE_VERIFY_RC": "1", - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabi", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/softfp", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_softfp", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/ARM32ZTERPCLASSLOADERHD.py b/testsuite/driver/src/mode/ARM32ZTERPCLASSLOADERHD.py deleted file mode 100644 index 7d499e3af035eb1bd19b852808bd5a6a5129b01c..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/ARM32ZTERPCLASSLOADERHD.py +++ /dev/null @@ -1,299 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -ARM32ZTERPCLASSLOADERHD = { - "java2dex": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ) - ], - "compile": [ - Shell( - 'cp ../lib/child.jar ./ ' - ), - Shell( - 'cp ../lib/parent.jar ./ ' - ), - Shell( - 'cp ../lib/inject.jar ./ ' - ), - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="child.jar" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm32/bin/maple", - run=["dex2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O0/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list", - "me": "--quiet", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --FastNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/fastNative.list --CriticalNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/criticalNative.list --nativefunc-property-list=${OUT_ROOT}/target/product/public/lib/codetricks/native_binding/native_func_property.list", - "mplcg": "--quiet --no-pie --verbose-asm --maplelinker --fPIC" - }, - global_option="--save-temps", - infile="child.dex" - ), - Linker( - lib="host-x86_64-hard_O0", - model="arm32_hard", - infile="child" - ), - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="parent.jar" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm32/bin/maple", - run=["dex2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O0/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list", - "me": "--quiet", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --FastNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/fastNative.list --CriticalNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/criticalNative.list --nativefunc-property-list=${OUT_ROOT}/target/product/public/lib/codetricks/native_binding/native_func_property.list", - "mplcg": "--quiet --no-pie --verbose-asm --maplelinker --fPIC" - }, - global_option="--save-temps", - infile="parent.dex" - ), - Linker( - lib="host-x86_64-hard_O0", - model="arm32_hard", - infile="parent" - ), - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="inject.jar" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm32/bin/maple", - run=["dex2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O0/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list", - "me": "--quiet", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --FastNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/fastNative.list --CriticalNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/criticalNative.list --nativefunc-property-list=${OUT_ROOT}/target/product/public/lib/codetricks/native_binding/native_func_property.list", - "mplcg": "--quiet --no-pie --verbose-asm --maplelinker --fPIC" - }, - global_option="--save-temps", - infile="inject.dex" - ), - Linker( - lib="host-x86_64-hard_O0", - model="arm32_hard", - infile="inject" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm32/bin/maple", - run=["dex2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O0/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list", - "me": "--quiet", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --FastNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/fastNative.list --CriticalNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/criticalNative.list --nativefunc-property-list=${OUT_ROOT}/target/product/public/lib/codetricks/native_binding/native_func_property.list", - "mplcg": "--quiet --no-pie --verbose-asm --maplelinker --fPIC" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-hard_O0", - model="arm32_hard", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "USE_ZTERP": "true" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabihf", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/hard", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_hard", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.dex", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "USE_ZTERP": "true", - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabihf", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/hard", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_hard", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.dex", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "USE_ZTERP": "true", - "MAPLE_VERIFY_RC": "1" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabihf", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/hard", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_hard", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.dex", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "USE_ZTERP": "true", - "APP_SPECIFY_CLASSPATH": '$(echo ${APP}.so|cut -d "=" -f 2)' - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabihf", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/hard", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_hard", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.dex", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "USE_ZTERP": "true", - "MAPLE_REPORT_RC_LEAK": "1", - "APP_SPECIFY_CLASSPATH": '$(echo ${APP}.so|cut -d "=" -f 2)' - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabihf", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/hard", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_hard", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.dex", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "USE_ZTERP": "true", - "MAPLE_VERIFY_RC": "1", - "APP_SPECIFY_CLASSPATH": '$(echo ${APP}.so|cut -d "=" -f 2)' - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabihf", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/hard", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_hard", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.dex", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/ARM32ZTERPCLASSLOADERSFP.py b/testsuite/driver/src/mode/ARM32ZTERPCLASSLOADERSFP.py deleted file mode 100644 index d934d314a87b3d7651abedc7d922f06893c894f0..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/ARM32ZTERPCLASSLOADERSFP.py +++ /dev/null @@ -1,299 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -ARM32ZTERPCLASSLOADERSFP = { - "java2dex": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ) - ], - "compile": [ - Shell( - 'cp ../lib/child.jar ./ ' - ), - Shell( - 'cp ../lib/parent.jar ./ ' - ), - Shell( - 'cp ../lib/inject.jar ./ ' - ), - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="child.jar" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm32/bin/maple", - run=["dex2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O0/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list", - "me": "--quiet", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --FastNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/fastNative.list --CriticalNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/criticalNative.list --nativefunc-property-list=${OUT_ROOT}/target/product/public/lib/codetricks/native_binding/native_func_property.list", - "mplcg": "--quiet --float-abi=softfp --no-pie --verbose-asm --maplelinker --fPIC" - }, - global_option="--save-temps", - infile="child.dex" - ), - Linker( - lib="host-x86_64-softfp_O0", - model="arm32_softfp", - infile="child" - ), - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="parent.jar" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm32/bin/maple", - run=["dex2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O0/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list", - "me": "--quiet", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --FastNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/fastNative.list --CriticalNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/criticalNative.list --nativefunc-property-list=${OUT_ROOT}/target/product/public/lib/codetricks/native_binding/native_func_property.list", - "mplcg": "--quiet --float-abi=softfp --no-pie --verbose-asm --maplelinker --fPIC" - }, - global_option="--save-temps", - infile="parent.dex" - ), - Linker( - lib="host-x86_64-softfp_O0", - model="arm32_softfp", - infile="parent" - ), - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="inject.jar" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm32/bin/maple", - run=["dex2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O0/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list", - "me": "--quiet", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --FastNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/fastNative.list --CriticalNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/criticalNative.list --nativefunc-property-list=${OUT_ROOT}/target/product/public/lib/codetricks/native_binding/native_func_property.list", - "mplcg": "--quiet --float-abi=softfp --no-pie --verbose-asm --maplelinker --fPIC" - }, - global_option="--save-temps", - infile="inject.dex" - ), - Linker( - lib="host-x86_64-softfp_O0", - model="arm32_softfp", - infile="inject" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm32/bin/maple", - run=["dex2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O0/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list", - "me": "--quiet", - "mpl2mpl": "--quiet --regnativefunc --maplelinker--FastNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/fastNative.list --CriticalNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/criticalNative.list --nativefunc-property-list=${OUT_ROOT}/target/product/public/lib/codetricks/native_binding/native_func_property.list", - "mplcg": "--quiet --float-abi=softfp --no-pie --verbose-asm --maplelinker --fPIC" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-softfp_O0", - model="arm32_softfp", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "USE_ZTERP": "true" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabi", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/softfp", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_softfp", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.dex", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "USE_ZTERP": "true", - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabi", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/softfp", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_softfp", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.dex", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "USE_ZTERP": "true", - "MAPLE_VERIFY_RC": "1" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabi", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/softfp", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_softfp", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.dex", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "USE_ZTERP": "true", - "APP_SPECIFY_CLASSPATH": '$(echo ${APP}.so|cut -d "=" -f 2)' - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabi", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/softfp", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_softfp", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.dex", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "USE_ZTERP": "true", - "MAPLE_REPORT_RC_LEAK": "1", - "APP_SPECIFY_CLASSPATH": '$(echo ${APP}.so|cut -d "=" -f 2)' - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabi", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/softfp", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_softfp", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.dex", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "USE_ZTERP": "true", - "MAPLE_VERIFY_RC": "1", - "APP_SPECIFY_CLASSPATH": '$(echo ${APP}.so|cut -d "=" -f 2)' - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabi", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/softfp", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_softfp", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.dex", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/ARM32ZTERPDEXSOHD.py b/testsuite/driver/src/mode/ARM32ZTERPDEXSOHD.py deleted file mode 100644 index 911b6f7577b5c5d8050dd1a2d7ab2bc26cb6e57a..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/ARM32ZTERPDEXSOHD.py +++ /dev/null @@ -1,144 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -ARM32ZTERPDEXSOHD = { - "java2dex":[ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ) - ], - "java2dex_simplejava":[ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"], - usesimplejava=True - ) - ], - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm32/bin/maple", - run=["dex2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O0/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list ", - "me": "--quiet", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --FastNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/fastNative.list --CriticalNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/criticalNative.list --nativefunc-property-list=${OUT_ROOT}/target/product/public/lib/codetricks/native_binding/native_func_property.list", - "mplcg": "--quiet --no-pie --verbose-asm --maplelinker --fPIC" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-hard_O0", - model="arm32_hard", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "USE_ZTERP": "true" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabihf", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/hard", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_hard", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${CP}", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "USE_ZTERP": "true", - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabihf", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/hard", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_hard", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${CP}", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "USE_ZTERP": "true", - "MAPLE_VERIFY_RC": "1" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabihf", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/hard", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_hard", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${CP}", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/ARM32ZTERPDEXSOSFP.py b/testsuite/driver/src/mode/ARM32ZTERPDEXSOSFP.py deleted file mode 100644 index 36106bbe43cab8fa093d2ee8bfe23a39992050fe..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/ARM32ZTERPDEXSOSFP.py +++ /dev/null @@ -1,144 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -ARM32ZTERPDEXSOSFP = { - "java2dex": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ) - ], - "java2dex_simplejava": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"], - usesimplejava=True - ) - ], - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm32/bin/maple", - run=["dex2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O0/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list", - "me": "--quiet", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --FastNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/fastNative.list --CriticalNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/criticalNative.list --nativefunc-property-list=${OUT_ROOT}/target/product/public/lib/codetricks/native_binding/native_func_property.list", - "mplcg": "--quiet --float-abi=softfp --no-pie --verbose-asm --maplelinker --fPIC" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-softfp_O0", - model="arm32_softfp", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "USE_ZTERP": "true" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabi", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/softfp", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_softfp", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${CP}", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "USE_ZTERP": "true", - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabi", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/softfp", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_softfp", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${CP}", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "USE_ZTERP": "true", - "MAPLE_VERIFY_RC": "1" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabi", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/softfp", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_softfp", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${CP}", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/ARM32ZTERPHD.py b/testsuite/driver/src/mode/ARM32ZTERPHD.py deleted file mode 100644 index e6af20039d714de87a1e62a4aad6f0f575fc701f..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/ARM32ZTERPHD.py +++ /dev/null @@ -1,106 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -ARM32ZTERPHD = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ) - ], - "run": [ - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "USE_ZTERP": "true" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabihf", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/hard", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_hard", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.dex", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "USE_ZTERP": "true", - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabihf", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/hard", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_hard", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.dex", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "USE_ZTERP": "true", - "MAPLE_VERIFY_RC": "1" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabihf", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/hard", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_hard", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.dex", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/ARM32ZTERPRCHD.py b/testsuite/driver/src/mode/ARM32ZTERPRCHD.py deleted file mode 100644 index fa64e949b73b2b867c98a8e19626e3486db77bfd..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/ARM32ZTERPRCHD.py +++ /dev/null @@ -1,63 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -ARM32ZTERPRCHD = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ) - ], - "run": [ - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "USE_ZTERP": "true", - "MAPLE_REPORT_RC_LEAK": "1", - "PATTERN_FROM_BACKUP_TRACING": "1" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabihf", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/hard", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-hard_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_hard", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.dex", - redirection="cycle.log" - ), - CheckRegContain( - reg="ExpectResult", - file="cycle.log" - ), - CheckRegContain( - reg="Total Leak Count 0", - file="cycle.log" - ), - CheckRegContain( - reg="ExpectResult", - file="cycle.log", - choice="num" - ) - ] -} \ No newline at end of file diff --git a/testsuite/driver/src/mode/ARM32ZTERPRCSFP.py b/testsuite/driver/src/mode/ARM32ZTERPRCSFP.py deleted file mode 100644 index 2908566504105d97bba34c9b0550c8c81974dc9b..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/ARM32ZTERPRCSFP.py +++ /dev/null @@ -1,63 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -ARM32ZTERPRCSFP = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ) - ], - "run": [ - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "USE_ZTERP": "true", - "MAPLE_REPORT_RC_LEAK": "1", - "PATTERN_FROM_BACKUP_TRACING": "1" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabi", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/softfp", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_softfp", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.dex", - redirection="cycle.log" - ), - CheckRegContain( - reg="ExpectResult", - file="cycle.log" - ), - CheckRegContain( - reg="Total Leak Count 0", - file="cycle.log" - ), - CheckRegContain( - reg="ExpectResult", - file="cycle.log", - choice="num" - ) - ] -} \ No newline at end of file diff --git a/testsuite/driver/src/mode/ARM32ZTERPSFP.py b/testsuite/driver/src/mode/ARM32ZTERPSFP.py deleted file mode 100644 index ef76cd430b22f03e08a3c8283b88a50acd61ef7a..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/ARM32ZTERPSFP.py +++ /dev/null @@ -1,106 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -ARM32ZTERPSFP = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ) - ], - "run": [ - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "USE_ZTERP": "true" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabi", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/softfp", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_softfp", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.dex", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "USE_ZTERP": "true", - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabi", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/softfp", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_softfp", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.dex", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "USE_ZTERP": "true", - "MAPLE_VERIFY_RC": "1", - }, - qemu="/usr/bin/qemu-arm", - qemu_libc="/usr/arm-linux-gnueabi", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm32/third-party/softfp", - "${OUT_ROOT}/target/product/maple_arm32/lib/host-x86_64-softfp_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm32/bin/mplsh_arm_softfp", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.dex", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} \ No newline at end of file diff --git a/testsuite/driver/src/mode/COMPACT.py b/testsuite/driver/src/mode/COMPACT.py deleted file mode 100644 index ee855cadc204bcc6d8a7aa9ea1ab7433a6ec4d88..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/COMPACT.py +++ /dev/null @@ -1,123 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -COMPACT = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2/libcore-all.mplt -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list", - "mplipa": "--quiet --effectipa", - "me": "-O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "-O2 --quiet --regnativefunc --no-nativeopt --maplelinker --compact-meta --FastNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/fastNative.list --CriticalNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/criticalNative.list --nativefunc-property-list=${OUT_ROOT}/target/product/public/lib/codetricks/native_binding/native_func_property.list", - "mplcg": "-O2 --quiet --no-pie --verbose-asm --gen-c-macro-def --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/arch/arm64/duplicateFunc.s --fPIC" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Shell( - "python3 ${OUT_ROOT}/target/product/public/bin/check_compact.py ${APP}.VtableImpl.s > output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Linker( - lib="host-x86_64-O2", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "MAPLE_VERIFY_RC": "1", - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/CORT.py b/testsuite/driver/src/mode/CORT.py deleted file mode 100644 index 1ed57913e8e1452fe24161e9f6d84a4da5850d6b..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/CORT.py +++ /dev/null @@ -1,30 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -CORT = { - "compile": [ - Shell("/usr/bin/clang-9 -O2 -g3 -c -fPIC -march=armv8-a -target aarch64-linux-gnu -I${MAPLE_ROOT}/mrt/coroutine/api/ ${APP}.c;/usr/bin/clang++-9 -s -fuse-ld=lld -O2 -g -Wall -fstack-protector-strong -fPIC -Werror -fPIE -rdynamic -pie -W -Wno-macro-redefined -Wno-inconsistent-missing-override -Wno-deprecated -Wno-unused-command-line-argument -isystem /usr/lib/gcc-cross/aarch64-linux-gnu/5/../../../../aarch64-linux-gnu/include/c++/5 -isystem /usr/lib/gcc-cross/aarch64-linux-gnu/5/../../../../aarch64-linux-gnu/include/c++/5/aarch64-linux-gnu -isystem /usr/lib/gcc-cross/aarch64-linux-gnu/5/../../../../aarch64-linux-gnu/include/c++/5/backward -isystem /usr/lib/gcc-cross/aarch64-linux-gnu/5/include -isystem /usr/lib/gcc-cross/aarch64-linux-gnu/5/include-fixed -isystem /usr/aarch64-linux-gnu/include -target aarch64-linux-gnu -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -fPIE -o test.out -Wl,--start-group test.o -L${OUT_ROOT}/target/product/maple_arm64-clang-release/lib/host-x86_64-O2/ -lcoroutine -ldl -lhuawei_secure_c -Wl,--end-group") - ], - "run": [ - Shell( - "/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu -E LD_LIBRARY_PATH=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2:./ ./${APP}.out > output.log 2>&1" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ) - ] -} diff --git a/testsuite/driver/src/mode/DEOPT.py b/testsuite/driver/src/mode/DEOPT.py deleted file mode 100644 index 02e5d552144384a9b0078104025bec991173c265..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/DEOPT.py +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -DEOPT = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_HIR2MPL_IFILE/maple", - run=["hir2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_IFILE/libcore-all.mplt", - "me": "--gconly --O2 --quiet --threads=4 --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--gconly --O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--gconly --O2 --quiet --threads=4 --no-pie --verbose-asm --gen-c-macro-def --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/maple_arm64-clang-release/lib/codetricks/arch/arm64/duplicateFunc.s --nativeopt --fPIC --filetype=obj --with-ra-linear-scan --no-ico --no-cfgo --no-prepeep --no-peep --no-ebo --no-storeloadopt --no-globalopt --no-schedule --no-proepilogue --no-prelsra --no-const-fold" - }, - global_option="--save-temps --aot --deopt --ifile", - infile="${APP}.dex" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_IFILE", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="GC", - xbootclasspath="libcore-all.ohex", - infile="${APP}.ohex", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ) - ] -} diff --git a/testsuite/driver/src/mode/DEPENDENCE.py b/testsuite/driver/src/mode/DEPENDENCE.py deleted file mode 100644 index 03e887b1c5159b2e653f6e245ffe8bacc0eba563..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/DEPENDENCE.py +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -DEPENDENCE = { - "gendeps": [ - Gendeps( - gendeps="${OUT_ROOT}/target/product/maple_arm64/bin/gendeps", - apk="${APK}", - emui="${EMUI}", - extra_option="${EXTRA_OPTION}", - infile="${APP}.dex" - ) - ] -} \ No newline at end of file diff --git a/testsuite/driver/src/mode/DEX.py b/testsuite/driver/src/mode/DEX.py deleted file mode 100644 index b01e76a088b5ed314b02c9de48b9335324ae083c..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/DEX.py +++ /dev/null @@ -1,39 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -DEX = { - "compile": [ - Dex2mpl( - dex2mpl="${OUT_ROOT}/target/product/maple_arm64/bin/dex2mpl", - option="--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O0/libcore-all.mplt -litprofile=/home/fuqun/maple3.0/out/target/product/maple_arm64/lib/codetricks/profile.pv/meta.list", - infile="${APP}.dex" - ), - Irbuild( - irbuild="${OUT_ROOT}/target/product/maple_arm64/bin/irbuild", - infile="${APP}.mpl" - ), - Mplverf( - mplverf="${OUT_ROOT}/target/product/maple_arm64/bin/mplverf", - infile="${APP}.mpl" - ), - Mplme( - mplme="${OUT_ROOT}/target/product/maple_arm64/bin/mplme", - option="-O2", - infile="${APP}.mpl" - ) - ], - "run": [] -} \ No newline at end of file diff --git a/testsuite/driver/src/mode/GCO0.py b/testsuite/driver/src/mode/GCO0.py deleted file mode 100644 index e8ec39d377fa7d937cb88f965283264f30a3c2ad..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/GCO0.py +++ /dev/null @@ -1,65 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -GCO0 = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-GCO0/libcore-all.mplt -anti-proguard-auto -dexcatch -gconly -gen-stringfieldvalue -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -j=32 -j100 -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -opt-switch-disable -refine-catch -staticstringcheck", - "me": "--quiet --gconly", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --maplelinker-nolocal --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --gen-pgo-report --gconly", - "mplcg": "--quiet --no-pie --fPIC --verbose-asm --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --gsrc --gconly" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-GCO0", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-GCO0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="GC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ) - ] -} diff --git a/testsuite/driver/src/mode/GCO0NATIVE.py b/testsuite/driver/src/mode/GCO0NATIVE.py deleted file mode 100644 index d0f748dcea65e45885615f81875a25c760a08628..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/GCO0NATIVE.py +++ /dev/null @@ -1,76 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -GCO0NATIVE = { - "compile": [ - NativeCompile( - mpldep=[ - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-GCO0", - "${OUT_ROOT}/target/product/public/lib/libnativehelper/include" - ], - infile="${NATIVE_SRC}", - model="arm64" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-GCO0/libcore-all.mplt -anti-proguard-auto -dexcatch -gconly -gen-stringfieldvalue -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -j=32 -j100 -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -opt-switch-disable -refine-catch -staticstringcheck", - "me": "--quiet --gconly", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --maplelinker-nolocal --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --gen-pgo-report --gconly", - "mplcg": "--quiet --no-pie --fPIC --verbose-asm --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --gsrc --gconly" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-GCO0", - model="arm64", - infile="${APP}", - ) - ], - "run": [ - Mplsh( - env={ - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-GCO0", - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="GC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ) - ] -} diff --git a/testsuite/driver/src/mode/GCO2.py b/testsuite/driver/src/mode/GCO2.py deleted file mode 100644 index a98c34d5947088614aa78c960189788be0293337..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/GCO2.py +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -GCO2 = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-GCO2/libcore-all.mplt -anti-proguard-auto -dexcatch -gconly -gen-stringfieldvalue -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -j=32 -j100 -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -opt-switch-disable -refine-catch -staticstringcheck", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea --gconly", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --gen-pgo-report --gconly", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --gconly" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-GCO2", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-GCO2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="GC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ) - ] -} diff --git a/testsuite/driver/src/mode/GCO2NATIVE.py b/testsuite/driver/src/mode/GCO2NATIVE.py deleted file mode 100644 index 7285ce51e1fcb1de7bdb825ad6880c4dca11fe8a..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/GCO2NATIVE.py +++ /dev/null @@ -1,77 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -GCO2NATIVE = { - "compile": [ - NativeCompile( - mpldep=[ - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-GCO2", - "${OUT_ROOT}/target/product/public/lib/libnativehelper/include" - ], - infile="${NATIVE_SRC}", - model="arm64" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-GCO2/libcore-all.mplt -anti-proguard-auto -dexcatch -gconly -gen-stringfieldvalue -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -j=32 -j100 -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -opt-switch-disable -refine-catch -staticstringcheck", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea --gconly", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --gen-pgo-report --gconly", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --gconly" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-GCO2", - model="arm64", - infile="${APP}", - ) - ], - "run": [ - Mplsh( - env={ - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-GCO2", - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="GC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ) - ] -} diff --git a/testsuite/driver/src/mode/GCONLY.py b/testsuite/driver/src/mode/GCONLY.py deleted file mode 100644 index 9a06ec9bc521c2648b7ec4eda0128f5bdd6772eb..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/GCONLY.py +++ /dev/null @@ -1,79 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * -from env_var import EnvVar - -GCONLY = { - "compile": [ - BenchmarkVogar(), - Shell( - "mv ${BENCHMARK_ACTION}/${BENCHMARK_ACTION}.dex.jar ${BENCHMARK_ACTION}/${BENCHMARK_ACTION}.jar;" - "if [ -d \"${BENCHMARK_ACTION}/dex\" ]; then" - " rm -rf ${BENCHMARK_ACTION}/dex;" - "fi;" - "unzip -q ${BENCHMARK_ACTION}/${BENCHMARK_ACTION}.jar -d ${BENCHMARK_ACTION}/dex" - ), - Maple( - maple="${MAPLE_ROOT}/../out/soong/host/linux-x86/bin/maple", - run=["dex2mpl"], - option={ - "dex2mpl": "-checktool -check-invoke -invoke-checklist=${MAPLE_ROOT}/mrt/codetricks/profile.pv/classloaderInvocation.list -check-incomplete -incomplete-whitelist=${MAPLE_ROOT}/mrt/codetricks/compile/incomplete.list -incomplete-detail -staticstringcheck --inlinefunclist=${MAPLE_ROOT}/mrt/codetricks/profile.pv/to_inline.list -dexcatch -litprofile=${MAPLE_ROOT}/mrt/codetricks/profile.pv/meta.list -gconly -output=${BENCHMARK_ACTION}/dex/ -mplt=${MAPLE_ROOT}/../out/soong/.intermediates/vendor/huawei/maple/Lib/core/libmaplecore-all/android_arm64_armv8-a_core_shared/obj/classes.mplt" - }, - global_option="", - infile="${BENCHMARK_ACTION}/dex/classes.dex" - ), - Maple( - maple="${MAPLE_ROOT}/../out/soong/host/linux-x86/bin/maple", - run=["mplipa"], - option={ - "mplipa": "--effectipa --quiet --inlinefunclist=${MAPLE_ROOT}/mrt/codetricks/profile.pv/inline_funcs.list" - }, - global_option="", - infile="${BENCHMARK_ACTION}/dex/classes.mpl > /dev/null" - ), - Maple( - maple="${MAPLE_ROOT}/../out/soong/host/linux-x86/bin/maple", - run=["me", "mpl2mpl", "mplcg"], - option={ - "me": "--inlinefunclist=${MAPLE_ROOT}/mrt/codetricks/profile.pv/inline_funcs.list -O2 --quiet --no-ignoreipa --gconly", - "mpl2mpl": "-regnativefunc --quiet -O2 --usewhiteclass --maplelinker --dump-muid --check_cl_invocation=${MAPLE_ROOT}/mrt/codetricks/profile.pv/classloaderInvocation.list --regnative-dynamic-only", - "mplcg": "-O2 --quiet --no-pie --nativeopt --verbose-asm --gen-c-macro-def --maplelinker --gsrc --duplicate_asm_list2=${MAPLE_ROOT}/mrt/compiler-rt/src/arch/arm64/fastFuncs.S --gconly --fPIC" - }, - global_option="--genVtableImpl", - infile="${BENCHMARK_ACTION}/dex/classes.mpl" - ), - Shell( - "${MAPLE_ROOT}/../prebuilts/clang/host/linux-x86/clang-r353983c/bin/clang -target aarch64-linux-android -g -c -x assembler-with-cpp -D__ASSEMBLY__ -DUSE_32BIT_REF -DGCONLY=1 -MD -MF ${BENCHMARK_ACTION}/dex/classes.d -o ${BENCHMARK_ACTION}/dex/classes.o ${BENCHMARK_ACTION}/dex/classes.VtableImpl.s" - ), - Shell( - "${MAPLE_ROOT}/../prebuilts/clang/host/linux-x86/clang-r353983c/bin/llvm-objcopy --rename-section .debug_info=.maple_java_debug_info --rename-section .debug_abbrev=.maple_java_debug_abbrev --rename-section .debug_line=.maple_java_debug_line --rename-section .debug_aranges=.maple_java_debug_aranges --rename-section .debug_ranges=.maple_java_debug_ranges ${BENCHMARK_ACTION}/dex/classes.o" - ), - Shell( - "${MAPLE_ROOT}/../prebuilts/clang/host/linux-x86/clang-r353983c/bin/clang++ -nostdlib -Wl,-soname,libmaple${BENCHMARK_ACTION}.so -Wl,--gc-sections -shared ${MAPLE_ROOT}/../out/soong/.intermediates/bionic/libc/crtbegin_so/android_arm64_armv8-a_core/crtbegin_so.o ${BENCHMARK_ACTION}/dex/classes.o -Wl,--whole-archive ${MAPLE_ROOT}/../out/target/product/generic_a15/obj/STATIC_LIBRARIES/mrt_module_init_intermediates/mrt_module_init.a -Wl,--no-whole-archive ${MAPLE_ROOT}/../out/target/product/generic_a15/obj/STATIC_LIBRARIES/libclang_rt.ubsan_minimal-aarch64-android_intermediates/libclang_rt.ubsan_minimal-aarch64-android.a ${MAPLE_ROOT}/../prebuilts/clang/host/linux-x86/clang-r353983c/lib64/clang/9.0.3/lib/linux//libclang_rt.builtins-aarch64-android.a ${MAPLE_ROOT}/../out/target/product/generic_a15/obj/STATIC_LIBRARIES/libatomic_intermediates/libatomic.a ${MAPLE_ROOT}/../out/target/product/generic_a15/obj/STATIC_LIBRARIES/libgcc_intermediates/libgcc.a -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--build-id=md5 -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--no-undefined-version -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libgcc_stripped.a -fuse-ld=lld -Wl,--hash-style=gnu -Wl,--icf=safe -Wl,-z,max-page-size=4096 -target aarch64-linux-android -B${MAPLE_ROOT}/../prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin -Wl,-T,${MAPLE_ROOT}/mrt/maplert/linker/maplelld.so.lds -Wl,-execute-only -Wl,--exclude-libs,libclang_rt.ubsan_minimal-aarch64-android.a -Wl,--no-undefined ${MAPLE_ROOT}/../out/target/product/generic_a15/obj/SHARED_LIBRARIES/libmaplecore-all_intermediates/libmaplecore-all.so ${MAPLE_ROOT}/../out/target/product/generic_a15/obj/SHARED_LIBRARIES/libmrt_intermediates/libmrt.so ${MAPLE_ROOT}/../out/target/product/generic_a15/obj/SHARED_LIBRARIES/libcommon_bridge_intermediates/libcommon_bridge.so ${MAPLE_ROOT}/../out/target/product/generic_a15/obj/SHARED_LIBRARIES/libc++_intermediates/libc++.so ${MAPLE_ROOT}/../out/target/product/generic_a15/obj/SHARED_LIBRARIES/libc_intermediates/libc.so ${MAPLE_ROOT}/../out/target/product/generic_a15/obj/SHARED_LIBRARIES/libm_intermediates/libm.so ${MAPLE_ROOT}/../out/target/product/generic_a15/obj/SHARED_LIBRARIES/libdl_intermediates/libdl.so -o ${BENCHMARK_ACTION}/dex/libmaple${BENCHMARK_ACTION}Symbol.so ${MAPLE_ROOT}/../out/soong/.intermediates/bionic/libc/crtend_so/android_arm64_armv8-a_core/obj/bionic/libc/arch-common/bionic/crtend_so.o" - ), - Shell( - "CLANG_BIN=${MAPLE_ROOT}/../prebuilts/clang/host/linux-x86/clang-r353983c/bin CROSS_COMPILE=${MAPLE_ROOT}/../prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android- XZ=${MAPLE_ROOT}/../prebuilts/build-tools/linux-x86/bin/xz ${MAPLE_ROOT}/../build/soong/scripts/strip.sh -i ${BENCHMARK_ACTION}/dex/libmaple${BENCHMARK_ACTION}Symbol.so -o ${BENCHMARK_ACTION}/dex/libmaple${BENCHMARK_ACTION}.so -d ${BENCHMARK_ACTION}/dex/libmaple${BENCHMARK_ACTION}.so.d --keep-mini-debug-info" - ), - Shell( - "(${MAPLE_ROOT}/../prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-readelf -d ${BENCHMARK_ACTION}/dex/libmaple${BENCHMARK_ACTION}.so | grep SONAME || echo \"No SONAME for ${BENCHMARK_ACTION}/dex/libmaple${BENCHMARK_ACTION}.so\") > ${BENCHMARK_ACTION}/dex/libmaple${BENCHMARK_ACTION}.so.toc.tmp;" - "${MAPLE_ROOT}/../prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-readelf --dyn-syms ${BENCHMARK_ACTION}/dex/libmaple${BENCHMARK_ACTION}.so | awk '{$2=\"\"; $3=\"\"; print}' >> ${BENCHMARK_ACTION}/dex/libmaple${BENCHMARK_ACTION}.so.toc.tmp;" - "mv ${BENCHMARK_ACTION}/dex/libmaple${BENCHMARK_ACTION}.so.toc.tmp ${BENCHMARK_ACTION}/dex/libmaple${BENCHMARK_ACTION}.so.toc;" - "cp ${BENCHMARK_ACTION}/dex/libmaple${BENCHMARK_ACTION}.so ${BENCHMARK_ACTION}" - ), - ], - "native_compile": [ - BenchmarkNative() - ] -} diff --git a/testsuite/driver/src/mode/GC_IFILE.py b/testsuite/driver/src/mode/GC_IFILE.py deleted file mode 100644 index 3968771ed853e699190e28d414a1f7b26f9691ce..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/GC_IFILE.py +++ /dev/null @@ -1,61 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -GC_IFILE = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_IFILE/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-GC_IFILE/libcore-all.mplt -dexcatch -gconly -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -j=16 -j100 -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -refine-catch -staticstringcheck", - "mplipa": "--effectipa --quiet", - "me": "--O2 --threads=4 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea --gconly", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl --gconly", - "mplcg": "--O2 --quiet --threads=4 --no-pie --verbose-asm --gen-c-macro-def --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/maple_arm64-clang-release/lib/codetricks/arch/arm64/duplicateFunc.s --nativeopt --fPIC --filetype=obj --no-proepilogue --no-prelsra --no-const-fold --gconly" - }, - global_option="--save-temps --ifile --aot", - infile="${APP}.dex" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-GC_IFILE", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="GC", - xbootclasspath="libcore-all.ohex", - infile="${APP}.ohex", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ) - ] -} diff --git a/testsuite/driver/src/mode/GC_IFILE_NATIVE.py b/testsuite/driver/src/mode/GC_IFILE_NATIVE.py deleted file mode 100644 index a26247648ffa65bca0a8dd457f99c340c099e083..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/GC_IFILE_NATIVE.py +++ /dev/null @@ -1,72 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -GC_IFILE_NATIVE = { - "compile": [ - NativeCompile( - mpldep=[ - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-GC_IFILE", - "${OUT_ROOT}/target/product/public/lib/libnativehelper/include" - ], - infile="${NATIVE_SRC}", - model="arm64_ifile" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_IFILE/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-GC_IFILE/libcore-all.mplt -dexcatch -gconly -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -j=16 -j100 -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -refine-catch -staticstringcheck", - "mplipa": "--effectipa --quiet", - "me": "--O2 --threads=4 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea --gconly", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl --gconly", - "mplcg": "--O2 --quiet --threads=4 --no-pie --verbose-asm --gen-c-macro-def --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/maple_arm64-clang-release/lib/codetricks/arch/arm64/duplicateFunc.s --nativeopt --fPIC --filetype=obj --no-proepilogue --no-prelsra --no-const-fold --gconly" - }, - global_option="--save-temps --ifile --aot", - infile="${APP}.dex" - ) - ], - "run": [ - Mplsh( - env={ - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-GC_IFILE" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="GC", - xbootclasspath="libcore-all.ohex", - infile="${APP}.ohex", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ) - ] -} diff --git a/testsuite/driver/src/mode/HIR2MPL_COMMON_RC_IFILE.py b/testsuite/driver/src/mode/HIR2MPL_COMMON_RC_IFILE.py deleted file mode 100644 index d12907eed1a22d8d9e70c06823f5ab1c17348487..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/HIR2MPL_COMMON_RC_IFILE.py +++ /dev/null @@ -1,110 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -HIR2MPL_COMMON_RC_IFILE = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_HIR2MPL_RC_IFILE/maple", - run=["hir2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "-rc -mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_RC_IFILE/libcore-all.mplt", - "me": "--O2 --quiet --threads=4 --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--O2 --quiet --threads=4 --no-pie --verbose-asm --gen-c-macro-def --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/maple_arm64-clang-release/lib/codetricks/arch/arm64/duplicateFunc.s --nativeopt --fPIC --filetype=obj --with-ra-linear-scan --no-ico --no-cfgo --no-prepeep --no-peep --no-ebo --no-storeloadopt --no-globalopt --no-schedule --no-proepilogue --no-prelsra --no-const-fold" - }, - global_option="--save-temps --ifile --aot", - infile="${APP}.dex" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_RC_IFILE", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.ohex", - infile="${APP}.ohex", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_RC_IFILE", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.ohex", - infile="${APP}.ohex", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "MAPLE_VERIFY_RC": "1", - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_RC_IFILE", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - infile="${APP}.ohex", - xbootclasspath="libcore-all.ohex", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/HIR2MPL_COMMON_RC_IFILE_O0.py b/testsuite/driver/src/mode/HIR2MPL_COMMON_RC_IFILE_O0.py deleted file mode 100644 index 9fc85880e6aa46481f1b2a06b12845515d1a6bd2..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/HIR2MPL_COMMON_RC_IFILE_O0.py +++ /dev/null @@ -1,109 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# -from api import * - -HIR2MPL_COMMON_RC_IFILE_O0 = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_HIR2MPL_RC_IFILE_O0/maple", - run=["hir2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "-rc -mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_RC_IFILE_O0/libcore-all.mplt", - "me": "--quiet --enable-ea --aot", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--quiet --no-pie --verbose-asm --gen-c-macro-def --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/maple_arm64-clang-release/lib/codetricks/arch/arm64/duplicateFunc.s --nativeopt --fPIC --filetype=obj --no-proepilogue --no-prelsra --no-const-fold" - }, - global_option="--save-temps --ifile --aot", - infile="${APP}.dex" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_RC_IFILE_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.ohex", - infile="${APP}.ohex", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_RC_IFILE_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.ohex", - infile="${APP}.ohex", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "MAPLE_VERIFY_RC": "1", - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_RC_IFILE_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - infile="${APP}.ohex", - xbootclasspath="libcore-all.ohex", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/HIR2MPL_CSTO0.py b/testsuite/driver/src/mode/HIR2MPL_CSTO0.py deleted file mode 100644 index 0fe9e86be82c3e554c9876506a1a1a83b5b30b32..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/HIR2MPL_CSTO0.py +++ /dev/null @@ -1,68 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -HIR2MPL_CSTO0 = { - "compile": [ - Shell( - "cp ${OUT_ROOT}/target/product/public/lib/libcore-all.dex ." - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_HIR2MPL/maple", - run=["hir2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "", - "me": "--quiet --ignore-inferred-ret-type --gconly", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --maplelinker-nolocal", - "mplcg": "--quiet --no-pie --verbose-asm --gen-c-macro-def --gconly --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/arch/arm64/duplicateFunc.s --fPIC" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Shell( - "mv ${APP}.mpl serial_${APP}.mpl;" - "mv ${APP}.VtableImpl.mpl serial_${APP}.VtableImpl.mpl;" - "mv ${APP}.VtableImpl.s serial_${APP}.VtableImpl.s" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_HIR2MPL/maple", - run=["hir2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "--np 4", - "me": "--quiet --threads=4 --gconly", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --maplelinker-nolocal", - "mplcg": "--quiet --no-pie --verbose-asm --gen-c-macro-def --gconly --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/arch/arm64/duplicateFunc.s --fPIC" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Shell( - "mv ${APP}.mpl parallel_${APP}.mpl;" - "mv ${APP}.VtableImpl.mpl parallel_${APP}.VtableImpl.mpl;" - "mv ${APP}.VtableImpl.s parallel_${APP}.VtableImpl.s" - ) - ], - "check": [ - Shell( - "diff serial_${APP}.mpl parallel_${APP}.mpl" - ), - Shell( - "diff serial_${APP}.VtableImpl.mpl parallel_${APP}.VtableImpl.mpl" - ), - Shell( - "diff serial_${APP}.VtableImpl.s parallel_${APP}.VtableImpl.s" - ) - ] -} diff --git a/testsuite/driver/src/mode/HIR2MPL_CSTO2.py b/testsuite/driver/src/mode/HIR2MPL_CSTO2.py deleted file mode 100644 index 961a8777c0b49c0de149ddd1bc0d27f3f8220c8f..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/HIR2MPL_CSTO2.py +++ /dev/null @@ -1,68 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -HIR2MPL_CSTO2 = { - "compile": [ - Shell( - "cp ${OUT_ROOT}/target/product/public/lib/libcore-all.dex ." - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_HIR2MPL/maple", - run=["hir2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --ignore-inferred-ret-type --gconly --movinggc --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --gen-c-macro-def --gconly --movinggc --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/arch/arm64/duplicateFunc.s --fPIC" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Shell( - "mv ${APP}.mpl serial_${APP}.mpl;" - "mv ${APP}.VtableImpl.mpl serial_${APP}.VtableImpl.mpl;" - "mv ${APP}.VtableImpl.s serial_${APP}.VtableImpl.s" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_HIR2MPL/maple", - run=["hir2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "--np 4", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --threads=4 --gconly --movinggc --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --gen-c-macro-def --gconly --movinggc --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/arch/arm64/duplicateFunc.s --fPIC" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Shell( - "mv ${APP}.mpl parallel_${APP}.mpl;" - "mv ${APP}.VtableImpl.mpl parallel_${APP}.VtableImpl.mpl;" - "mv ${APP}.VtableImpl.s parallel_${APP}.VtableImpl.s" - ) - ], - "check": [ - Shell( - "diff serial_${APP}.mpl parallel_${APP}.mpl" - ), - Shell( - "diff serial_${APP}.VtableImpl.mpl parallel_${APP}.VtableImpl.mpl" - ), - Shell( - "diff serial_${APP}.VtableImpl.s parallel_${APP}.VtableImpl.s" - ) - ] -} diff --git a/testsuite/driver/src/mode/HIR2MPL_DEXO0.py b/testsuite/driver/src/mode/HIR2MPL_DEXO0.py deleted file mode 100644 index e2e47b7b839306430119b7ca4efa04349e104f7f..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/HIR2MPL_DEXO0.py +++ /dev/null @@ -1,65 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -HIR2MPL_DEXO0 = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_HIR2MPL/maple", - run=["hir2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO0/libcore-all.mplt", - "me": "--quiet --gconly", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --maplelinker-nolocal --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --gen-pgo-report --gconly", - "mplcg": "--quiet --no-pie --fPIC --verbose-asm --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --gsrc --gconly" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-HIR2MPL_DEXO0", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - xbootclasspath="libcore-all.so", - garbage_collection_kind="GC", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ) - ] -} diff --git a/testsuite/driver/src/mode/HIR2MPL_DEXO0_NATIVE.py b/testsuite/driver/src/mode/HIR2MPL_DEXO0_NATIVE.py deleted file mode 100644 index 1b44c5e94a16ac9c981e93538746fa1808116df2..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/HIR2MPL_DEXO0_NATIVE.py +++ /dev/null @@ -1,76 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -HIR2MPL_DEXO0_NATIVE = { - "compile": [ - NativeCompile( - mpldep=[ - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO0", - "${OUT_ROOT}/target/product/public/lib/libnativehelper/include" - ], - infile="${NATIVE_SRC}", - model="arm64" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_HIR2MPL/maple", - run=["hir2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO0/libcore-all.mplt", - "me": "--quiet --gconly", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --maplelinker-nolocal --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --gen-pgo-report --gconly", - "mplcg": "--quiet --no-pie --fPIC --verbose-asm --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --gsrc --gconly" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-HIR2MPL_DEXO0", - model="arm64", - infile="${APP}", - ) - ], - "run": [ - Mplsh( - env={ - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO0" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="GC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ) - ] -} diff --git a/testsuite/driver/src/mode/HIR2MPL_DEXO2.py b/testsuite/driver/src/mode/HIR2MPL_DEXO2.py deleted file mode 100644 index cf0106ccdea3a1ef3befe4af13aed24099f8403c..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/HIR2MPL_DEXO2.py +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -HIR2MPL_DEXO2 = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_HIR2MPL/maple", - run=["hir2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO2/libcore-all.mplt", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea --gconly", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --gen-pgo-report --gconly", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --gconly" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-HIR2MPL_DEXO2", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="GC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ) - ] -} diff --git a/testsuite/driver/src/mode/HIR2MPL_DEXO2_JCK.py b/testsuite/driver/src/mode/HIR2MPL_DEXO2_JCK.py deleted file mode 100644 index 08a0894b401870f62e57b95fb756203659cc6874..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/HIR2MPL_DEXO2_JCK.py +++ /dev/null @@ -1,67 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -HIR2MPL_DEXO2_JCK = { - "compile": [ - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="${APP}.jar" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_HIR2MPL/maple", - run=["hir2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO2/libcore-all.mplt", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea --threads=2 --gconly", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --inlineCache=1 --gen-pgo-report --gconly", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --gconly" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-HIR2MPL_DEXO2", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO2", - "../../lib", - ".", - "${OUT_ROOT}/target/product/public/lib" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="GC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - main="${MAIN}", - args="${ARGS}", - return_value_list=[95] - ) - ] -} diff --git a/testsuite/driver/src/mode/HIR2MPL_DEXO2_JTREG.py b/testsuite/driver/src/mode/HIR2MPL_DEXO2_JTREG.py deleted file mode 100644 index 488c3d306498ad5ca3d30f3149001652eb717a28..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/HIR2MPL_DEXO2_JTREG.py +++ /dev/null @@ -1,65 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -HIR2MPL_DEXO2_JTREG = { - "compile": [ - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="${APP}.jar" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_HIR2MPL/maple", - run=["hir2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO2/libcore-all.mplt", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea --threads=2 --gconly", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --inlineCache=1 --gen-pgo-report --gconly", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --gconly" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-HIR2MPL_DEXO2", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO2", - "." - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="GC", - xbootclasspath="libcore-all.so", - infile="${CLASSPATH}", - main="${MAIN}", - args="${ARGS}", - return_value_list=[0, 95] - ) - ] -} diff --git a/testsuite/driver/src/mode/HIR2MPL_DEXO2_NATIVE.py b/testsuite/driver/src/mode/HIR2MPL_DEXO2_NATIVE.py deleted file mode 100644 index 77284701401605f1af3c9a87e6a2a9a0c9177df0..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/HIR2MPL_DEXO2_NATIVE.py +++ /dev/null @@ -1,77 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -HIR2MPL_DEXO2_NATIVE = { - "compile": [ - NativeCompile( - mpldep=[ - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO2", - "${OUT_ROOT}/target/product/public/lib/libnativehelper/include" - ], - infile="${NATIVE_SRC}", - model="arm64" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_HIR2MPL/maple", - run=["hir2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO2/libcore-all.mplt", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea --gconly", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --gen-pgo-report --gconly", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --gconly" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-HIR2MPL_DEXO2", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - env={ - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO2" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="GC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ) - ] -} diff --git a/testsuite/driver/src/mode/HIR2MPL_DEXO2_RC.py b/testsuite/driver/src/mode/HIR2MPL_DEXO2_RC.py deleted file mode 100644 index 725ea71a7c707de4e29e6392c94a10607288b038..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/HIR2MPL_DEXO2_RC.py +++ /dev/null @@ -1,79 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -HIR2MPL_DEXO2_RC = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_HIR2MPL/maple", - run=["hir2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "-rc -mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO2_RC/libcore-all.mplt", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --nativeopt --replaceasm" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-HIR2MPL_DEXO2_RC", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1", - "PATTERN_FROM_BACKUP_TRACING": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO2_RC", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="cycle.log" - ), - CheckRegContain( - reg="ExpectResult", - file="cycle.log" - ), - CheckRegContain( - reg="Total Leak Count 0", - file="cycle.log" - ), - CheckRegContain( - choice="num", - reg="ExpectResult", - file="cycle.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/HIR2MPL_DEXO2_RC_COMMON.py b/testsuite/driver/src/mode/HIR2MPL_DEXO2_RC_COMMON.py deleted file mode 100644 index c43c52d24ee7d9d10589be00a784f263c61f469b..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/HIR2MPL_DEXO2_RC_COMMON.py +++ /dev/null @@ -1,116 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -HIR2MPL_DEXO2_RC_COMMON = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_HIR2MPL/maple", - run=["hir2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "-rc -mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO2_RC/libcore-all.mplt", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --nativeopt --replaceasm" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-HIR2MPL_DEXO2_RC", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO2_RC", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO2_RC", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "MAPLE_VERIFY_RC": "1", - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO2_RC", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - infile="${APP}.so", - xbootclasspath="libcore-all.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/HIR2MPL_DEXO2_RC_NATIVE.py b/testsuite/driver/src/mode/HIR2MPL_DEXO2_RC_NATIVE.py deleted file mode 100644 index 6a2f7f22fe794cb07bfb98dea9a5674e2403af29..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/HIR2MPL_DEXO2_RC_NATIVE.py +++ /dev/null @@ -1,129 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -HIR2MPL_DEXO2_RC_NATIVE = { - "compile": [ - NativeCompile( - mpldep=[ - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO2_RC", - "${OUT_ROOT}/target/product/public/lib/libnativehelper/include" - ], - infile="${NATIVE_SRC}", - model="arm64" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_HIR2MPL/maple", - run=["hir2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "--dump-comment --dump-LOC --rc --mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO2_RC/libcore-all.mplt", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --nativeopt --replaceasm" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-HIR2MPL_DEXO2_RC", - model="arm64", - infile="${APP}", - ) - ], - "run": [ - Mplsh( - env={ - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO2_RC" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO2_RC" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "MAPLE_VERIFY_RC": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO2_RC" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - infile="${APP}.so", - xbootclasspath="libcore-all.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/HIR2MPL_IFILE.py b/testsuite/driver/src/mode/HIR2MPL_IFILE.py deleted file mode 100644 index 488d88f060afe9ecf6a42d9f2621e6f824c437d0..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/HIR2MPL_IFILE.py +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -HIR2MPL_IFILE = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_HIR2MPL_IFILE/maple", - run=["hir2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_IFILE/libcore-all.mplt", - "me": "--gconly --O2 --quiet --threads=4 --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--gconly --O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--gconly --O2 --quiet --threads=4 --no-pie --verbose-asm --gen-c-macro-def --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/maple_arm64-clang-release/lib/codetricks/arch/arm64/duplicateFunc.s --nativeopt --fPIC --filetype=obj --with-ra-linear-scan --no-proepilogue --no-prelsra --no-const-fold" - }, - global_option="--save-temps --ifile --aot", - infile="${APP}.dex" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_IFILE", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="GC", - xbootclasspath="libcore-all.ohex", - infile="${APP}.ohex", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ) - ] -} diff --git a/testsuite/driver/src/mode/HIR2MPL_IFILE_NATIVE.py b/testsuite/driver/src/mode/HIR2MPL_IFILE_NATIVE.py deleted file mode 100644 index d923a4efc30dc2ee0f87b671a7d854fb714318c8..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/HIR2MPL_IFILE_NATIVE.py +++ /dev/null @@ -1,71 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -HIR2MPL_IFILE_NATIVE = { - "compile": [ - NativeCompile( - mpldep=[ - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_IFILE", - "${OUT_ROOT}/target/product/public/lib/libnativehelper/include" - ], - infile="${NATIVE_SRC}", - model="arm64_ifile" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_HIR2MPL_IFILE/maple", - run=["hir2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_IFILE/libcore-all.mplt", - "me": "--gconly --O2 --quiet --threads=4 --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--gconly --O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--gconly --O2 --quiet --threads=4 --no-pie --verbose-asm --gen-c-macro-def --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/maple_arm64-clang-release/lib/codetricks/arch/arm64/duplicateFunc.s --nativeopt --fPIC --filetype=obj --no-proepilogue --no-prelsra --no-const-fold" - }, - global_option="--save-temps --ifile --aot", - infile="${APP}.dex" - ) - ], - "run": [ - Mplsh( - env={ - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_IFILE", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="GC", - xbootclasspath="libcore-all.ohex", - infile="${APP}.ohex", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ) - ] -} diff --git a/testsuite/driver/src/mode/HIR2MPL_IFILE_O0.py b/testsuite/driver/src/mode/HIR2MPL_IFILE_O0.py deleted file mode 100644 index 14b71080826c62e56dd4ca629d40a191ccf3fe04..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/HIR2MPL_IFILE_O0.py +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -HIR2MPL_IFILE_O0 = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_HIR2MPL_IFILE_O0/maple", - run=["hir2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_IFILE_O0/libcore-all.mplt", - "me": "--gconly --quiet --enable-ea", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl --gconly", - "mplcg": "--quiet --no-pie --verbose-asm --gen-c-macro-def --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/maple_arm64-clang-release/lib/codetricks/arch/arm64/duplicateFunc.s --nativeopt --fPIC --filetype=obj --no-proepilogue --no-prelsra --no-const-fold --gconly" - }, - global_option="--save-temps --ifile --aot", - infile="${APP}.dex" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_IFILE_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="GC", - xbootclasspath="libcore-all.ohex", - infile="${APP}.ohex", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ) - ] -} diff --git a/testsuite/driver/src/mode/HIR2MPL_NATIVE_RC_IFILE.py b/testsuite/driver/src/mode/HIR2MPL_NATIVE_RC_IFILE.py deleted file mode 100644 index 420033c50ade805ebe719e5c011ad01a6319bea2..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/HIR2MPL_NATIVE_RC_IFILE.py +++ /dev/null @@ -1,123 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -HIR2MPL_NATIVE_RC_IFILE = { - "compile": [ - NativeCompile( - mpldep=[ - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_RC_IFILE", - "${OUT_ROOT}/target/product/public/lib/libnativehelper/include" - ], - infile="${NATIVE_SRC}", - model="arm64_ifile" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_HIR2MPL_RC_IFILE/maple", - run=["hir2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "--dump-comment --dump-LOC --rc --mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_RC_IFILE/libcore-all.mplt", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --gen-c-macro-def --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/maple_arm64-clang-release/lib/codetricks/arch/arm64/duplicateFunc.s --nativeopt --fPIC --filetype=obj --no-proepilogue --no-prelsra --no-const-fold" - }, - global_option="--save-temps --ifile --aot", - infile="${APP}.dex" - ) - ], - "run": [ - Mplsh( - env={ - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_RC_IFILE" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.ohex", - infile="${APP}.ohex", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_RC_IFILE" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.ohex", - infile="${APP}.ohex", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "MAPLE_VERIFY_RC": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_RC_IFILE" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - infile="${APP}.ohex", - xbootclasspath="libcore-all.ohex", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/HIR2MPL_NATIVE_RC_IFILEEH.py b/testsuite/driver/src/mode/HIR2MPL_NATIVE_RC_IFILEEH.py deleted file mode 100644 index 679575e0bd77e4067f6d0b51022c16ba377f816d..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/HIR2MPL_NATIVE_RC_IFILEEH.py +++ /dev/null @@ -1,71 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -HIR2MPL_NATIVE_RC_IFILEEH = { - "compile": [ - NativeCompile( - mpldep=[ - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_RC_IFILE", - "${OUT_ROOT}/target/product/public/lib/libnativehelper/include" - ], - infile="${NATIVE_SRC}", - model="arm64_ifile" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_HIR2MPL_RC_IFILE/maple", - run=["hir2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "--dump-comment --dump-LOC --rc --mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_RC_IFILE/libcore-all.mplt", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --gen-c-macro-def --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/maple_arm64-clang-release/lib/codetricks/arch/arm64/duplicateFunc.s --nativeopt --fPIC --filetype=obj --no-proepilogue --no-prelsra --no-const-fold" - }, - global_option="--save-temps --ifile --aot", - infile="${APP}.dex" - ) - ], - "run": [ - Mplsh( - env={ - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_RC_IFILE" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.ohex", - infile="${APP}.ohex", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ) - ] -} diff --git a/testsuite/driver/src/mode/HIR2MPL_PANDAO0.py b/testsuite/driver/src/mode/HIR2MPL_PANDAO0.py deleted file mode 100644 index 27c5a50bfe1a5983a102e572e0c1b278d5e93606..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/HIR2MPL_PANDAO0.py +++ /dev/null @@ -1,70 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -HIR2MPL_PANDAO0 = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java", "${EXTRA_JAVA_FILE}"] - ), - Class2panda( - class2panda="${OUT_ROOT}/target/product/public/bin/c2p", - infile=".", - outfile="${APP}.bin" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_HIR2MPL/maple", - run=["hir2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO0/libcore-all.mplt", - "me": "--quiet --gconly", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --maplelinker-nolocal --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --gen-pgo-report --gconly", - "mplcg": "--quiet --no-pie --fPIC --verbose-asm --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --gsrc --gconly" - }, - global_option="--save-temps", - infile="${APP}.bin" - ), - Linker( - lib="host-x86_64-HIR2MPL_DEXO0", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - xbootclasspath="libcore-all.so", - garbage_collection_kind="GC", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ) - ] -} diff --git a/testsuite/driver/src/mode/HIR2MPL_PANDAO0_NATIVE.py b/testsuite/driver/src/mode/HIR2MPL_PANDAO0_NATIVE.py deleted file mode 100644 index a6a16f9fe2a3d3fdecc03feb44fdfab620097b4b..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/HIR2MPL_PANDAO0_NATIVE.py +++ /dev/null @@ -1,81 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -HIR2MPL_PANDAO0_NATIVE = { - "compile": [ - NativeCompile( - mpldep=[ - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO0", - "${OUT_ROOT}/target/product/public/lib/libnativehelper/include" - ], - infile="${NATIVE_SRC}", - model="arm64" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Class2panda( - class2panda="${OUT_ROOT}/target/product/public/bin/c2p", - infile=".", - outfile="${APP}.bin" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_HIR2MPL/maple", - run=["hir2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO0/libcore-all.mplt", - "me": "--quiet --gconly", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --maplelinker-nolocal --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --gen-pgo-report --gconly", - "mplcg": "--quiet --no-pie --fPIC --verbose-asm --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --gsrc --gconly" - }, - global_option="--save-temps", - infile="${APP}.bin" - ), - Linker( - lib="host-x86_64-HIR2MPL_DEXO0", - model="arm64", - infile="${APP}", - ) - ], - "run": [ - Mplsh( - env={ - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO0" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="GC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ) - ] -} diff --git a/testsuite/driver/src/mode/HIR2MPL_PANDAO2.py b/testsuite/driver/src/mode/HIR2MPL_PANDAO2.py deleted file mode 100644 index 598468fd4bbd90fbba5f190e446ec707faa98ab2..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/HIR2MPL_PANDAO2.py +++ /dev/null @@ -1,71 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -HIR2MPL_PANDAO2 = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java", "${EXTRA_JAVA_FILE}"] - ), - Class2panda( - class2panda="${OUT_ROOT}/target/product/public/bin/c2p", - infile=".", - outfile="${APP}.bin" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_HIR2MPL/maple", - run=["hir2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO2/libcore-all.mplt", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea --gconly", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --gen-pgo-report --gconly", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --gconly" - }, - global_option="--save-temps", - infile="${APP}.bin" - ), - Linker( - lib="host-x86_64-HIR2MPL_DEXO2", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="GC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ) - ] -} diff --git a/testsuite/driver/src/mode/HIR2MPL_PANDAO2_JCK.py b/testsuite/driver/src/mode/HIR2MPL_PANDAO2_JCK.py deleted file mode 100644 index 7db6156cc2d525075aaf9a075e1e7b7e58fa17d1..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/HIR2MPL_PANDAO2_JCK.py +++ /dev/null @@ -1,56 +0,0 @@ -from api import * - -HIR2MPL_PANDAO2_JCK = { - "compile": [ - Unzip( - file="${APP}.jar", - target_path="${APP}" - ), - Class2panda( - class2panda="${OUT_ROOT}/target/product/public/bin/c2p", - infile="${APP}", - outfile="${APP}.bin" - ), - Shell( - "rm -rf ${APP}" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_HIR2MPL/maple", - run=["hir2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO2/libcore-all.mplt", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea --threads=2 --gconly", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --inlineCache=1 --gen-pgo-report --gconly", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --gconly" - }, - global_option="--save-temps", - infile="${APP}.bin" - ), - Linker( - lib="host-x86_64-HIR2MPL_DEXO2", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO2", - "../../lib", - ".", - "${OUT_ROOT}/target/product/public/lib" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="GC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - main="${MAIN}", - args="${ARGS}", - return_value_list=[95] - ) - ] -} diff --git a/testsuite/driver/src/mode/HIR2MPL_PANDAO2_JTREG.py b/testsuite/driver/src/mode/HIR2MPL_PANDAO2_JTREG.py deleted file mode 100644 index 2f053d6f3ea06e26f2d7b92036f8e38dead886d9..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/HIR2MPL_PANDAO2_JTREG.py +++ /dev/null @@ -1,68 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -HIR2MPL_PANDAO2_JTREG = { - "compile": [ - Unzip( - file="${APP}.jar", - target_path="${APP}" - ), - Class2panda( - class2panda="${OUT_ROOT}/target/product/public/bin/c2p", - infile="${APP}", - outfile="${APP}.bin" - ), - Shell( - "rm -rf ${APP}" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_HIR2MPL/maple", - run=["hir2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO2/libcore-all.mplt", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea --threads=2 --gconly", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --inlineCache=1 --gen-pgo-report --gconly", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --gconly" - }, - global_option="--save-temps", - infile="${APP}.bin" - ), - Linker( - lib="host-x86_64-HIR2MPL_DEXO2", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO2", - "." - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="GC", - xbootclasspath="libcore-all.so", - infile="${CLASSPATH}", - main="${MAIN}", - args="${ARGS}", - return_value_list=[0, 95] - ) - ] -} diff --git a/testsuite/driver/src/mode/HIR2MPL_PANDAO2_NATIVE.py b/testsuite/driver/src/mode/HIR2MPL_PANDAO2_NATIVE.py deleted file mode 100644 index 77141aef90efbed04d890c4c45426a55b8998805..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/HIR2MPL_PANDAO2_NATIVE.py +++ /dev/null @@ -1,82 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -HIR2MPL_PANDAO2_NATIVE = { - "compile": [ - NativeCompile( - mpldep=[ - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO2", - "${OUT_ROOT}/target/product/public/lib/libnativehelper/include" - ], - infile="${NATIVE_SRC}", - model="arm64" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Class2panda( - class2panda="${OUT_ROOT}/target/product/public/bin/c2p", - infile=".", - outfile="${APP}.bin" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_HIR2MPL/maple", - run=["hir2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO2/libcore-all.mplt", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea --gconly", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --gen-pgo-report --gconly", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --gconly" - }, - global_option="--save-temps", - infile="${APP}.bin" - ), - Linker( - lib="host-x86_64-HIR2MPL_DEXO2", - model="arm64", - infile="${APP}", - ) - ], - "run": [ - Mplsh( - env={ - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_DEXO2" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="GC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ) - ] -} diff --git a/testsuite/driver/src/mode/HIR2MPL_RC_IFILE.py b/testsuite/driver/src/mode/HIR2MPL_RC_IFILE.py deleted file mode 100644 index e9a0d1d4a825df140b45b3f4d492e1ddb636ffbd..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/HIR2MPL_RC_IFILE.py +++ /dev/null @@ -1,73 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -HIR2MPL_RC_IFILE = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_HIR2MPL_RC_IFILE/maple", - run=["hir2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "-rc -mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_RC_IFILE/libcore-all.mplt", - "me": "--O2 --quiet --threads=4 --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--O2 --quiet --threads=4 --no-pie --verbose-asm --gen-c-macro-def --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/maple_arm64-clang-release/lib/codetricks/arch/arm64/duplicateFunc.s --nativeopt --fPIC --filetype=obj --no-proepilogue --no-prelsra --no-const-fold" - }, - global_option="--save-temps --ifile --aot", - infile="${APP}.dex" - ) - ], - "run": [ - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1", - "PATTERN_FROM_BACKUP_TRACING": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_RC_IFILE", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.ohex", - infile="${APP}.ohex", - redirection="cycle.log" - ), - CheckRegContain( - reg="ExpectResult", - file="cycle.log" - ), - CheckRegContain( - reg="Total Leak Count 0", - file="cycle.log" - ), - CheckRegContain( - choice="num", - reg="ExpectResult", - file="cycle.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/HIR2MPL_RC_IFILE_O0.py b/testsuite/driver/src/mode/HIR2MPL_RC_IFILE_O0.py deleted file mode 100644 index b1a0b366efef174b076962ab8550c25ce81327dc..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/HIR2MPL_RC_IFILE_O0.py +++ /dev/null @@ -1,72 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# -from api import * - -HIR2MPL_RC_IFILE_O0 = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_HIR2MPL_RC_IFILE_O0/maple", - run=["hir2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "-rc -mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_RC_IFILE_O0/libcore-all.mplt", - "me": "--quiet --enable-ea --aot", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--quiet --no-pie --verbose-asm --gen-c-macro-def --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/maple_arm64-clang-release/lib/codetricks/arch/arm64/duplicateFunc.s --nativeopt --fPIC --filetype=obj --no-proepilogue --no-prelsra --no-const-fold" - }, - global_option="--save-temps --ifile --aot", - infile="${APP}.dex" - ) - ], - "run": [ - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1", - "PATTERN_FROM_BACKUP_TRACING": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_RC_IFILE_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.ohex", - infile="${APP}.ohex", - redirection="cycle.log" - ), - CheckRegContain( - reg="ExpectResult", - file="cycle.log" - ), - CheckRegContain( - reg="Total Leak Count 0", - file="cycle.log" - ), - CheckRegContain( - choice="num", - reg="ExpectResult", - file="cycle.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/IFILE.py b/testsuite/driver/src/mode/IFILE.py deleted file mode 100644 index b5c8965bff51b9f674185a2b8a613f786a18b38e..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/IFILE.py +++ /dev/null @@ -1,111 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -IFILE = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_IFILE/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-IFILE/libcore-all.mplt -dexcatch -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -j=16 -j100 -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -refine-catch -staticstringcheck", - "mplipa": "--effectipa --quiet", - "me": "--O2 --threads=4 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--O2 --threads=4 --quiet --no-pie --verbose-asm --gen-c-macro-def --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/maple_arm64-clang-release/lib/codetricks/arch/arm64/duplicateFunc.s --nativeopt --fPIC --filetype=obj --no-proepilogue --no-prelsra --no-const-fold" - }, - global_option="--save-temps --ifile --aot", - infile="${APP}.dex" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-IFILE", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.ohex", - infile="${APP}.ohex", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-IFILE", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.ohex", - infile="${APP}.ohex", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "MAPLE_VERIFY_RC": "1", - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-IFILE", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - infile="${APP}.ohex", - xbootclasspath="libcore-all.ohex", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/IFILENATIVE.py b/testsuite/driver/src/mode/IFILENATIVE.py deleted file mode 100644 index d492fb938e3ff6b3cee68af8e4de79d469aa820b..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/IFILENATIVE.py +++ /dev/null @@ -1,124 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -IFILENATIVE = { - "compile": [ - NativeCompile( - mpldep=[ - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-IFILE", - "${OUT_ROOT}/target/product/public/lib/libnativehelper/include" - ], - infile="${NATIVE_SRC}", - model="arm64_ifile" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_IFILE/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-IFILE/libcore-all.mplt -dexcatch -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -j=16 -j100 -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -refine-catch -staticstringcheck", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --gen-c-macro-def --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/maple_arm64-clang-release/lib/codetricks/arch/arm64/duplicateFunc.s --nativeopt --fPIC --filetype=obj --no-proepilogue --no-prelsra --no-const-fold" - }, - global_option="--save-temps --ifile --aot", - infile="${APP}.dex" - ) - ], - "run": [ - Mplsh( - env={ - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-IFILE" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.ohex", - infile="${APP}.ohex", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-IFILE" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.ohex", - infile="${APP}.ohex", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "MAPLE_VERIFY_RC": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-IFILE" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - infile="${APP}.ohex", - xbootclasspath="libcore-all.ohex", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/IFILENATIVEEH.py b/testsuite/driver/src/mode/IFILENATIVEEH.py deleted file mode 100644 index 9b4f97aa46d0c480297f1ec0a494b79dd9397d7d..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/IFILENATIVEEH.py +++ /dev/null @@ -1,72 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -IFILENATIVEEH = { - "compile": [ - NativeCompile( - mpldep=[ - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-IFILE", - "${OUT_ROOT}/target/product/public/lib/libnativehelper/include" - ], - infile="${NATIVE_SRC}", - model="arm64_ifile" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_IFILE/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-IFILE/libcore-all.mplt -dexcatch -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -refine-catch -staticstringcheck", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --gen-c-macro-def --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/maple_arm64-clang-release/lib/codetricks/arch/arm64/duplicateFunc.s --nativeopt --fPIC --filetype=obj --no-proepilogue --no-prelsra --no-const-fold" - }, - global_option="--save-temps --ifile --aot", - infile="${APP}.dex" - ) - ], - "run": [ - Mplsh( - env={ - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-IFILE" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.ohex", - infile="${APP}.ohex", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ) - ] -} diff --git a/testsuite/driver/src/mode/IR.py b/testsuite/driver/src/mode/IR.py deleted file mode 100644 index 3b2089b5d922a76b868966d8cdee0b5c41ae4985..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/IR.py +++ /dev/null @@ -1,32 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -IR = { - "compile": [ - Irbuild( - irbuild="${OUT_ROOT}/target/product/maple_arm64/bin/irbuild", - infile="${APP}.mpl" - ), - Irbuild( - irbuild="${OUT_ROOT}/target/product/maple_arm64/bin/irbuild", - infile="${APP}.irb.mpl" - ), - CheckFileEqual( - file1="${APP}.irb.mpl", - file2="${APP}.irb.irb.mpl" - ) - ] -} \ No newline at end of file diff --git a/testsuite/driver/src/mode/JASMJBC2MPL_LIBCORE.py b/testsuite/driver/src/mode/JASMJBC2MPL_LIBCORE.py deleted file mode 100644 index 9ac744fd9f085fd744e67de22d40983456b7207f..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/JASMJBC2MPL_LIBCORE.py +++ /dev/null @@ -1,130 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -JASMJBC2MPL_LIBCORE = { - "compile": [ - Shell( - "java -jar ${OUT_ROOT}/target/product/public/bin/asmtools.jar jasm *.jasm" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ), - Shell( - "jar -cvfe Main.jar Main *.class" - ), - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="Main.jar" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_JBC2MPL_LIBCORE/maple", - run=["jbc2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "jbc2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-JBC2MPL_LIBCORE/libcore-all.mplt -use-string-factory", - "me": "--quiet", - "mpl2mpl": "--quiet --regnativefunc --maplelinker", - "mplcg": "--quiet --no-pie --verbose-asm --maplelinker --fPIC" - }, - global_option="--save-temps --genVtableImpl", - infile="${APP}.jar" - ), - Linker( - lib="host-x86_64-JASMJBC2MPL_LIBCORE", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-JASMJBC2MPL_LIBCORE", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-JASMJBC2MPL_LIBCORE", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "MAPLE_VERIFY_RC": "1", - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-JASMJBC2MPL_LIBCORE", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} \ No newline at end of file diff --git a/testsuite/driver/src/mode/JASMO0.py b/testsuite/driver/src/mode/JASMO0.py deleted file mode 100644 index ce99eda667d4f4755004bf3b2ccd70460cbf4a78..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/JASMO0.py +++ /dev/null @@ -1,135 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -JASMO0 = { - "compile": [ - Shell( - "java -jar ${OUT_ROOT}/target/product/public/bin/asmtools.jar jasm *.jasm" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ), - Shell( - "jar -cvfe Main.jar Main *.class" - ), - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="Main.jar" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O0/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list", - "me": "", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --FastNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/fastNative.list --CriticalNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/criticalNative.list --nativefunc-property-list=${OUT_ROOT}/target/product/public/lib/codetricks/native_binding/native_func_property.list", - "mplcg": "--quiet --no-pie --verbose-asm --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/arch/arm64/duplicateFunc.s --fPIC" - }, - global_option="--save-temps --genVtableImpl", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-O0", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_VERIFY_RC": "1", - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/JASMO2.py b/testsuite/driver/src/mode/JASMO2.py deleted file mode 100644 index b739b5a356d0857774f4c4678ae48465f9accedc..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/JASMO2.py +++ /dev/null @@ -1,131 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -JASMO2 = { - "compile": [ - Shell( - "java -jar ${OUT_ROOT}/target/product/public/bin/asmtools.jar jasm *.jasm" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ), - Shell( - "jar -cvfe Main.jar Main *.class" - ), - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="Main.jar" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2/libcore-all.mplt -dexcatch -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -refine-catch -staticstringcheck", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --nativeopt --replaceasm" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-O2", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "MAPLE_VERIFY_RC": "1", - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/JASM_O0.py b/testsuite/driver/src/mode/JASM_O0.py deleted file mode 100644 index 8aaf58a66a9cd4dbea076520c4618db2a2a6a1f0..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/JASM_O0.py +++ /dev/null @@ -1,115 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -JASM_O0 = { - "compile": [ - Jasm2jar( - file=["${APP}.jasm", "../lib/Printer.jasm"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_OPS/maple", - run=["jbc2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "jbc2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O0/libcore-all.mplt -use-string-factory", - "me": "--quiet", - "mpl2mpl": "--quiet --regnativefunc --maplelinker", - "mplcg": "--quiet --no-pie --verbose-asm --maplelinker --fPIC" - }, - global_option="--save-temps --genVtableImpl", - infile="${APP}.jar" - ), - Linker( - lib="host-x86_64-OPS_O0", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_VERIFY_RC": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} \ No newline at end of file diff --git a/testsuite/driver/src/mode/JASM_O2.py b/testsuite/driver/src/mode/JASM_O2.py deleted file mode 100644 index 7e2eeee50a8fed040541fe7cdbcdbd27fb719607..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/JASM_O2.py +++ /dev/null @@ -1,110 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -JASM_O2 = { - "compile": [ - Jasm2jar( - file=["${APP}.jasm", "../lib/Printer.jasm"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_OPS/maple", - run=["jbc2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "jbc2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O2/libcore-all.mplt -use-string-factory", - "me": "-O2 --quiet", - "mpl2mpl": "-O2 --quiet --regnativefunc --no-nativeopt --maplelinker", - "mplcg": "--quiet -O2 --no-pie --verbose-asm --maplelinker --fPIC" - }, - global_option="--save-temps --genVtableImpl", - infile="${APP}.jar" - ), - Linker( - lib="host-x86_64-OPS_O2", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "MAPLE_VERIFY_RC": "1", - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} \ No newline at end of file diff --git a/testsuite/driver/src/mode/JBC2MPL_LIBCORE.py b/testsuite/driver/src/mode/JBC2MPL_LIBCORE.py deleted file mode 100644 index fd3d428e0d192d42070f5924e38f4a1ae8fe0fc4..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/JBC2MPL_LIBCORE.py +++ /dev/null @@ -1,120 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -JBC2MPL_LIBCORE = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_JBC2MPL_LIBCORE/maple", - run=["jbc2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "jbc2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-JBC2MPL_LIBCORE/libcore-all.mplt -use-string-factory", - "me": "--quiet", - "mpl2mpl": "--quiet --regnativefunc --maplelinker", - "mplcg": "--quiet --no-pie --verbose-asm --maplelinker --fPIC" - }, - global_option="--save-temps --genVtableImpl", - infile="${APP}.jar" - ), - Linker( - lib="host-x86_64-JBC2MPL_LIBCORE", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-JBC2MPL_LIBCORE", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-JBC2MPL_LIBCORE", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_VERIFY_RC": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-JBC2MPL_LIBCORE", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} \ No newline at end of file diff --git a/testsuite/driver/src/mode/JBC2MPL_LIBCORENATIVE.py b/testsuite/driver/src/mode/JBC2MPL_LIBCORENATIVE.py deleted file mode 100644 index ac71634421f55062bc3623ede1f21bac7c025c06..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/JBC2MPL_LIBCORENATIVE.py +++ /dev/null @@ -1,132 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -JBC2MPL_LIBCORENATIVE = { - "compile": [ - NativeCompile( - mpldep=[ - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-JBC2MPL_LIBCORE", - "${OUT_ROOT}/target/product/public/lib/libnativehelper/include" - ], - infile="${NATIVE_SRC}", - model="arm64" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_JBC2MPL_LIBCORE/maple", - run=["jbc2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "jbc2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-JBC2MPL_LIBCORE/libcore-all.mplt -use-string-factory", - "me": "--quiet", - "mpl2mpl": "--quiet --regnativefunc --maplelinker", - "mplcg": "--quiet --no-pie --verbose-asm --maplelinker --fPIC" - }, - global_option="--save-temps --genVtableImpl", - infile="${APP}.jar" - ), - Linker( - lib="host-x86_64-JBC2MPL_LIBCORE", - model="arm64", - infile="${APP}", - - ) - ], - "run": [ - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-JBC2MPL_LIBCORE" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_REPORT_RC_LEAK": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-JBC2MPL_LIBCORE" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_VERIFY_RC": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-JBC2MPL_LIBCORE" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} \ No newline at end of file diff --git a/testsuite/driver/src/mode/JBC2MPL_LIBCORERC.py b/testsuite/driver/src/mode/JBC2MPL_LIBCORERC.py deleted file mode 100644 index 99cbd80d1bb864e6473c9db801847e07e43d778b..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/JBC2MPL_LIBCORERC.py +++ /dev/null @@ -1,79 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -JBC2MPL_LIBCORERC = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_JBC2MPL_LIBCORE/maple", - run=["jbc2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "jbc2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-JBC2MPL_LIBCORE/libcore-all.mplt -use-string-factory", - "me": "--quiet", - "mpl2mpl": "--quiet --regnativefunc --maplelinker", - "mplcg": "--quiet --no-pie --verbose-asm --maplelinker --fPIC" - }, - global_option="--save-temps --genVtableImpl", - infile="${APP}.jar" - ), - Linker( - lib="host-x86_64-JBC2MPL_LIBCORE", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_REPORT_RC_LEAK": "1", - "PATTERN_FROM_BACKUP_TRACING": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-JBC2MPL_LIBCORE", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="cycle.log" - ), - CheckRegContain( - reg="ExpectResult", - file="cycle.log" - ), - CheckRegContain( - reg="Total Leak Count 0", - file="cycle.log" - ), - CheckRegContain( - choice="num", - reg="ExpectResult", - file="cycle.log" - ) - ] -} \ No newline at end of file diff --git a/testsuite/driver/src/mode/JBC_O0.py b/testsuite/driver/src/mode/JBC_O0.py deleted file mode 100644 index 7a9ba06036d6fe87d4caf8eaaad26d400949a7c8..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/JBC_O0.py +++ /dev/null @@ -1,120 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -JBC_O0 = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_OPS/maple", - run=["jbc2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "jbc2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O0/libcore-all.mplt -use-string-factory", - "me": "--quiet", - "mpl2mpl": "--quiet --regnativefunc --maplelinker", - "mplcg": "--quiet --no-pie --verbose-asm --maplelinker --fPIC" - }, - global_option="--save-temps --genVtableImpl", - infile="${APP}.jar" - ), - Linker( - lib="host-x86_64-OPS_O0", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_VERIFY_RC": "1", - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} \ No newline at end of file diff --git a/testsuite/driver/src/mode/JBC_O2.py b/testsuite/driver/src/mode/JBC_O2.py deleted file mode 100644 index 22a70e961a29e145d73235f5a03b6efe3c8b0416..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/JBC_O2.py +++ /dev/null @@ -1,115 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -JBC_O2 = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_OPS/maple", - run=["jbc2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "jbc2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O2/libcore-all.mplt -use-string-factory", - "me": "-O2 --quiet", - "mpl2mpl": "-O2 --quiet --regnativefunc --no-nativeopt --maplelinker", - "mplcg": "--quiet -O2 --no-pie --verbose-asm --maplelinker --fPIC" - }, - global_option="--save-temps --genVtableImpl", - infile="${APP}.jar" - ), - Linker( - lib="host-x86_64-OPS_O2", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "MAPLE_VERIFY_RC": "1", - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} \ No newline at end of file diff --git a/testsuite/driver/src/mode/JCK_AOT.py b/testsuite/driver/src/mode/JCK_AOT.py deleted file mode 100644 index 11cc888bbedac72ae805947a0cceef7dc30e3ba4..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/JCK_AOT.py +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -JCK_AOT = { - "compile": [ - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="${APP}.jar" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_AOT/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-AOT/libcore-all.mplt -dexcatch -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -refine-catch -staticstringcheck", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --nativeopt --replaceasm" - }, - global_option="--save-temps --aot", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-AOT", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-AOT", - "../../lib", - "." - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - main="${MAIN}", - args="${ARGS}", - return_value_list=[95] - ) - ] -} diff --git a/testsuite/driver/src/mode/JCK_DEOPT.py b/testsuite/driver/src/mode/JCK_DEOPT.py deleted file mode 100644 index 7d189362ace13088245a22b681a8bb8de0548885..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/JCK_DEOPT.py +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -JCK_DEOPT = { - "compile": [ - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="${APP}.jar" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64-clang-release/bin/bin_HIR2MPL_IFILE/maple", - run=["hir2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_IFILE/libcore-all.mplt", - "me": "--gconly --O2 --quiet --threads=4 --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--gconly --O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--gconly --O2 --quiet --threads=4 --no-pie --verbose-asm --gen-c-macro-def --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/maple_arm64-clang-release/lib/codetricks/arch/arm64/duplicateFunc.s --nativeopt --fPIC --filetype=obj --with-ra-linear-scan --no-ico --no-cfgo --no-prepeep --no-peep --no-ebo --no-storeloadopt --no-globalopt --no-schedule --no-proepilogue --no-prelsra --no-const-fold" - }, - global_option="--aot --deopt --ifile --save-temps", - infile="${APP}.dex" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_IFILE", - "../../lib", - "." - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="GC", - xbootclasspath="libcore-all.ohex", - infile="${APP}.ohex", - main="${MAIN}", - args="${ARGS}", - return_value_list=[95] - ) - ] -} diff --git a/testsuite/driver/src/mode/JCK_GCO2.py b/testsuite/driver/src/mode/JCK_GCO2.py deleted file mode 100644 index 7c8483b2c034a6626993883e7531a21295bb1245..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/JCK_GCO2.py +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -JCK_GCO2 = { - "compile": [ - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="${APP}.jar" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-GCO2/libcore-all.mplt -anti-proguard-auto -dexcatch -gen-stringfieldvalue -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -j100 -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -refine-catch -staticstringcheck -checktool -check-incomplete -incomplete-whitelist=${OUT_ROOT}/target/product/public/lib/codetricks/compile/incomplete.list -incomplete-detail -opt-switch-disable -incomplete-whitelist-auto -gconly", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea --threads=2 --gconly", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --inlineCache=1 --gen-pgo-report --gconly", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --gconly" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-GCO2", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-GCO2", - "../../lib", - "." - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="GC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - main="${MAIN}", - args="${ARGS}", - return_value_list=[95] - ) - ] -} diff --git a/testsuite/driver/src/mode/JCK_GC_IFILE.py b/testsuite/driver/src/mode/JCK_GC_IFILE.py deleted file mode 100644 index aaf1533bf6e71f214dfdd72b50c02822af5aa8c9..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/JCK_GC_IFILE.py +++ /dev/null @@ -1,61 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -JCK_GC_IFILE = { - "compile": [ - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="${APP}.jar" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_IFILE/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-GC_IFILE/libcore-all.mplt -dexcatch -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -j=16 -j100 -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -refine-catch -staticstringcheck -gconly", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --threads=4 --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea --gconly", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl --gconly", - "mplcg": "--O2 --quiet --threads=4 --no-pie --verbose-asm --gen-c-macro-def --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/maple_arm64-clang-release/lib/codetricks/arch/arm64/duplicateFunc.s --nativeopt --fPIC --filetype=obj --no-proepilogue --no-prelsra --no-const-fold --gconly" - }, - global_option="--aot --save-temps --ifile", - infile="${APP}.dex" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-GC_IFILE", - "../../lib", - "." - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="GC", - xbootclasspath="libcore-all.ohex", - infile="${APP}.ohex", - main="${MAIN}", - args="${ARGS}", - return_value_list=[95] - ) - ] -} diff --git a/testsuite/driver/src/mode/JCK_HIR2MPL_IFILE.py b/testsuite/driver/src/mode/JCK_HIR2MPL_IFILE.py deleted file mode 100644 index e3475919676eb0db59e85b48fb3bbffd2d03074f..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/JCK_HIR2MPL_IFILE.py +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -JCK_HIR2MPL_IFILE = { - "compile": [ - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="${APP}.jar" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64-clang-release/bin/bin_HIR2MPL_IFILE/maple", - run=["hir2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_IFILE/libcore-all.mplt", - "me": "--gconly --O2 --quiet --threads=4 --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--gconly --O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--gconly --O2 --quiet --threads=4 --no-pie --verbose-asm --gen-c-macro-def --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/maple_arm64-clang-release/lib/codetricks/arch/arm64/duplicateFunc.s --nativeopt --fPIC --filetype=obj --no-proepilogue --no-prelsra --no-const-fold" - }, - global_option="--aot --save-temps --ifile", - infile="${APP}.dex" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_IFILE", - "../../lib", - "." - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="GC", - xbootclasspath="libcore-all.ohex", - infile="${APP}.ohex", - main="${MAIN}", - args="${ARGS}", - return_value_list=[95] - ) - ] -} diff --git a/testsuite/driver/src/mode/JCK_HIR2MPL_IFILE_O0.py b/testsuite/driver/src/mode/JCK_HIR2MPL_IFILE_O0.py deleted file mode 100644 index 5612323dd6b7a23f206b8849c2e9e98b085f2c63..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/JCK_HIR2MPL_IFILE_O0.py +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -JCK_HIR2MPL_IFILE_O0 = { - "compile": [ - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="${APP}.jar" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64-clang-release/bin/bin_HIR2MPL_IFILE_O0/maple", - run=["hir2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_IFILE_O0/libcore-all.mplt", - "me": "--gconly --quiet --enable-ea", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl --gconly", - "mplcg": "--quiet --no-pie --verbose-asm --gen-c-macro-def --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/maple_arm64-clang-release/lib/codetricks/arch/arm64/duplicateFunc.s --nativeopt --fPIC --filetype=obj --no-proepilogue --no-prelsra --no-const-fold --gconly" - }, - global_option="--aot --save-temps --ifile", - infile="${APP}.dex" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_IFILE_O0", - "../../lib", - "." - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="GC", - xbootclasspath="libcore-all.ohex", - infile="${APP}.ohex", - main="${MAIN}", - args="${ARGS}", - return_value_list=[95] - ) - ] -} diff --git a/testsuite/driver/src/mode/JCK_HIR2MPL_RC_IFILE.py b/testsuite/driver/src/mode/JCK_HIR2MPL_RC_IFILE.py deleted file mode 100644 index 9ec39aadf2958678e143af5c1fec9d06f84af6e4..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/JCK_HIR2MPL_RC_IFILE.py +++ /dev/null @@ -1,61 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -JCK_HIR2MPL_RC_IFILE = { - "compile": [ - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="${APP}.jar" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_HIR2MPL_RC_IFILE/maple", - run=["hir2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "-rc -mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_RC_IFILE/libcore-all.mplt", - "me": "--O2 --quiet --threads=4 --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--O2 --quiet --threads=4 --no-pie --verbose-asm --gen-c-macro-def --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/maple_arm64-clang-release/lib/codetricks/arch/arm64/duplicateFunc.s --nativeopt --fPIC --filetype=obj --with-ra-linear-scan --no-ico --no-cfgo --no-prepeep --no-peep --no-ebo --no-storeloadopt --no-globalopt --no-schedule --no-proepilogue --no-prelsra --no-const-fold" - }, - global_option="--aot --save-temps --ifile", - infile="${APP}.dex" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_RC_IFILE", - "../../lib", - "." - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.ohex", - infile="${APP}.ohex", - main="${MAIN}", - args="${ARGS}", - return_value_list=[95] - ) - ] -} - diff --git a/testsuite/driver/src/mode/JCK_HIR2MPL_RC_IFILE_O0.py b/testsuite/driver/src/mode/JCK_HIR2MPL_RC_IFILE_O0.py deleted file mode 100644 index fc585054217441aecdcf0d54fc900d05b08606bc..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/JCK_HIR2MPL_RC_IFILE_O0.py +++ /dev/null @@ -1,61 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -JCK_HIR2MPL_RC_IFILE_O0 = { - "compile": [ - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="${APP}.jar" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_HIR2MPL_RC_IFILE_O0/maple", - run=["hir2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "hir2mpl": "-rc -mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_RC_IFILE_O0/libcore-all.mplt", - "me": "--quiet --enable-ea --aot", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--quiet --no-pie --verbose-asm --gen-c-macro-def --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/maple_arm64-clang-release/lib/codetricks/arch/arm64/duplicateFunc.s --nativeopt --fPIC --filetype=obj --no-proepilogue --no-prelsra --no-const-fold" - }, - global_option="--aot --save-temps --ifile", - infile="${APP}.dex" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-HIR2MPL_RC_IFILE_O0", - "../../lib", - "." - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.ohex", - infile="${APP}.ohex", - main="${MAIN}", - args="${ARGS}", - return_value_list=[95] - ) - ] -} - diff --git a/testsuite/driver/src/mode/JCK_IFILE.py b/testsuite/driver/src/mode/JCK_IFILE.py deleted file mode 100644 index 0899e54165e49c5d52f7519b72a61790caa2e15b..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/JCK_IFILE.py +++ /dev/null @@ -1,61 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -JCK_IFILE = { - "compile": [ - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="${APP}.jar" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64-clang-release/bin/bin_IFILE/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-IFILE/libcore-all.mplt -dexcatch -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -j=16 -j100 -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -refine-catch -staticstringcheck", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --threads=4 --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--O2 --quiet --threads=4 --no-pie --verbose-asm --gen-c-macro-def --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/maple_arm64-clang-release/lib/codetricks/arch/arm64/duplicateFunc.s --nativeopt --fPIC --filetype=obj --no-proepilogue --no-prelsra --no-const-fold" - }, - global_option="--aot --save-temps --ifile", - infile="${APP}.dex" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-IFILE", - "../../lib", - "." - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.ohex", - infile="${APP}.ohex", - main="${MAIN}", - args="${ARGS}", - return_value_list=[95] - ) - ] -} diff --git a/testsuite/driver/src/mode/JCK_MOVO2.py b/testsuite/driver/src/mode/JCK_MOVO2.py deleted file mode 100644 index 4c076f213edc15f8c2351b19cb85f7297b8954a8..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/JCK_MOVO2.py +++ /dev/null @@ -1,64 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -JCK_MOVO2 = { - "compile": [ - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="${APP}.jar" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-MOVO2/libcore-all.mplt -anti-proguard-auto -dexcatch -gen-stringfieldvalue -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -j100 -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -refine-catch -staticstringcheck -checktool -check-incomplete -incomplete-whitelist=${OUT_ROOT}/target/product/public/lib/codetricks/compile/incomplete.list -incomplete-detail -opt-switch-disable -incomplete-whitelist-auto -gconly", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea --threads=2 --gconly --movinggc", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --inlineCache=1 --gen-pgo-report --gconly --movinggc", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --gconly --movinggc" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - QemuLinkerArm64( - lib="host-x86_64-MOVO2" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-MOVO2", - "../../lib", - "." - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="GC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - main="${MAIN}", - args="${ARGS}", - return_value_list=[95] - ) - ] -} diff --git a/testsuite/driver/src/mode/JCK_O2.py b/testsuite/driver/src/mode/JCK_O2.py deleted file mode 100644 index 60a128f241f88d75e5bb2f2ddfbcd6cedca5e1bc..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/JCK_O2.py +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -JCK_O2 = { - "compile": [ - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="${APP}.jar" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2/libcore-all.mplt -dexcatch -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -refine-catch -staticstringcheck", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --nativeopt --replaceasm" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-O2", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2", - "../../lib", - "." - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - main="${MAIN}", - args="${ARGS}", - return_value_list=[95] - ) - ] -} diff --git a/testsuite/driver/src/mode/JCK_TGCO2.py b/testsuite/driver/src/mode/JCK_TGCO2.py deleted file mode 100644 index a188999ca16617eb0a570a6b91eda050085b5893..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/JCK_TGCO2.py +++ /dev/null @@ -1,58 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -JCK_TGCO2 = { - "compile": [ - Shell( - "adb shell \"mkdir -p /data/maple/${CASE}/${OPT}\"" - ), - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="${APP}.jar" - ), - Shell( - "adb push ${APP}.dex /data/maple/${CASE}/${OPT}/" - ), - Shell( - "adb shell \"/data/maple/maple -O2 --gconly --save-temps --hir2mpl-opt=\\\"-Xbootclasspath /apex/com.android.runtime/javalib/core-oj.jar,/apex/com.android.runtime/javalib/core-libart.jar\\\" --mplcg-opt=\\\"--no-ebo --no-cfgo --no-schedule\\\" --infile /data/maple/${CASE}/${OPT}/${APP}.dex\"" - ), - Shell( - "adb pull /data/maple/${CASE}/${OPT}/${APP}.VtableImpl.s ./" - ), - Shell( - "${MAPLE_ROOT}/zeiss/prebuilt/sdk/android-ndk-r20b/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android29-clang++ -O2 -x assembler-with-cpp -march=armv8-a -DUSE_32BIT_REF -c ${APP}.VtableImpl.s" - ), - Shell( - "${MAPLE_ROOT}/zeiss/prebuilt/sdk/android-ndk-r20b/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android29-clang++ ${APP}.VtableImpl.o -O2 -Wall -Werror -Wno-unused-command-line-argument -fstack-protector-strong -std=c++14 -nostdlibinc -march=armv8-a -fPIC -shared ${MAPLE_ROOT}/out/target/product/maple_arm64/lib/mrt_module_init.cpp -fuse-ld=lld -rdynamic -L${MAPLE_ROOT}/out/target/product/maple_arm64/lib/android -lmaplecore-all -lcommon_bridge -lc++ -lc -lm -ldl -Wl,-T${MAPLE_ROOT}/out/target/product/public/lib/linker/maplelld.so.lds -o ./${APP}.so" - ), - Shell( - "adb push ${APP}.so /data/maple/${CASE}/${OPT}/" - ) - ], - "run": [ - Shell( - "adb shell \"export LD_LIBRARY_PATH=/vendor/lib64:/system/lib64:/data/maple;mplsh -Xgconly -cp /data/maple/${CASE}/${OPT}/${APP}.so ${MAIN} ${ARGS}\" || [ $? -eq 95 ]" - ), - Shell( - "adb shell \"rm -rf /data/maple/${CASE}/${OPT}\"" - ) - ] -} \ No newline at end of file diff --git a/testsuite/driver/src/mode/JCK_ZTERP.py b/testsuite/driver/src/mode/JCK_ZTERP.py deleted file mode 100644 index f0aa2cc0b17d6eb2d47b649dc626eb2bd5df07b7..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/JCK_ZTERP.py +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -JCK_ZTERP = { - "compile": [ - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="${APP}.jar" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP", - "../../lib", - "." - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="GC", - xbootclasspath="libcore-all.so", - infile="${APP}.dex", - main="${MAIN}", - args="${ARGS}", - return_value_list=[95] - ) - ] -} \ No newline at end of file diff --git a/testsuite/driver/src/mode/JCOD_O0.py b/testsuite/driver/src/mode/JCOD_O0.py deleted file mode 100644 index 6b2915f2eb73fc075d71310fda624f8c608e121c..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/JCOD_O0.py +++ /dev/null @@ -1,115 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -JCOD_O0 = { - "compile": [ - Jcod2jar( - file=["${APP}.jcod"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_OPS/maple", - run=["jbc2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "jbc2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O0/libcore-all.mplt -use-string-factory", - "me": "--quiet", - "mpl2mpl": "--quiet --regnativefunc --maplelinker", - "mplcg": "--quiet --no-pie --verbose-asm --maplelinker --fPIC" - }, - global_option="--save-temps --genVtableImpl", - infile="${APP}.jar" - ), - Linker( - lib="host-x86_64-OPS_O0", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_VERIFY_RC": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} \ No newline at end of file diff --git a/testsuite/driver/src/mode/JCOD_O2.py b/testsuite/driver/src/mode/JCOD_O2.py deleted file mode 100644 index d61868b8d0307e026954a10e354fac0c237ab6b1..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/JCOD_O2.py +++ /dev/null @@ -1,110 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -JCOD_O2 = { - "compile": [ - Jcod2jar( - file=["${APP}.jcod"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_OPS/maple", - run=["jbc2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "jbc2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O2/libcore-all.mplt -use-string-factory", - "me": "-O2 --quiet", - "mpl2mpl": "-O2 --quiet --regnativefunc --no-nativeopt --maplelinker", - "mplcg": "--quiet -O2 --no-pie --verbose-asm --maplelinker --fPIC" - }, - global_option="--save-temps --genVtableImpl", - infile="${APP}.jar" - ), - Linker( - lib="host-x86_64-OPS_O2", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "MAPLE_VERIFY_RC": "1", - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} \ No newline at end of file diff --git a/testsuite/driver/src/mode/JTREG_GCO2.py b/testsuite/driver/src/mode/JTREG_GCO2.py deleted file mode 100644 index e6c3fda76c150309bb70474a9563f3f8e51d3b6f..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/JTREG_GCO2.py +++ /dev/null @@ -1,65 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -JTREG_GCO2 = { - "compile": [ - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="${APP}.jar" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-GCO2/libcore-all.mplt -anti-proguard-auto -dexcatch -gen-stringfieldvalue -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -j100 -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -refine-catch -staticstringcheck -checktool -check-incomplete -incomplete-whitelist=${OUT_ROOT}/target/product/public/lib/codetricks/compile/incomplete.list -incomplete-detail -opt-switch-disable -incomplete-whitelist-auto -gconly", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea --threads=2 --gconly", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --inlineCache=1 --gen-pgo-report --gconly", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --gconly" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-GCO2", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-GCO2", - "." - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="GC", - xbootclasspath="libcore-all.so", - infile="${CLASSPATH}", - main="${MAIN}", - args="${ARGS}", - return_value_list=[0, 95] - ) - ] -} diff --git a/testsuite/driver/src/mode/JTREG_MOVO2.py b/testsuite/driver/src/mode/JTREG_MOVO2.py deleted file mode 100644 index 336d5c4d4774f0fc66946c9d8f1826cfdc9d7201..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/JTREG_MOVO2.py +++ /dev/null @@ -1,63 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -JTREG_MOVO2 = { - "compile": [ - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="${APP}.jar" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-MOVO2/libcore-all.mplt -anti-proguard-auto -dexcatch -gen-stringfieldvalue -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -j100 -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -refine-catch -staticstringcheck -checktool -check-incomplete -incomplete-whitelist=${OUT_ROOT}/target/product/public/lib/codetricks/compile/incomplete.list -incomplete-detail -opt-switch-disable -incomplete-whitelist-auto -gconly", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea --threads=2 --gconly --movinggc", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --inlineCache=1 --gen-pgo-report --gconly --movinggc", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --gconly --movinggc" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - QemuLinkerArm64( - lib="host-x86_64-MOVO2" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-MOVO2", - "." - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="GC", - xbootclasspath="libcore-all.so", - infile="${CLASSPATH}", - main="${MAIN}", - args="${ARGS}", - return_value_list=[0, 95] - ) - ] -} diff --git a/testsuite/driver/src/mode/JTREG_O2.py b/testsuite/driver/src/mode/JTREG_O2.py deleted file mode 100644 index 2c44a5662416de47b93842cf6a898f0d655b3bda..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/JTREG_O2.py +++ /dev/null @@ -1,65 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -JTREG_O2 = { - "compile": [ - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="${APP}.jar" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2/libcore-all.mplt -dexcatch -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -refine-catch -staticstringcheck", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --nativeopt --replaceasm" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-O2", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2", - "." - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${CLASSPATH}", - main="${MAIN}", - args="${ARGS}", - return_value_list=[0, 95] - ) - ] -} diff --git a/testsuite/driver/src/mode/JTREG_TGCO2.py b/testsuite/driver/src/mode/JTREG_TGCO2.py deleted file mode 100644 index 179e59cb791c13e7e81d593c913fbc75b8708719..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/JTREG_TGCO2.py +++ /dev/null @@ -1,58 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -JTREG_TGCO2 = { - "compile": [ - Shell( - "adb shell \"mkdir -p /data/maple/${CASE}/${OPT}\"" - ), - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="${APP}.jar" - ), - Shell( - "adb push ${APP}.dex /data/maple/${CASE}/${OPT}/" - ), - Shell( - "adb shell \"/data/maple/maple -O2 --gconly --save-temps --hir2mpl-opt=\\\"-Xbootclasspath /apex/com.android.runtime/javalib/core-oj.jar,/apex/com.android.runtime/javalib/core-libart.jar\\\" --mplcg-opt=\\\"--no-ebo --no-cfgo --no-schedule\\\" --infile /data/maple/${CASE}/${OPT}/${APP}.dex\"" - ), - Shell( - "adb pull /data/maple/${CASE}/${OPT}/${APP}.VtableImpl.s ./" - ), - Shell( - "${MAPLE_ROOT}/zeiss/prebuilt/sdk/android-ndk-r20b/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android29-clang++ -O2 -x assembler-with-cpp -march=armv8-a -DUSE_32BIT_REF -c ${APP}.VtableImpl.s" - ), - Shell( - "${MAPLE_ROOT}/zeiss/prebuilt/sdk/android-ndk-r20b/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android29-clang++ ${APP}.VtableImpl.o -O2 -Wall -Werror -Wno-unused-command-line-argument -fstack-protector-strong -std=c++14 -nostdlibinc -march=armv8-a -fPIC -shared ${MAPLE_ROOT}/out/target/product/maple_arm64/lib/mrt_module_init.cpp -fuse-ld=lld -rdynamic -L${MAPLE_ROOT}/out/target/product/maple_arm64/lib/android -lmaplecore-all -lcommon_bridge -lc++ -lc -lm -ldl -Wl,-T${MAPLE_ROOT}/out/target/product/public/lib/linker/maplelld.so.lds -o ./${APP}.so" - ), - Shell( - "adb push ${APP}.so /data/maple/${CASE}/${OPT}/" - ) - ], - "run": [ - Shell( - "adb shell \"export LD_LIBRARY_PATH=/vendor/lib64:/system/lib64:/data/maple;mplsh -Xgconly -cp /data/maple/${CASE}/${OPT}/${CLASSPATH} ${MAIN} ${ARGS}\" || [ $? -eq 95 ]" - ), - Shell( - "adb shell \"rm -rf /data/maple/${CASE}/${OPT}\"" - ) - ] -} \ No newline at end of file diff --git a/testsuite/driver/src/mode/JTREG_ZTERP.py b/testsuite/driver/src/mode/JTREG_ZTERP.py deleted file mode 100644 index f3fdc897e2f382585a00286bc0fcd985cdebdebb..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/JTREG_ZTERP.py +++ /dev/null @@ -1,47 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -JTREG_ZTERP = { - "compile": [ - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="${APP}.jar" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP", - "." - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="GC", - xbootclasspath="libcore-all.so", - infile="${CLASSPATH}", - main="${MAIN}", - args="${ARGS}", - return_value_list=[0, 95] - ) - ] -} \ No newline at end of file diff --git a/testsuite/driver/src/mode/MAPLETI_ZTERP.py b/testsuite/driver/src/mode/MAPLETI_ZTERP.py deleted file mode 100644 index 092904adb70696c56b414a4a88d415cb943aaf5e..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/MAPLETI_ZTERP.py +++ /dev/null @@ -1,130 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -MAPLETI_ZTERP = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${ZTERPAPP}.dex", - infile=["${ZTERPAPP}.java"], - usesimplejava=True - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP/libcore-all.mplt -dexcatch -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -j=16 -j100 -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -refine-catch -staticstringcheck", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --nativeopt --replaceasm" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-ZTERP", - model="arm64_mapleti", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - env={ - "USE_ZTERP": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh -agentpath:${MAPLE_ROOT}/out/target/product/maple_arm64-clang-release/lib/host-x86_64-ZTERP/dummy-agent.so -pluginpath:${MAPLE_ROOT}/out/target/product/maple_arm64-clang-release/lib/host-x86_64-ZTERP/mapleti.so", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so ", - infile="./MapleTiTest.dex:./MapleCode.so", #${CP}", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "USE_ZTERP": "true", - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh -agentpath:${MAPLE_ROOT}/out/target/product/maple_arm64-clang-release/lib/host-x86_64-ZTERP/dummy-agent.so -pluginpath:${MAPLE_ROOT}/out/target/product/maple_arm64-clang-release/lib/host-x86_64-ZTERP/mapleti.so", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="./MapleTiTest.dex:./MapleCode.so", #${CP}", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "USE_ZTERP": "true", - "MAPLE_VERIFY_RC": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh -agentpath:${MAPLE_ROOT}/out/target/product/maple_arm64-clang-release/lib/host-x86_64-ZTERP/dummy-agent.so -pluginpath:${MAPLE_ROOT}/out/target/product/maple_arm64-clang-release/lib/host-x86_64-ZTERP/mapleti.so", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so ", - infile="./MapleTiTest.dex:./MapleCode.so", #${CP}", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/MAPLETI_ZTERP_PANDA.py b/testsuite/driver/src/mode/MAPLETI_ZTERP_PANDA.py deleted file mode 100644 index 6b4cec348a60decef5bf369e3d73f254a94ada7b..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/MAPLETI_ZTERP_PANDA.py +++ /dev/null @@ -1,135 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -MAPLETI_ZTERP_PANDA = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${ZTERPAPP}.dex", - infile=["${ZTERPAPP}.java"], - usesimplejava=True - ), - Class2panda( - class2panda="${OUT_ROOT}/target/product/public/bin/c2p", - infile="${ZTERPAPP}.class", - outfile="${ZTERPAPP}.bin" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP/libcore-all.mplt -dexcatch -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -j=16 -j100 -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -refine-catch -staticstringcheck", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --nativeopt --replaceasm" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-ZTERP", - model="arm64_mapleti", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - env={ - "USE_ZTERP": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh -agentpath:${MAPLE_ROOT}/out/target/product/maple_arm64-clang-release/lib/host-x86_64-ZTERP/dummy-agent.so -pluginpath:${MAPLE_ROOT}/out/target/product/maple_arm64-clang-release/lib/host-x86_64-ZTERP/mapleti.so", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so ", - infile="./MapleTiTest.bin:./MapleCode.so", #${CP}", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "USE_ZTERP": "true", - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh -agentpath:${MAPLE_ROOT}/out/target/product/maple_arm64-clang-release/lib/host-x86_64-ZTERP/dummy-agent.so -pluginpath:${MAPLE_ROOT}/out/target/product/maple_arm64-clang-release/lib/host-x86_64-ZTERP/mapleti.so", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="./MapleTiTest.bin:./MapleCode.so", #${CP}", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "USE_ZTERP": "true", - "MAPLE_VERIFY_RC": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh -agentpath:${MAPLE_ROOT}/out/target/product/maple_arm64-clang-release/lib/host-x86_64-ZTERP/dummy-agent.so -pluginpath:${MAPLE_ROOT}/out/target/product/maple_arm64-clang-release/lib/host-x86_64-ZTERP/mapleti.so", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so ", - infile="./MapleTiTest.bin:./MapleCode.so", #${CP}", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/MEMORY_CHECK.py b/testsuite/driver/src/mode/MEMORY_CHECK.py deleted file mode 100644 index c38f51f1d33cd5390b115286eb8bb774dc67541f..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/MEMORY_CHECK.py +++ /dev/null @@ -1,55 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -MEMORY_CHECK = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ), - Maple( - maple="valgrind ${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2/libcore-all.mplt -dexcatch -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -j=16 -j100 -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -refine-catch -staticstringcheck", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --nativeopt --replaceasm" - }, - global_option="--save-temps", - infile="${APP}.dex", - redirection="output.log" - ), - CheckRegContain( - reg="definitely lost: 0 bytes in 0 blocks", - file="output.log" - ), - CheckRegContain( - reg="indirectly lost: 0 bytes in 0 blocks", - file="output.log" - ), - CheckRegContain( - reg="possibly lost: 0 bytes in 0 blocks", - file="output.log" - ), - ], - "run": [] -} diff --git a/testsuite/driver/src/mode/MOVO2.py b/testsuite/driver/src/mode/MOVO2.py deleted file mode 100644 index c75c5e035ef9c28e09137d86fcd44af6636e6c57..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/MOVO2.py +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -MOVO2 = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-MOVO2/libcore-all.mplt -anti-proguard-auto -dexcatch -gconly -gen-stringfieldvalue -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -j=32 -j100 -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -opt-switch-disable -refine-catch -staticstringcheck", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea --gconly --movinggc --no-localvar", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --gen-pgo-report --gconly --movinggc", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --gconly --movinggc --no-localvar" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-MOVO2", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-MOVO2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="GC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ) - ] -} diff --git a/testsuite/driver/src/mode/MOVO2NATIVE.py b/testsuite/driver/src/mode/MOVO2NATIVE.py deleted file mode 100644 index facaa84d0a289daf765a34b2fb35c3c05e2c2341..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/MOVO2NATIVE.py +++ /dev/null @@ -1,77 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -MOVO2NATIVE = { - "compile": [ - NativeCompile( - mpldep=[ - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-MOVO2", - "${OUT_ROOT}/target/product/public/lib/libnativehelper/include" - ], - infile="${NATIVE_SRC}", - model="arm64" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-MOVO2/libcore-all.mplt -anti-proguard-auto -dexcatch -gconly -gen-stringfieldvalue -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -j=32 -j100 -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -opt-switch-disable -refine-catch -staticstringcheck", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea --gconly --movinggc --no-localvar", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --gen-pgo-report --gconly --movinggc", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --gconly --movinggc --no-localvar" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-MOVO2", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - env={ - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-MOVO2" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="GC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ) - ] -} diff --git a/testsuite/driver/src/mode/O0.py b/testsuite/driver/src/mode/O0.py deleted file mode 100644 index 84e2338b54acb68de3f97d034355620d370a66db..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/O0.py +++ /dev/null @@ -1,120 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -O0 = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O0/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list", - "me": "", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --FastNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/fastNative.list --CriticalNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/criticalNative.list --nativefunc-property-list=${OUT_ROOT}/target/product/public/lib/codetricks/native_binding/native_func_property.list", - "mplcg": "--quiet --no-pie --verbose-asm --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/arch/arm64/duplicateFunc.s --fPIC" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-O0", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_VERIFY_RC": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/O0NATIVE.py b/testsuite/driver/src/mode/O0NATIVE.py deleted file mode 100644 index 6196a6d1dc5956486178a98d6ded037c67e56384..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/O0NATIVE.py +++ /dev/null @@ -1,131 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -O0NATIVE = { - "compile": [ - NativeCompile( - mpldep=[ - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O0", - "${OUT_ROOT}/target/product/public/lib/libnativehelper/include" - ], - infile="${NATIVE_SRC}", - model="arm64" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O0/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list", - "me": "", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --FastNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/fastNative.list --CriticalNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/criticalNative.list --nativefunc-property-list=${OUT_ROOT}/target/product/public/lib/codetricks/native_binding/native_func_property.list", - "mplcg": "--quiet --no-pie --verbose-asm --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/arch/arm64/duplicateFunc.s --fPIC" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-O0", - model="arm64", - infile="${APP}", - ) - ], - "run": [ - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O0" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_REPORT_RC_LEAK": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O0" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_VERIFY_RC": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O0" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/O0NATIVEEH.py b/testsuite/driver/src/mode/O0NATIVEEH.py deleted file mode 100644 index a6c1c9a437b5c109de40e7cc62317241cedfade2..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/O0NATIVEEH.py +++ /dev/null @@ -1,77 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -O0NATIVEEH = { - "compile": [ - NativeCompile( - mpldep=[ - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O0", - "${OUT_ROOT}/target/product/public/lib/libnativehelper/include" - ], - infile="${NATIVE_SRC}", - model="arm64" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O0/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list", - "me": "", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --FastNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/fastNative.list --CriticalNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/criticalNative.list --nativefunc-property-list=${OUT_ROOT}/target/product/public/lib/codetricks/native_binding/native_func_property.list", - "mplcg": "--quiet --no-pie --verbose-asm --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/arch/arm64/duplicateFunc.s --fPIC" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-O0", - model="arm64", - infile="${APP}", - ) - ], - "run": [ - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O0" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ) - ] -} diff --git a/testsuite/driver/src/mode/O0RC.py b/testsuite/driver/src/mode/O0RC.py deleted file mode 100644 index 33f36188583188f6a2587ea2b527ef3d5dfac42a..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/O0RC.py +++ /dev/null @@ -1,79 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -O0RC = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O0/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list", - "me": "", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --FastNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/fastNative.list --CriticalNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/criticalNative.list --nativefunc-property-list=${OUT_ROOT}/target/product/public/lib/codetricks/native_binding/native_func_property.list", - "mplcg": "--quiet --no-pie --verbose-asm --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/arch/arm64/duplicateFunc.s --fPIC" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-O0", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_REPORT_RC_LEAK": "1", - "PATTERN_FROM_BACKUP_TRACING": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="cycle.log" - ), - CheckRegContain( - reg="ExpectResult", - file="cycle.log" - ), - CheckRegContain( - reg="Total Leak Count 0", - file="cycle.log" - ), - CheckRegContain( - choice="num", - reg="ExpectResult", - file="cycle.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/O0SMALI.py b/testsuite/driver/src/mode/O0SMALI.py deleted file mode 100644 index c2947526d62583b6ffc46e91bdfdde4b76b94227..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/O0SMALI.py +++ /dev/null @@ -1,155 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -O0SMALI = { - "smali2dex": [ - Smali2dex( - file=["${APP}.smali","${EXTRA_SMALI2DEX_FILE_1}"] - ) - ], - "dex2mpl":[ - Dex2mpl( - dex2mpl="${OUT_ROOT}/target/product/maple_arm64/bin/dex2mpl", - option="--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O0/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list ${EXTRA_DEX2MPL_OPTION}", - infile="${APP}.dex", - redirection="dex2mpl.log" - ) - ], - "check_reg_contain": [ - CheckRegContain( - reg="${REG}", - file="${FILE}" - ) - ], - "maple_mplipa_me_mpl2mpl_mplcg": [ - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "mplipa": "--quiet --effectipa", - "me": "", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --FastNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/fastNative.list --CriticalNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/criticalNative.list --nativefunc-property-list=${OUT_ROOT}/target/product/public/lib/codetricks/native_binding/native_func_property.list", - "mplcg": "--quiet --no-pie --verbose-asm --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/arch/arm64/duplicateFunc.s --fPIC" - }, - global_option="--save-temps", - infile="${APP}.mpl" - ) - ], - "qemu_linker": [ - Linker( - lib="host-x86_64-O0", - model="arm64", - infile="${APP}" - ) - ], - "compile": [ - Smali2dex( - file=["${APP}.smali","${EXTRA_SMALI2DEX_FILE_2}","../lib/smali_util_Printer.smali","../lib/smali_util_ArrayI.smali"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O0/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list", - "me": "", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --FastNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/fastNative.list --CriticalNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/criticalNative.list --nativefunc-property-list=${OUT_ROOT}/target/product/public/lib/codetricks/native_binding/native_func_property.list", - "mplcg": "--quiet --no-pie --verbose-asm --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/arch/arm64/duplicateFunc.s --fPIC" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-O0", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_VERIFY_RC": "1", - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/O2.py b/testsuite/driver/src/mode/O2.py deleted file mode 100644 index c9b1bb5d18ba971de3bc5ff17d666bf672627da1..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/O2.py +++ /dev/null @@ -1,116 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -O2 = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2/libcore-all.mplt -dexcatch -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -j=16 -j100 -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -refine-catch -staticstringcheck", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --nativeopt --replaceasm" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-O2", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "MAPLE_VERIFY_RC": "1", - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - infile="${APP}.so", - xbootclasspath="libcore-all.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/O2NATIVE.py b/testsuite/driver/src/mode/O2NATIVE.py deleted file mode 100644 index 75159c5d90ff502141e2fb86bbcab3caafd8039c..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/O2NATIVE.py +++ /dev/null @@ -1,129 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -O2NATIVE = { - "compile": [ - NativeCompile( - mpldep=[ - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2", - "${OUT_ROOT}/target/product/public/lib/libnativehelper/include" - ], - infile="${NATIVE_SRC}", - model="arm64" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2/libcore-all.mplt -dexcatch -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -j=16 -j100 -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -refine-catch -staticstringcheck", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --nativeopt --replaceasm" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-O2", - model="arm64", - infile="${APP}", - ) - ], - "run": [ - Mplsh( - env={ - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "MAPLE_VERIFY_RC": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - infile="${APP}.so", - xbootclasspath="libcore-all.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/O2NATIVEEH.py b/testsuite/driver/src/mode/O2NATIVEEH.py deleted file mode 100644 index d55bfc050973871ab6b3488681fe53d9446ca12d..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/O2NATIVEEH.py +++ /dev/null @@ -1,77 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -O2NATIVEEH = { - "compile": [ - NativeCompile( - mpldep=[ - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2", - "${OUT_ROOT}/target/product/public/lib/libnativehelper/include" - ], - infile="${NATIVE_SRC}", - model="arm64" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2/libcore-all.mplt -dexcatch -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -refine-catch -staticstringcheck", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --nativeopt --replaceasm" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-O2", - model="arm64", - infile="${APP}", - ) - ], - "run": [ - Mplsh( - env={ - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ) - ] -} diff --git a/testsuite/driver/src/mode/O2RC.py b/testsuite/driver/src/mode/O2RC.py deleted file mode 100644 index 6cf4c5510f17ac63b84f5e975b8378db94e154dc..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/O2RC.py +++ /dev/null @@ -1,79 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -O2RC = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2/libcore-all.mplt -dexcatch -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -refine-catch -staticstringcheck", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --nativeopt --replaceasm" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-O2", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1", - "PATTERN_FROM_BACKUP_TRACING": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="cycle.log" - ), - CheckRegContain( - reg="ExpectResult", - file="cycle.log" - ), - CheckRegContain( - reg="Total Leak Count 0", - file="cycle.log" - ), - CheckRegContain( - choice="num", - reg="ExpectResult", - file="cycle.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/O2SMALI.py b/testsuite/driver/src/mode/O2SMALI.py deleted file mode 100644 index 763b9a10bc365ec47209adf881b25133d9b84564..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/O2SMALI.py +++ /dev/null @@ -1,151 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -O2SMALI = { - "smali2dex": [ - Smali2dex( - file=["${APP}.smali","${EXTRA_SMALI2DEX_FILE_1}"] - ) - ], - "dex2mpl": [ - Dex2mpl( - dex2mpl="${OUT_ROOT}/target/product/maple_arm64/bin/dex2mpl", - option="--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list ${EXTRA_DEX2MPL_OPTION}", - infile="${APP}.dex", - redirection="dex2mpl.log" - ) - ], - "check_reg_contain": [ - CheckRegContain( - reg="${REG}", - file="${FILE}" - ) - ], - "maple_mplipa_me_mpl2mpl_mplcg": [ - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "mplipa": "--quiet --effectipa", - "me": "", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --FastNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/fastNative.list --CriticalNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/criticalNative.list --nativefunc-property-list=${OUT_ROOT}/target/product/public/lib/codetricks/native_binding/native_func_property.list", - "mplcg": "--quiet --no-pie --verbose-asm --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/arch/arm64/duplicateFunc.s --fPIC" - }, - global_option="--save-temps", - infile="${APP}.mpl" - ) - ], - "qemu_linker": [ - Linker( - lib="host-x86_64-O2", - model="arm64", - infile="${APP}" - ) - ], - "compile": [ - Smali2dex( - file=["${APP}.smali","${EXTRA_SMALI2DEX_FILE_2}","../lib/smali_util_Printer.smali","../lib/smali_util_ArrayI.smali"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2/libcore-all.mplt -dexcatch -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -refine-catch -staticstringcheck", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --nativeopt --replaceasm" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-O2", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "MAPLE_VERIFY_RC": "1", - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/O2STMTPRE.py b/testsuite/driver/src/mode/O2STMTPRE.py deleted file mode 100644 index 2ad70b96adae3980a72833c807722414a551c212..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/O2STMTPRE.py +++ /dev/null @@ -1,121 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -O2STMTPRE = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2/libcore-all.mplt -dexcatch -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -j=16 -j100 -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -refine-catch -staticstringcheck", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --nativeopt --replaceasm" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - CheckRegContain( - reg='"callassigned &MCC_GetOrInsertLiteral"', - file="${APP}.VtableImpl.mpl", - choice="num" - ), - Linker( - lib="host-x86_64-O2", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "MAPLE_VERIFY_RC": "1", - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - infile="${APP}.so", - xbootclasspath="libcore-all.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/O2SUBSUMERC.py b/testsuite/driver/src/mode/O2SUBSUMERC.py deleted file mode 100644 index 714d8ecc239d465ffb68038cf7c43ec4a42865d4..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/O2SUBSUMERC.py +++ /dev/null @@ -1,121 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -O2SUBSUMERC = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2/libcore-all.mplt -dexcatch -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -j=16 -j100 -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -refine-catch -staticstringcheck", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --nativeopt --replaceasm" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - CheckRegContain( - reg="MCCIncRef", - file="${APP}.VtableImpl.mpl", - choice="num" - ), - Linker( - lib="host-x86_64-O2", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "MAPLE_VERIFY_RC": "1", - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - infile="${APP}.so", - xbootclasspath="libcore-all.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/OPSIR.py b/testsuite/driver/src/mode/OPSIR.py deleted file mode 100644 index 6e430ee43c3c5073e65fe91f5071e45b9451e5ec..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/OPSIR.py +++ /dev/null @@ -1,32 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -OPSIR = { - "compile": [ - Irbuild( - irbuild="${OUT_ROOT}/target/product/maple_arm64/bin/bin_OPS/irbuild", - infile="${APP}.mpl" - ), - Irbuild( - irbuild="${OUT_ROOT}/target/product/maple_arm64/bin/bin_OPS/irbuild", - infile="${APP}.irb.mpl" - ), - CheckFileEqual( - file1="${APP}.irb.mpl", - file2="${APP}.irb.irb.mpl" - ) - ] -} \ No newline at end of file diff --git a/testsuite/driver/src/mode/OPS_NATIVE_O0.py b/testsuite/driver/src/mode/OPS_NATIVE_O0.py deleted file mode 100644 index 58a4ab7cd4252569df9e3c9e5274c4421d89c614..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/OPS_NATIVE_O0.py +++ /dev/null @@ -1,136 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -OPS_NATIVE_O0 = { - "compile": [ - NativeCompile( - mpldep=[ - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O2", - "${OUT_ROOT}/target/product/public/lib/libnativehelper/include" - ], - infile="${NATIVE_SRC}", - model="arm64" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Dex2mpl( - dex2mpl="${OUT_ROOT}/target/product/maple_arm64/bin/bin_OPS/dex2mpl", - option="--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O0/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list", - infile="${APP}.dex" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_OPS/maple --mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O0/libcore-all.mplt", - run=["me", "mpl2mpl", "mplcg"], - option={ - "me": "--quiet", - "mpl2mpl": "--quiet --regnativefunc --maplelinker", - "mplcg": "--quiet --no-pie --verbose-asm --maplelinker --fPIC" - }, - global_option="--save-temps --genVtableImpl", - infile="${APP}.mpl" - ), - Linker( - lib="host-x86_64-OPS_O0", - model="arm64", - infile="${APP}", - native_src="${NATIVE_SRC}.cpp" - ) - ], - "run": [ - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O0" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_REPORT_RC_LEAK": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O0" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_VERIFY_RC": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O0" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - infile="${APP}.so", - xbootclasspath="libcore-all.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} \ No newline at end of file diff --git a/testsuite/driver/src/mode/OPS_NATIVE_O2.py b/testsuite/driver/src/mode/OPS_NATIVE_O2.py deleted file mode 100644 index 8bc60727c598592911e35c5eb06e57f0c252037b..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/OPS_NATIVE_O2.py +++ /dev/null @@ -1,133 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -OPS_NATIVE_O2 = { - "compile": [ - NativeCompile( - mpldep=[ - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O2", - "${OUT_ROOT}/target/product/public/lib/libnativehelper/include" - ], - infile="${NATIVE_SRC}", - model="arm64" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Dex2mpl( - dex2mpl="${OUT_ROOT}/target/product/maple_arm64/bin/bin_OPS/dex2mpl", - option="--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O2/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list", - infile="${APP}.dex" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_OPS/maple --mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O2/libcore-all.mplt", - run=["me", "mpl2mpl", "mplcg"], - option={ - "me": "-O2 --quiet", - "mpl2mpl": "-O2 --quiet --regnativefunc --no-nativeopt --maplelinker", - "mplcg": "--quiet -O2 --no-pie --verbose-asm --maplelinker --fPIC" - }, - global_option="--save-temps --genVtableImpl", - infile="${APP}.mpl" - ), - Linker( - lib="host-x86_64-OPS_O2", - model="arm64", - infile="${APP}", - native_src="${NATIVE_SRC}.cpp" - ) - ], - "run": [ - Mplsh( - env={ - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O2" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O2" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "MAPLE_VERIFY_RC": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O2" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - infile="${APP}.so", - xbootclasspath="libcore-all.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} \ No newline at end of file diff --git a/testsuite/driver/src/mode/OPS_O0.py b/testsuite/driver/src/mode/OPS_O0.py deleted file mode 100644 index 7c1097023d15083c18e71d62210125374b831f54..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/OPS_O0.py +++ /dev/null @@ -1,124 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -OPS_O0 = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Dex2mpl( - dex2mpl="${OUT_ROOT}/target/product/maple_arm64/bin/bin_OPS/dex2mpl", - option="--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O0/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list", - infile="${APP}.dex" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_OPS/maple --mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O0/libcore-all.mplt", - run=["me", "mpl2mpl", "mplcg"], - option={ - "me": "--quiet", - "mpl2mpl": "--quiet --regnativefunc --maplelinker", - "mplcg": "--quiet --no-pie --verbose-asm --maplelinker --fPIC" - }, - global_option="--save-temps --genVtableImpl", - infile="${APP}.mpl" - ), - Linker( - lib="host-x86_64-OPS_O0", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_VERIFY_RC": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O0", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - infile="${APP}.so", - xbootclasspath="libcore-all.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} \ No newline at end of file diff --git a/testsuite/driver/src/mode/OPS_O2.py b/testsuite/driver/src/mode/OPS_O2.py deleted file mode 100644 index a51491069ca158d03207291c981cf047b0a13b89..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/OPS_O2.py +++ /dev/null @@ -1,119 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -OPS_O2 = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Dex2mpl( - dex2mpl="${OUT_ROOT}/target/product/maple_arm64/bin/bin_OPS/dex2mpl", - option="--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O2/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list", - infile="${APP}.dex" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/bin_OPS/maple --mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O2/libcore-all.mplt", - run=["me", "mpl2mpl", "mplcg"], - option={ - "me": "-O2 --quiet", - "mpl2mpl": "-O2 --quiet --regnativefunc --no-nativeopt --maplelinker", - "mplcg": "--quiet -O2 --no-pie --verbose-asm --maplelinker --fPIC" - }, - global_option="--save-temps --genVtableImpl", - infile="${APP}.mpl" - ), - Linker( - lib="host-x86_64-OPS_O2", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "MAPLE_VERIFY_RC": "1", - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-OPS_O2", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - infile="${APP}.so", - xbootclasspath="libcore-all.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} \ No newline at end of file diff --git a/testsuite/driver/src/mode/PANDA_ZTERP.py b/testsuite/driver/src/mode/PANDA_ZTERP.py deleted file mode 100644 index bf94cc19339032671073beccd5219a797aec2b0b..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/PANDA_ZTERP.py +++ /dev/null @@ -1,103 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -PANDA_ZTERP = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Class2panda( - class2panda="${OUT_ROOT}/target/product/public/bin/c2p", - infile=".", - outfile="${APP}.bin" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.bin", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.bin", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "MAPLE_VERIFY_RC": "1", - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.bin", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} \ No newline at end of file diff --git a/testsuite/driver/src/mode/RC.py b/testsuite/driver/src/mode/RC.py deleted file mode 100644 index a5b833493eb0e17ac10b4f1b7893e724aea6ce53..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/RC.py +++ /dev/null @@ -1,79 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * -from env_var import EnvVar - -RC = { - "compile": [ - BenchmarkVogar(), - Shell( - "mv ${BENCHMARK_ACTION}/${BENCHMARK_ACTION}.dex.jar ${BENCHMARK_ACTION}/${BENCHMARK_ACTION}.jar;" - "if [ -d \"${BENCHMARK_ACTION}/dex\" ]; then" - " rm -rf ${BENCHMARK_ACTION}/dex;" - "fi;" - "unzip -q ${BENCHMARK_ACTION}/${BENCHMARK_ACTION}.jar -d ${BENCHMARK_ACTION}/dex" - ), - Maple( - maple="${MAPLE_ROOT}/../out/soong/host/linux-x86/bin/maple", - run=["dex2mpl"], - option={ - "dex2mpl": "-checktool -check-invoke -invoke-checklist=${MAPLE_ROOT}/mrt/codetricks/profile.pv/classloaderInvocation.list -check-incomplete -incomplete-whitelist=${MAPLE_ROOT}/mrt/codetricks/compile/incomplete.list -incomplete-detail -staticstringcheck --inlinefunclist=${MAPLE_ROOT}/mrt/codetricks/profile.pv/to_inline.list -dexcatch -litprofile=${MAPLE_ROOT}/mrt/codetricks/profile.pv/meta.list -output=${BENCHMARK_ACTION}/dex/ -mplt=${MAPLE_ROOT}/../out/soong/.intermediates/vendor/huawei/maple/Lib/core/libmaplecore-all/android_arm64_armv8-a_core_shared/obj/classes.mplt" - }, - global_option="", - infile="${BENCHMARK_ACTION}/dex/classes.dex" - ), - Maple( - maple="${MAPLE_ROOT}/../out/soong/host/linux-x86/bin/maple", - run=["mplipa"], - option={ - "mplipa": "--effectipa --quiet --inlinefunclist=${MAPLE_ROOT}/mrt/codetricks/profile.pv/inline_funcs.list" - }, - global_option="", - infile="${BENCHMARK_ACTION}/dex/classes.mpl > /dev/null" - ), - Maple( - maple="${MAPLE_ROOT}/../out/soong/host/linux-x86/bin/maple", - run=["me", "mpl2mpl", "mplcg"], - option={ - "me": "--inlinefunclist=${MAPLE_ROOT}/mrt/codetricks/profile.pv/inline_funcs.list -O2 --quiet --no-ignoreipa", - "mpl2mpl": "-regnativefunc --quiet -O2 --usewhiteclass --maplelinker --dump-muid --check_cl_invocation=${MAPLE_ROOT}/mrt/codetricks/profile.pv/classloaderInvocation.list --regnative-dynamic-only", - "mplcg": "-O2 --quiet --no-pie --nativeopt --verbose-asm --gen-c-macro-def --maplelinker --gsrc --duplicate_asm_list2=${MAPLE_ROOT}/mrt/compiler-rt/src/arch/arm64/fastFuncs.S --fPIC" - }, - global_option="--genVtableImpl", - infile="${BENCHMARK_ACTION}/dex/classes.mpl" - ), - Shell( - "${MAPLE_ROOT}/../prebuilts/clang/host/linux-x86/clang-r353983c/bin/clang -target aarch64-linux-android -g -c -x assembler-with-cpp -D__ASSEMBLY__ -DUSE_32BIT_REF -MD -MF ${BENCHMARK_ACTION}/dex/classes.d -o ${BENCHMARK_ACTION}/dex/classes.o ${BENCHMARK_ACTION}/dex/classes.VtableImpl.s" - ), - Shell( - "${MAPLE_ROOT}/../prebuilts/clang/host/linux-x86/clang-r353983c/bin/llvm-objcopy --rename-section .debug_info=.maple_java_debug_info --rename-section .debug_abbrev=.maple_java_debug_abbrev --rename-section .debug_line=.maple_java_debug_line --rename-section .debug_aranges=.maple_java_debug_aranges --rename-section .debug_ranges=.maple_java_debug_ranges ${BENCHMARK_ACTION}/dex/classes.o" - ), - Shell( - "${MAPLE_ROOT}/../prebuilts/clang/host/linux-x86/clang-r353983c/bin/clang++ -nostdlib -Wl,-soname,libmaple${BENCHMARK_ACTION}.so -Wl,--gc-sections -shared ${MAPLE_ROOT}/../out/soong/.intermediates/bionic/libc/crtbegin_so/android_arm64_armv8-a_core/crtbegin_so.o ${BENCHMARK_ACTION}/dex/classes.o -Wl,--whole-archive ${MAPLE_ROOT}/../out/target/product/generic_a15/obj/STATIC_LIBRARIES/mrt_module_init_intermediates/mrt_module_init.a -Wl,--no-whole-archive ${MAPLE_ROOT}/../out/target/product/generic_a15/obj/STATIC_LIBRARIES/libclang_rt.ubsan_minimal-aarch64-android_intermediates/libclang_rt.ubsan_minimal-aarch64-android.a ${MAPLE_ROOT}/../prebuilts/clang/host/linux-x86/clang-r353983c/lib64/clang/9.0.3/lib/linux//libclang_rt.builtins-aarch64-android.a ${MAPLE_ROOT}/../out/target/product/generic_a15/obj/STATIC_LIBRARIES/libatomic_intermediates/libatomic.a ${MAPLE_ROOT}/../out/target/product/generic_a15/obj/STATIC_LIBRARIES/libgcc_intermediates/libgcc.a -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--build-id=md5 -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--no-undefined-version -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libgcc_stripped.a -fuse-ld=lld -Wl,--hash-style=gnu -Wl,--icf=safe -Wl,-z,max-page-size=4096 -target aarch64-linux-android -B${MAPLE_ROOT}/../prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin -Wl,-T,${MAPLE_ROOT}/mrt/maplert/linker/maplelld.so.lds -Wl,-execute-only -Wl,--exclude-libs,libclang_rt.ubsan_minimal-aarch64-android.a -Wl,--no-undefined ${MAPLE_ROOT}/../out/target/product/generic_a15/obj/SHARED_LIBRARIES/libmaplecore-all_intermediates/libmaplecore-all.so ${MAPLE_ROOT}/../out/target/product/generic_a15/obj/SHARED_LIBRARIES/libmrt_intermediates/libmrt.so ${MAPLE_ROOT}/../out/target/product/generic_a15/obj/SHARED_LIBRARIES/libcommon_bridge_intermediates/libcommon_bridge.so ${MAPLE_ROOT}/../out/target/product/generic_a15/obj/SHARED_LIBRARIES/libc++_intermediates/libc++.so ${MAPLE_ROOT}/../out/target/product/generic_a15/obj/SHARED_LIBRARIES/libc_intermediates/libc.so ${MAPLE_ROOT}/../out/target/product/generic_a15/obj/SHARED_LIBRARIES/libm_intermediates/libm.so ${MAPLE_ROOT}/../out/target/product/generic_a15/obj/SHARED_LIBRARIES/libdl_intermediates/libdl.so -o ${BENCHMARK_ACTION}/dex/libmaple${BENCHMARK_ACTION}Symbol.so ${MAPLE_ROOT}/../out/soong/.intermediates/bionic/libc/crtend_so/android_arm64_armv8-a_core/obj/bionic/libc/arch-common/bionic/crtend_so.o" - ), - Shell( - "CLANG_BIN=${MAPLE_ROOT}/../prebuilts/clang/host/linux-x86/clang-r353983c/bin CROSS_COMPILE=${MAPLE_ROOT}/../prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android- XZ=${MAPLE_ROOT}/../prebuilts/build-tools/linux-x86/bin/xz ${MAPLE_ROOT}/../build/soong/scripts/strip.sh -i ${BENCHMARK_ACTION}/dex/libmaple${BENCHMARK_ACTION}Symbol.so -o ${BENCHMARK_ACTION}/dex/libmaple${BENCHMARK_ACTION}.so -d ${BENCHMARK_ACTION}/dex/libmaple${BENCHMARK_ACTION}.so.d --keep-mini-debug-info" - ), - Shell( - "(${MAPLE_ROOT}/../prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-readelf -d ${BENCHMARK_ACTION}/dex/libmaple${BENCHMARK_ACTION}.so | grep SONAME || echo \"No SONAME for ${BENCHMARK_ACTION}/dex/libmaple${BENCHMARK_ACTION}.so\") > ${BENCHMARK_ACTION}/dex/libmaple${BENCHMARK_ACTION}.so.toc.tmp;" - "${MAPLE_ROOT}/../prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-readelf --dyn-syms ${BENCHMARK_ACTION}/dex/libmaple${BENCHMARK_ACTION}.so | awk '{$2=\"\"; $3=\"\"; print}' >> ${BENCHMARK_ACTION}/dex/libmaple${BENCHMARK_ACTION}.so.toc.tmp;" - "mv ${BENCHMARK_ACTION}/dex/libmaple${BENCHMARK_ACTION}.so.toc.tmp ${BENCHMARK_ACTION}/dex/libmaple${BENCHMARK_ACTION}.so.toc;" - "cp ${BENCHMARK_ACTION}/dex/libmaple${BENCHMARK_ACTION}.so ${BENCHMARK_ACTION}" - ), - ], - "native_compile": [ - BenchmarkNative() - ] -} diff --git a/testsuite/driver/src/mode/REFINECATCH.py b/testsuite/driver/src/mode/REFINECATCH.py deleted file mode 100644 index a7160d71eb004c3e7e6e3738f73c931f75b9b80a..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/REFINECATCH.py +++ /dev/null @@ -1,29 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -REFINECATCH = { - "compile": [ - Smali2dex( - file=["${APP}.smali"] - ), - Dex2mpl( - dex2mpl="${OUT_ROOT}/target/product/maple_arm64/bin/dex2mpl", - option="--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/maple_arm64/lib/codetricks/profile.pv/meta.list -refine-catch -dumpdataflow -func=${FUNC}", - infile="${APP}.dex", - redirection="dex2mpl.log" - ) - ] -} \ No newline at end of file diff --git a/testsuite/driver/src/mode/SELF.py b/testsuite/driver/src/mode/SELF.py deleted file mode 100644 index c1b577abaf553e74762852c90c147255dc1488b1..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/SELF.py +++ /dev/null @@ -1,17 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -SELF = {} \ No newline at end of file diff --git a/testsuite/driver/src/mode/STATICSTRING.py b/testsuite/driver/src/mode/STATICSTRING.py deleted file mode 100644 index 36353211ee4e56525fac117df8523a0196999584..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/STATICSTRING.py +++ /dev/null @@ -1,34 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -STATICSTRING = { - "compile": [ - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="${APP}.jar" - ), - Dex2mpl( - dex2mpl="${OUT_ROOT}/target/product/maple_arm64/bin/dex2mpl", - option="--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/maple_arm64/lib/codetricks/profile.pv/meta.list -staticstringcheck", - infile="${APP}.dex" - ) - ] -} \ No newline at end of file diff --git a/testsuite/driver/src/mode/STATICSTRINGWRONG.py b/testsuite/driver/src/mode/STATICSTRINGWRONG.py deleted file mode 100644 index 6f7c13fe82a8bfae8ef0c2504cb7720613cefa83..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/STATICSTRINGWRONG.py +++ /dev/null @@ -1,40 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -STATICSTRINGWRONG = { - "compile": [ - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="${APP}.jar" - ), - Dex2mpl( - dex2mpl="${OUT_ROOT}/target/product/maple_arm64/bin/dex2mpl", - option="--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-O2/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/maple_arm64/lib/codetricks/profile.pv/meta.list -staticstringcheck", - infile="${APP}.dex", - redirection="dex2mpl.log", - return_value_list=[] - ), - CheckRegContain( - reg="@HiLogConstString Error Usage Occured!!!", - file="dex2mpl.log" - ), - ] -} \ No newline at end of file diff --git a/testsuite/driver/src/mode/TGCO0.py b/testsuite/driver/src/mode/TGCO0.py deleted file mode 100644 index 622a85f83358751ddf16d276bf87e48aa7ecf9d4..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/TGCO0.py +++ /dev/null @@ -1,61 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -TGCO0 = { - "compile": [ - Shell( - "adb shell \"mkdir -p /data/maple/${CASE}/${OPT}\"" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Shell( - "adb push ${APP}.dex /data/maple/${CASE}/${OPT}/" - ), - Shell( - "adb shell \"/data/maple/maple -O0 --gconly --save-temps --hir2mpl-opt=\\\"-Xbootclasspath /apex/com.android.runtime/javalib/core-oj.jar,/apex/com.android.runtime/javalib/core-libart.jar\\\" --mplcg-opt=\\\"--no-ebo --no-cfgo --no-schedule\\\" --infile /data/maple/${CASE}/${OPT}/${APP}.dex\"" - ), - Shell( - "adb pull /data/maple/${CASE}/${OPT}/${APP}.VtableImpl.s ./" - ), - Shell( - "${MAPLE_ROOT}/zeiss/prebuilt/sdk/android-ndk-r20b/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android29-clang++ -O2 -x assembler-with-cpp -march=armv8-a -DUSE_32BIT_REF -c ${APP}.VtableImpl.s" - ), - Shell( - "${MAPLE_ROOT}/zeiss/prebuilt/sdk/android-ndk-r20b/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android29-clang++ ${APP}.VtableImpl.o -O2 -Wall -Werror -Wno-unused-command-line-argument -fstack-protector-strong -std=c++14 -nostdlibinc -march=armv8-a -fPIC -shared ${MAPLE_ROOT}/out/target/product/maple_arm64/lib/mrt_module_init.cpp -fuse-ld=lld -rdynamic -L${MAPLE_ROOT}/out/target/product/maple_arm64/lib/android -lmaplecore-all -lcommon_bridge -lc++ -lc -lm -ldl -Wl,-T${MAPLE_ROOT}/out/target/product/public/lib/linker/maplelld.so.lds -o ./${APP}.so" - ), - Shell( - "adb push ${APP}.so /data/maple/${CASE}/${OPT}/" - ) - ], - "run": [ - Shell( - "adb shell \"export LD_LIBRARY_PATH=/vendor/lib64:/system/lib64:/data/maple;mplsh -Xgconly -cp /data/maple/${CASE}/${OPT}/${APP}.so ${APP}\" > output.log 2>&1" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Shell( - "adb shell \"rm -rf /data/maple/${CASE}/${OPT}\"" - ) - ] -} \ No newline at end of file diff --git a/testsuite/driver/src/mode/TGCO2.py b/testsuite/driver/src/mode/TGCO2.py deleted file mode 100644 index 5974235117a2b41a454cb3e4f6e6ec83abd5057b..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/TGCO2.py +++ /dev/null @@ -1,61 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -TGCO2 = { - "compile": [ - Shell( - "adb shell \"mkdir -p /data/maple/${CASE}/${OPT}\"" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Shell( - "adb push ${APP}.dex /data/maple/${CASE}/${OPT}/" - ), - Shell( - "adb shell \"/data/maple/maple -O2 --gconly --save-temps --hir2mpl-opt=\\\"-Xbootclasspath /apex/com.android.runtime/javalib/core-oj.jar,/apex/com.android.runtime/javalib/core-libart.jar\\\" --mplcg-opt=\\\"--no-ebo --no-cfgo --no-schedule\\\" --infile /data/maple/${CASE}/${OPT}/${APP}.dex\"" - ), - Shell( - "adb pull /data/maple/${CASE}/${OPT}/${APP}.VtableImpl.s ./" - ), - Shell( - "${MAPLE_ROOT}/zeiss/prebuilt/sdk/android-ndk-r20b/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android29-clang++ -O2 -x assembler-with-cpp -march=armv8-a -DUSE_32BIT_REF -c ${APP}.VtableImpl.s" - ), - Shell( - "${MAPLE_ROOT}/zeiss/prebuilt/sdk/android-ndk-r20b/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android29-clang++ ${APP}.VtableImpl.o -O2 -Wall -Werror -Wno-unused-command-line-argument -fstack-protector-strong -std=c++14 -nostdlibinc -march=armv8-a -fPIC -shared ${MAPLE_ROOT}/out/target/product/maple_arm64/lib/mrt_module_init.cpp -fuse-ld=lld -rdynamic -L${MAPLE_ROOT}/out/target/product/maple_arm64/lib/android -lmaplecore-all -lcommon_bridge -lc++ -lc -lm -ldl -Wl,-T${MAPLE_ROOT}/out/target/product/public/lib/linker/maplelld.so.lds -o ./${APP}.so" - ), - Shell( - "adb push ${APP}.so /data/maple/${CASE}/${OPT}/" - ) - ], - "run": [ - Shell( - "adb shell \"export LD_LIBRARY_PATH=/vendor/lib64:/system/lib64:/data/maple;mplsh -Xgconly -cp /data/maple/${CASE}/${OPT}/${APP}.so ${APP}\" > output.log 2>&1" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Shell( - "adb shell \"rm -rf /data/maple/${CASE}/${OPT}\"" - ) - ] -} \ No newline at end of file diff --git a/testsuite/driver/src/mode/TIME.py b/testsuite/driver/src/mode/TIME.py deleted file mode 100644 index b63c5da2689f3423011538161a17d91ffc9b7146..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/TIME.py +++ /dev/null @@ -1,107 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -TIME = { - "compile": [ - Shell( - "OUTDIR=output;" - "mkdir -p ${OUTDIR}" - ), - Shell( - "num=1;" - "TIMES=5;" - "cpu_list=(0 1 2 3 4 5 6 7);" - "cpu_governor=\'userspace\';" - "offline_cpu_list=(4 5 6 7);" - "enable_cpu_list=(0 1 2 3);" - "cpu_freq=1805000" - ), - Shell( - "for offline_cpu in ${offline_cpu_list[@]}; do" - " adb shell \"echo 0 > /sys/devices/system/cpu/cpu${offline_cpu}/online\";" - "done" - ), - Shell( - "for enable_cpu in ${enable_cpu_list[@]}; do" - " adb shell \"echo $cpu_freq > /sys/devices/system/cpu/cpu${enable_cpu}/cpufreq/scaling_max_freq\";" - " adb shell \"echo $cpu_freq > /sys/devices/system/cpu/cpu${enable_cpu}/cpufreq/scaling_min_freq\";" - " adb shell \"echo $cpu_governor > /sys/devices/system/cpu/cpu${enable_cpu}/cpufreq/scaling_governor\";" - " adb shell \"echo $cpu_freq > /sys/devices/system/cpu/cpu${enable_cpu}/cpufreq/scaling_setspeed\";" - "done" - ), - Shell( - "adb shell stop;" - "sleep 20s" - ), - Shell( - "while true; do" - " if [ ${num} -gt ${TIMES} ]; then" - " break;" - " fi" - ), - Shell( - "adb shell \"mkdir -p /data/maple/${CASE}/${OPT}\"" - ), - Shell( - "adb push ${APP}.dex /data/maple/${CASE}/${OPT}/" - ), - Shell( - "adb shell \"(time /data/maple/maple --gconly -O2 --no-with-ipa /data/maple/${CASE}/${OPT}/${APP}.dex --hir2mpl-opt=\\\"-dump-time -no-mpl-file -Xbootclasspath /data/maple/core-oj.jar,/data/maple/core-libart.jar,/data/maple/bouncycastle.jar,/data/maple/apache-xml.jar,/data/maple/framework.jar,/data/maple/ext.jar,/data/maple/telephony-common.jar,/data/maple/voip-common.jar,/data/maple/ims-common.jar,/data/maple/android.test.base.jar,/data/maple/featurelayer-widget.jar,/data/maple/hwEmui.jar,/data/maple/hwPartBasicplatform.jar,/data/maple/telephony-separated.jar,/data/maple/hwTelephony-common.jar,/data/maple/hwPartTelephony.jar,/data/maple/hwPartTelephonyVSim.jar,/data/maple/hwPartTelephonyCust.jar,/data/maple/hwPartTelephonyTimezoneOpt.jar,/data/maple/hwPartTelephonyOpt.jar,/data/maple/hwPartSecurity.jar,/data/maple/hwIms-common.jar,/data/maple/hwPartMedia.jar,/data/maple/hwPartConnectivity.jar,/data/maple/hwPartPowerOffice.jar,/data/maple/hwPartDeviceVirtualization.jar,/data/maple/hwPartAirSharing.jar,/data/maple/hwPartDefaultDFR.jar,/data/maple/hwPartDFR.jar,/data/maple/hwPartMagicWindow.jar,/data/maple/hwframework.jar,/data/maple/com.huawei.nfc.jar,/data/maple/org.ifaa.android.manager.jar,/data/maple/hwaps.jar,/data/maple/servicehost.jar,/data/maple/hwcustIms-common.jar,/data/maple/hwcustTelephony-common.jar,/data/maple/hwIAwareAL.jar,/data/maple/conscrypt.jar,/data/maple/updatable-media.jar,/data/maple/okhttp.jar --java-staticfield-name=smart\\\" --mplcg-opt=\\\"--no-ico --no-cfgo --no-prepeep --no-ebo --no-storeloadopt --no-globalopt --no-schedule --no-proepilogue --no-peep --no-const-fold --no-lsra-hole --with-ra-linear-scan --no-prelsra --no-prespill --no-lsra-hole\\\" -time-phases)\" >& ${OUTDIR}/maple_${APP}_${num}.txt &" - ), - Shell( - "count=1;" - "mkdir -p ${OUTDIR}/mem_out;" - "while true; do" - " pid=`adb shell pidof maple`;" - " if [[ -z ${pid} ]]; then" - " echo \"compile ${APP} ${num} complete\";" - " break;" - " fi;" - " adb shell showmap ${pid} >> ${OUTDIR}/mem_out/mem_${count}.log;" - " ((count++));" - " sleep 0.5;" - "done" - ), - Shell( - "wait;" - "file_list=`ls ${OUTDIR}/mem_out | grep log | uniq`;" - "PSSMAX=0;" - "for file in ${file_list}; do" - " pss=`cat ${OUTDIR}/mem_out/$file | grep TOTAL | awk '{print $3+$9}'`;" - " if [[ ${pss} -ge ${PSSMAX} ]]; then" - " PSSMAX=${pss};" - " fi;" - "done" - ), - Shell( - "echo \"${PSSMAX}\" >> ${OUTDIR}/pss_max_${APP}.txt;" - "rm -rf ${OUTDIR}/mem_out" - ), - Shell( - " adb shell \"rm -rf /data/maple/${CASE}/${OPT}\";" - " num=`expr ${num} + 1`;" - "done" #end while - ), - Shell( - "adb shell start" - ) - ], - "checktime": [ - Shell( - "python3 ${OUT_ROOT}/target/product/public/bin/checker_compiler_time_ci.py -d ${APP} -n 5 -t ${CHECKTIME} -o ${OUTDIR}" #${TIMES} - ) - ] -} diff --git a/testsuite/driver/src/mode/ZRT.py b/testsuite/driver/src/mode/ZRT.py deleted file mode 100644 index ca7344656081bf1a9931d3cee3de24ef90fdfe07..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/ZRT.py +++ /dev/null @@ -1,115 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -ZRT = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/rt.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZRT/libcore-all.mplt -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -blacklist-invoke=${OUT_ROOT}/target/product/maple_arm64/lib/invoke-black-dex.list", - "mplipa": "--quiet --effectipa", - "me": "-O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "-O2 --quiet --regnativefunc --no-nativeopt --maplelinker --FastNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/fastNative.list --CriticalNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/criticalNative.list --nativefunc-property-list=${OUT_ROOT}/target/product/public/lib/codetricks/native_binding/native_func_property.list", - "mplcg": "-O2 --quiet --no-pie --verbose-asm --gen-c-macro-def --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/arch/arm64/duplicateFunc.s --fPIC" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-ZRT", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZRT", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZRT", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "MAPLE_VERIFY_RC": "1", - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZRT", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/ZRTNATIVE.py b/testsuite/driver/src/mode/ZRTNATIVE.py deleted file mode 100644 index d8b8835db8f51b9c66156e8471e58d136887cbc9..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/ZRTNATIVE.py +++ /dev/null @@ -1,131 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -ZRTNATIVE = { - "compile": [ - NativeCompile( - mpldep=[ - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZRT", - "${OUT_ROOT}/target/product/public/lib/libnativehelper/include" - ], - infile="${NATIVE_SRC}", - model="arm64" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/rt.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl","mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZRT/libcore-all.mplt -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -blacklist-invoke=${OUT_ROOT}/target/product/maple_arm64/lib/invoke-black-dex.list", - "mplipa": "--quiet --effectipa", - "me": "-O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "-O2 --quiet --regnativefunc --no-nativeopt --maplelinker --FastNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/fastNative.list --CriticalNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/criticalNative.list --nativefunc-property-list=${OUT_ROOT}/target/product/public/lib/codetricks/native_binding/native_func_property.list", - "mplcg": "-O2 --quiet --no-pie --verbose-asm --gen-c-macro-def --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/arch/arm64/duplicateFunc.s --fPIC" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-ZRT", - model="arm64", - infile="${APP}", - ) - ], - "run": [ - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZRT" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_REPORT_RC_LEAK": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZRT" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "MAPLE_VERIFY_RC": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZRT" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/ZRTNATIVEEH.py b/testsuite/driver/src/mode/ZRTNATIVEEH.py deleted file mode 100644 index 1e00141f4e48677778464c525207251ac8479cb0..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/ZRTNATIVEEH.py +++ /dev/null @@ -1,77 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -ZRTNATIVEEH = { - "compile": [ - NativeCompile( - mpldep=[ - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZRT", - "${OUT_ROOT}/target/product/public/lib/libnativehelper/include" - ], - infile="${NATIVE_SRC}", - model="arm64" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/rt.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl","mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZRT/libcore-all.mplt -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -blacklist-invoke=${OUT_ROOT}/target/product/maple_arm64/lib/invoke-black-dex.list", - "mplipa": "--quiet --effectipa", - "me": "-O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "-O2 --quiet --regnativefunc --no-nativeopt --maplelinker --FastNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/fastNative.list --CriticalNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/criticalNative.list --nativefunc-property-list=${OUT_ROOT}/target/product/public/lib/codetricks/native_binding/native_func_property.list", - "mplcg": "-O2 --quiet --no-pie --verbose-asm --gen-c-macro-def --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/arch/arm64/duplicateFunc.s --fPIC" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-ZRT", - model="arm64", - infile="${APP}", - ) - ], - "run": [ - Mplsh( - env={ - "USE_OLD_STACK_SCAN": "1", - "JNI_TEST": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "./", - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZRT" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ) - ] -} diff --git a/testsuite/driver/src/mode/ZRTRC.py b/testsuite/driver/src/mode/ZRTRC.py deleted file mode 100644 index 3791636612d1a116686b8d43faa24c58101a9a39..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/ZRTRC.py +++ /dev/null @@ -1,78 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -ZRTRC = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/rt.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZRT/libcore-all.mplt -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -blacklist-invoke=${OUT_ROOT}/target/product/maple_arm64/lib/invoke-black-dex.list", - "mplipa": "--quiet --effectipa", - "me": "-O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "-O2 --quiet --regnativefunc --no-nativeopt --maplelinker --FastNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/fastNative.list --CriticalNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/criticalNative.list --nativefunc-property-list=${OUT_ROOT}/target/product/public/lib/codetricks/native_binding/native_func_property.list", - "mplcg": "-O2 --quiet --no-pie --verbose-asm --gen-c-macro-def --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/arch/arm64/duplicateFunc.s --fPIC" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-ZRT", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1", - "PATTERN_FROM_BACKUP_TRACING": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZRT", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="cycle.log" - ), - CheckRegContain( - reg="ExpectResult", - file="cycle.log" - ), - CheckRegContain( - reg="Total Leak Count 0", - file="cycle.log" - ), - CheckRegContain( - choice="num", - reg="ExpectResult", - file="cycle.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/ZTERP.py b/testsuite/driver/src/mode/ZTERP.py deleted file mode 100644 index 1ce3355cd82b7c703d07f555cf5834840b759d0b..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/ZTERP.py +++ /dev/null @@ -1,98 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -ZTERP = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java","${EXTRA_JAVA_FILE}"] - ) - ], - "run": [ - Mplsh( - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.dex", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.dex", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "MAPLE_VERIFY_RC": "1", - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.dex", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} \ No newline at end of file diff --git a/testsuite/driver/src/mode/ZTERPCLASSLOADER.py b/testsuite/driver/src/mode/ZTERPCLASSLOADER.py deleted file mode 100644 index f809cbd6cc32d6ff6500b2c6166e848bc13fef48..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/ZTERPCLASSLOADER.py +++ /dev/null @@ -1,365 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -ZTERPCLASSLOADER = { - "java2dex": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ) - ], - "compile": [ - Shell( - 'cp ../lib/child.jar ./' - ), - Shell( - 'cp ../lib/parent.jar ./' - ), - Shell( - 'cp ../lib/inject.jar ./' - ), - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="child.jar" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list ", - "me": "", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --FastNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/fastNative.list --CriticalNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/criticalNative.list --nativefunc-property-list=${OUT_ROOT}/target/product/public/lib/codetricks/native_binding/native_func_property.list", - "mplcg": "--quiet --no-pie --verbose-asm --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/arch/arm64/duplicateFunc.s --fPIC" - }, - global_option="--save-temps", - infile="child.dex" - ), - Linker( - lib="host-x86_64-ZTERP", - model="arm64", - infile="child" - ), - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="parent.jar" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list ", - "me": "", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --FastNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/fastNative.list --CriticalNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/criticalNative.list --nativefunc-property-list=${OUT_ROOT}/target/product/public/lib/codetricks/native_binding/native_func_property.list", - "mplcg": "--quiet --no-pie --verbose-asm --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/arch/arm64/duplicateFunc.s --fPIC" - }, - global_option="--save-temps", - infile="parent.dex" - ), - Linker( - lib="host-x86_64-ZTERP", - model="arm64", - infile="parent" - ), - Jar2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/framework_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/services_intermediates/classes.jar" - ], - infile="inject.jar" - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list ", - "me": "", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --FastNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/fastNative.list --CriticalNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/criticalNative.list --nativefunc-property-list=${OUT_ROOT}/target/product/public/lib/codetricks/native_binding/native_func_property.list", - "mplcg": "--quiet --no-pie --verbose-asm --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/arch/arm64/duplicateFunc.s --fPIC" - }, - global_option="--save-temps", - infile="inject.dex" - ), - Linker( - lib="host-x86_64-ZTERP", - model="arm64", - infile="inject" - ), - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "--mplt ${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP/libcore-all.mplt -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list ", - "me": "", - "mpl2mpl": "--quiet --regnativefunc --maplelinker --FastNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/fastNative.list --CriticalNative=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/criticalNative.list --nativefunc-property-list=${OUT_ROOT}/target/product/public/lib/codetricks/native_binding/native_func_property.list", - "mplcg": "--quiet --no-pie --verbose-asm --maplelinker --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/arch/arm64/duplicateFunc.s --fPIC" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-ZTERP", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - env={ - "USE_ZTERP": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "USE_ZTERP": "true", - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "USE_ZTERP": "true", - "MAPLE_VERIFY_RC": "1", - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ), - Mplsh( - env={ - "USE_ZTERP": "true", - "APP_SPECIFY_CLASSPATH": '$(echo ${APP}.so|cut -d "=" -f 2)' - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - Mplsh( - env={ - "USE_ZTERP": "true", - "APP_SPECIFY_CLASSPATH": '$(echo ${APP}.so|cut -d "=" -f 2)', - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - Mplsh( - env={ - "USE_ZTERP": "true", - "APP_SPECIFY_CLASSPATH": '$(echo ${APP}.so|cut -d "=" -f 2)', - "MAPLE_VERIFY_RC": "1", - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="rcverify.log" - ), - Mplsh( - env={ - "USE_ZTERP": "true", - "APP_SPECIFY_CLASSPATH": '$(echo ${APP}.so|cut -d "=" -f 2)', - "MAPLE_VERIFY_RC": "1", - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="rcverify.log" - ), - Mplsh( - env={ - "USE_ZTERP": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "USE_ZTERP": "true", - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "USE_ZTERP": "true", - "MAPLE_VERIFY_RC": "1", - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.so", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/ZTERPDEXSO.py b/testsuite/driver/src/mode/ZTERPDEXSO.py deleted file mode 100644 index 927068e9be63141208b902699cce3958242d126f..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/ZTERPDEXSO.py +++ /dev/null @@ -1,142 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -ZTERPDEXSO = { - "java2dex": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ) - ], - "java2dex_simplejava": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"], - usesimplejava=True - ) - ], - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ), - Maple( - maple="${OUT_ROOT}/target/product/maple_arm64/bin/maple", - run=["dex2mpl", "mplipa", "me", "mpl2mpl", "mplcg"], - option={ - "dex2mpl": "-mplt=${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP/libcore-all.mplt -dexcatch -inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/to_inline.list -j=16 -j100 -litprofile=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/meta.list -refine-catch -staticstringcheck", - "mplipa": "--effectipa --quiet", - "me": "--O2 --quiet --inlinefunclist=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/inline_funcs.list --no-nativeopt --no-ignoreipa --enable-ea", - "mpl2mpl": "--O2 --quiet --regnativefunc --no-nativeopt --maplelinker --maplelinker-nolocal --dump-muid --check_cl_invocation=${OUT_ROOT}/target/product/public/lib/codetricks/profile.pv/classloaderInvocation.list --emitVtableImpl", - "mplcg": "--O2 --quiet --no-pie --verbose-asm --fPIC --gen-c-macro-def --duplicate_asm_list=${OUT_ROOT}/target/product/public/lib/codetricks/asm/duplicateFunc.s --maplelinker --gsrc --nativeopt --replaceasm" - }, - global_option="--save-temps", - infile="${APP}.dex" - ), - Linker( - lib="host-x86_64-ZTERP", - model="arm64", - infile="${APP}" - ) - ], - "run": [ - Mplsh( - env={ - "USE_ZTERP": "true" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${CP}", - redirection="output.log" - ), - CheckFileEqual( - file1="output.log", - file2="expected.txt" - ), - Mplsh( - env={ - "USE_ZTERP": "true", - "MAPLE_REPORT_RC_LEAK": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${CP}", - redirection="leak.log" - ), - CheckRegContain( - reg="Total none-cycle root objects 0", - file="leak.log" - ), - Mplsh( - env={ - "USE_ZTERP": "true", - "MAPLE_VERIFY_RC": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${CP}", - redirection="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential early release", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects potential leak", - file="rcverify.log" - ), - CheckRegContain( - reg="[MS] [RC Verify] total 0 objects weak rc are wrong", - file="rcverify.log" - ) - ] -} diff --git a/testsuite/driver/src/mode/ZTERPRC.py b/testsuite/driver/src/mode/ZTERPRC.py deleted file mode 100644 index 3bbc98786b9e7564a4d1b40433647c2b3c53823f..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/ZTERPRC.py +++ /dev/null @@ -1,61 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -from api import * - -ZTERPRC = { - "compile": [ - Java2dex( - jar_file=[ - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-oj_intermediates/classes.jar", - "${OUT_ROOT}/target/product/public/third-party/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" - ], - outfile="${APP}.dex", - infile=["${APP}.java"] - ) - ], - "run": [ - Mplsh( - env={ - "MAPLE_REPORT_RC_LEAK": "1", - "PATTERN_FROM_BACKUP_TRACING": "1" - }, - qemu="/usr/bin/qemu-aarch64", - qemu_libc="/usr/aarch64-linux-gnu", - qemu_ld_lib=[ - "${OUT_ROOT}/target/product/maple_arm64/third-party", - "${OUT_ROOT}/target/product/maple_arm64/lib/host-x86_64-ZTERP", - "./" - ], - mplsh="${OUT_ROOT}/target/product/maple_arm64/bin/mplsh", - garbage_collection_kind="RC", - xbootclasspath="libcore-all.so", - infile="${APP}.dex", - redirection="cycle.log" - ), - CheckRegContain( - reg="ExpectResult", - file="cycle.log" - ), - CheckRegContain( - reg="Total Leak Count 0", - file="cycle.log" - ), - CheckRegContain( - choice="num", - reg="ExpectResult", - file="cycle.log" - ) - ] -} \ No newline at end of file diff --git a/testsuite/driver/src/mode/__init__.py b/testsuite/driver/src/mode/__init__.py deleted file mode 100644 index b18e0d9c3d2147a0eb8b738444eaaa730a3ae5b7..0000000000000000000000000000000000000000 --- a/testsuite/driver/src/mode/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -# -# Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. -# -# OpenArkCompiler is licensed under Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# -# http://license.coscl.org.cn/MulanPSL2 -# -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -# FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. -# - -import os - -mode_dict = {} -my_dir = os.path.dirname(__file__) -for py in os.listdir(my_dir): - if py == '__init__.py': - continue - - if py.endswith('.py'): - name = py[:-3] - mode = __import__(__name__, globals(), locals(), ['%s' % name]) - mode_dict[name] = getattr(getattr(mode, name), name) diff --git a/tools/setup_tools.sh b/tools/setup_tools.sh index 7c446484d181d7a0826230564187e5dbcafe7845..6ef7789f146fc3017aa1be637b553d26b114b1fb 100755 --- a/tools/setup_tools.sh +++ b/tools/setup_tools.sh @@ -191,13 +191,14 @@ else fi mkdir -p ${TOOL_BIN_PATH} -ln -s -f ${MAPLE_ROOT}/../ThirdParty/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-18.04 ${MAPLE_ROOT}/tools -ln -s -f ${MAPLE_ROOT}/../ThirdParty/llvm-12.0.0.src ${MAPLE_ROOT}/third_party/llvm-12.0.0.src -ln -s -f ${MAPLE_ROOT}/tools/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/clang++ ${TOOL_BIN_PATH}/clang++ -ln -s -f ${MAPLE_ROOT}/tools/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/clang ${TOOL_BIN_PATH}/clang -ln -s -f ${MAPLE_ROOT}/tools/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/llvm-ar ${TOOL_BIN_PATH}/llvm-ar -ln -s -f ${MAPLE_ROOT}/tools/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/llvm-ranlib ${TOOL_BIN_PATH}/llvm-ranlib -ln -s -f ${MAPLE_ROOT}/tools/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/FileCheck ${TOOL_BIN_PATH}/FileCheck +ln -s -f ${MAPLE_ROOT}/../ThirdParty/clang+llvm-15.0.4-x86_64-linux-gnu-ubuntu-18.04-enhanced ${MAPLE_ROOT}/tools +ln -s -f ${MAPLE_ROOT}/../ThirdParty/clang+llvm-15.0.4-x86_64-linux-gnu-ubuntu-18.04-pure ${MAPLE_ROOT}/tools +ln -s -f ${MAPLE_ROOT}/../ThirdParty/llvm-15.0.4.src ${MAPLE_ROOT}/third_party/llvm-15.0.4.src +ln -s -f ${MAPLE_ROOT}/tools/clang+llvm-15.0.4-x86_64-linux-gnu-ubuntu-18.04-pure/bin/clang++ ${TOOL_BIN_PATH}/clang++ +ln -s -f ${MAPLE_ROOT}/tools/clang+llvm-15.0.4-x86_64-linux-gnu-ubuntu-18.04-pure/bin/clang ${TOOL_BIN_PATH}/clang +ln -s -f ${MAPLE_ROOT}/tools/clang+llvm-15.0.4-x86_64-linux-gnu-ubuntu-18.04-pure/bin/llvm-ar ${TOOL_BIN_PATH}/llvm-ar +ln -s -f ${MAPLE_ROOT}/tools/clang+llvm-15.0.4-x86_64-linux-gnu-ubuntu-18.04-pure/bin/llvm-ranlib ${TOOL_BIN_PATH}/llvm-ranlib +ln -s -f ${MAPLE_ROOT}/tools/clang+llvm-15.0.4-x86_64-linux-gnu-ubuntu-18.04-pure/bin/FileCheck ${TOOL_BIN_PATH}/FileCheck ln -s -f ${MAPLE_ROOT}/tools/qemu/usr/bin/qemu-aarch64 ${TOOL_BIN_PATH}/qemu-aarch64 ln -s -f ${MAPLE_ROOT}/build/java2dex ${TOOL_BIN_PATH}/java2dex ln -s -f ${MAPLE_ROOT}/tools/r8-d81513/d8/lib ${MAPLE_ROOT}/tools/lib