Home
last modified time | relevance | path

Searched refs:self (Results 1 – 25 of 402) sorted by relevance

12345678910>>...17

/art/tools/checker/match/
Dtest.py30 def create_test_statement(self, checker_string): argument
35 def try_match(self, checker_string, c1_string, var_state={}): argument
36 return match_lines(self.create_test_statement(checker_string),
40 def assertMatches(self, checker_string, c1_string, var_state={}): argument
41 self.assertIsNotNone(self.try_match(checker_string, c1_string, var_state))
43 def assertDoesNotMatch(self, checker_string, c1_string, var_state={}): argument
44 self.assertIsNone(self.try_match(checker_string, c1_string, var_state))
46 def test_TextAndWhitespace(self): argument
47 self.assertMatches("foo", "foo")
48 self.assertMatches("foo", " foo ")
[all …]
Dfile.py27 def __init__(self, statement, line_no, variables): argument
28 self.statement = statement
29 self.line_no = line_no
30 self.variables = variables
34 def __init__(self, msg, line_no): argument
35 self.msg = msg
36 self.line_no = line_no
69 def __init__(self): argument
70 self.stack = []
72 def can_execute(self): argument
[all …]
/art/tools/checker/file_format/checker/
Dtest.py29 def try_parse(self, string): argument
33 def assertParses(self, string): argument
34 check_file = self.try_parse(string)
35 self.assertEqual(len(check_file.test_cases), 1)
36 self.assertNotEqual(len(check_file.test_cases[0].statements), 0)
38 def assertIgnored(self, string): argument
39 check_file = self.try_parse(string)
40 self.assertEqual(len(check_file.test_cases), 1)
41 self.assertEqual(len(check_file.test_cases[0].statements), 0)
43 def assertInvalid(self, string): argument
[all …]
Dstruct.py25 def __init__(self, filename): argument
26 self.file_name = filename
27 self.test_cases = []
29 def add_test_case(self, new_test_case): argument
30 self.test_cases.append(new_test_case)
32 def test_cases_for_arch(self, target_arch): argument
33 return [t for t in self.test_cases if t.test_arch == target_arch]
35 def __eq__(self, other): argument
36 return isinstance(other, self.__class__) and self.test_cases == other.test_cases
41 def __init__(self, parent, name, start_line_no, test_arch=None, for_debuggable=False): argument
[all …]
/art/build/apex/
Dart_apex_test.py73 def __init__(self, name, is_dir, is_exec, is_symlink, size): argument
74 self.name = name
75 self.is_dir = is_dir
76 self.is_exec = is_exec
77 self.is_symlink = is_symlink
78 self.size = size
80 def __str__(self): argument
82 % (self.name, self.is_dir, self.is_exec, self.is_symlink, self.size)
86 def __init__(self, apex): argument
87 self._folder_cache = {}
[all …]
/art/tools/jfuzz/
Drun_jfuzz_test.py81 def description(self): argument
85 def id(self): argument
89 def output_file(self): argument
90 return self.id + '_out.txt'
93 def GetBisectionSearchArgs(self): argument
102 def CompileAndRunTest(self): argument
120 def __init__(self, dexer, debug_info): argument
127 self._dexer = dexer
128 self._debug_info = debug_info
130 def CompileOnHost(self): argument
[all …]
Drun_dex_fuzz_test.py43 def __init__(self, num_tests, num_inputs, device, dexer, debug_info): argument
53 self._num_tests = num_tests
54 self._num_inputs = num_inputs
55 self._device = device
56 self._save_dir = None
57 self._results_dir = None
58 self._dexfuzz_dir = None
59 self._inputs_dir = None
60 self._dexfuzz_env = None
61 self._dexer = dexer
[all …]
/art/test/971-iface-super/util-src/
Dgenerate_smali.py87 def __init__(self): argument
91 self.tests = set()
93 def get_expected(self): argument
97 all_tests = sorted(self.tests)
100 def add_test(self, ty): argument
104 self.tests.add(Func(ty))
106 def get_name(self): argument
112 def __str__(self): argument
116 all_tests = sorted(self.tests)
122 test_invoke += self.TEST_GROUP_INVOKE_TEMPLATE.format(test_name=t.get_name())
[all …]
/art/test/968-default-partial-compile-gen/util-src/
Dgenerate_smali.py87 def __init__(self): argument
91 self.tests = set()
93 def get_expected(self): argument
97 all_tests = sorted(self.tests)
100 def add_test(self, ty): argument
104 self.tests.add(Func(ty))
106 def get_name(self): argument
112 def __str__(self): argument
116 all_tests = sorted(self.tests)
122 test_invoke += self.TEST_GROUP_INVOKE_TEMPLATE.format(test_name=t.get_name())
[all …]
/art/tools/bisection_search/
Dbisection_test.py52 def setUp(self): argument
53 self.testable_mock = Mock(spec=Dex2OatWrapperTestable)
54 self.testable_mock.GetAllMethods.return_value = self._METHODS
55 self.testable_mock.GetAllPassesForMethod.return_value = self._PASSES
57 def MethodFailsForAllPasses(self, compiled_methods, run_passes=None): argument
58 return self._FAILING_METHOD not in compiled_methods
60 def MethodFailsForAPass(self, compiled_methods, run_passes=None): argument
61 return (self._FAILING_METHOD not in compiled_methods or
62 (run_passes is not None and self._FAILING_PASS not in run_passes))
64 def testNeverFails(self): argument
[all …]
/art/tools/checker/file_format/c1visualizer/
Dstruct.py23 def __init__(self, filename): argument
24 self.base_file_name = os.path.basename(filename)
25 self.full_file_name = filename
26 self.passes = []
27 self.instruction_set_features = ImmutableDict()
29 def set_isa_features(self, features): argument
30 self.instruction_set_features = ImmutableDict(features)
32 def add_pass(self, new_pass): argument
33 self.passes.append(new_pass)
35 def find_pass(self, name): argument
[all …]
/art/tools/
Dpylibdexfile.py55 def __init__(self, name): argument
56 self.name = name.strip()
57 self.arrays = name.count("[")
58 self.base_name = self.name if self.arrays == 0 else self.name[:-(
59 self.arrays * 2)]
61 def __repr__(self): argument
62 return self.name
65 def descriptor(self): argument
67 if self.base_name == "int":
68 return "[" * self.arrays + "I"
[all …]
/art/test/964-default-iface-init-gen/util-src/
Dgenerate_java.py66 def __init__(self): argument
70 self.tests = set()
72 def add_test(self, ty): argument
76 self.tests.add(Func(ty))
78 def get_expected(self): argument
82 all_tests = sorted(self.tests)
85 def get_name(self): argument
91 def __str__(self): argument
95 all_tests = sorted(self.tests)
101 test_invoke += self.TEST_GROUP_INVOKE_TEMPLATE.format(test_name=t.get_name())
[all …]
/art/test/970-iface-super-resolution-gen/util-src/
Dgenerate_smali.py86 def __init__(self): argument
90 self.tests = set()
92 def add_test(self, ty): argument
96 self.tests.add(Func(ty))
98 def get_expected(self): argument
102 all_tests = sorted(self.tests)
105 def initial_build_different(self): argument
108 def get_name(self): argument
114 def __str__(self): argument
118 all_tests = sorted(self.tests)
[all …]
/art/runtime/entrypoints/quick/
Dquick_jni_entrypoints.cc35 kind(self->GetJniEnv()); \
44 static inline void GoToRunnableFast(Thread* self) REQUIRES_SHARED(Locks::mutator_lock_);
47 Thread* self ATTRIBUTE_UNUSED) { in ReadBarrierJni()
63 extern uint32_t JniMethodFastStart(Thread* self) { in JniMethodFastStart() argument
64 JNIEnvExt* env = self->GetJniEnv(); in JniMethodFastStart()
70 ArtMethod* native_method = *self->GetManagedStack()->GetTopQuickFrame(); in JniMethodFastStart()
78 extern uint32_t JniMethodStart(Thread* self) { in JniMethodStart() argument
79 JNIEnvExt* env = self->GetJniEnv(); in JniMethodStart()
85 ArtMethod* native_method = *self->GetManagedStack()->GetTopQuickFrame(); in JniMethodStart()
90 self->TransitionFromRunnableToSuspended(kNative); in JniMethodStart()
[all …]
Dquick_throw_entrypoints.cc30 extern "C" NO_RETURN void artDeliverPendingExceptionFromCode(Thread* self) in artDeliverPendingExceptionFromCode() argument
32 ScopedQuickEntrypointChecks sqec(self); in artDeliverPendingExceptionFromCode()
33 self->QuickDeliverException(); in artDeliverPendingExceptionFromCode()
36 extern "C" NO_RETURN uint64_t artInvokeObsoleteMethod(ArtMethod* method, Thread* self) in artInvokeObsoleteMethod() argument
39 ScopedQuickEntrypointChecks sqec(self); in artInvokeObsoleteMethod()
42 self->QuickDeliverException(); in artInvokeObsoleteMethod()
46 extern "C" NO_RETURN void artDeliverExceptionFromCode(mirror::Throwable* exception, Thread* self) in artDeliverExceptionFromCode() argument
55 ScopedQuickEntrypointChecks sqec(self); in artDeliverExceptionFromCode()
57 self->ThrowNewException("Ljava/lang/NullPointerException;", nullptr); in artDeliverExceptionFromCode()
59 self->SetException(exception); in artDeliverExceptionFromCode()
[all …]
/art/tools/common/
Dcommon.py67 def symbol(self): argument
68 return self.name[0]
77 def __ge__(self, other): argument
78 if self.__class__ is other.__class__:
79 return self.value >= other.value
82 def __gt__(self, other): argument
83 if self.__class__ is other.__class__:
84 return self.value > other.value
87 def __le__(self, other): argument
88 if self.__class__ is other.__class__:
[all …]
/art/runtime/base/
Dmutex-inl.h51 static inline pid_t SafeGetTid(const Thread* self) { in SafeGetTid() argument
52 if (self != nullptr) { in SafeGetTid()
53 return self->GetTid(); in SafeGetTid()
91 inline void BaseMutex::RegisterAsLocked(Thread* self) { in RegisterAsLocked() argument
92 if (UNLIKELY(self == nullptr)) { in RegisterAsLocked()
102 if (UNLIKELY(level == kThreadWaitLock) && self->GetHeldMutex(kThreadWaitLock) != nullptr) { in RegisterAsLocked()
113 Locks::mutator_lock_->IsSharedHeld(self) && in RegisterAsLocked()
114 !Locks::mutator_lock_->IsExclusiveHeld(self)) { in RegisterAsLocked()
121 } else if (this == Locks::mutator_lock_ && self->GetHeldMutex(kTopLockLevel) != nullptr) { in RegisterAsLocked()
123 << "kTopLevelLock (" << self->GetHeldMutex(kTopLockLevel)->name_ << "held is " in RegisterAsLocked()
[all …]
Dmutex.h108 void RegisterAsLocked(Thread* self);
110 void RegisterAsUnlocked(Thread* self);
111 void CheckSafeToWait(Thread* self);
180 void ExclusiveLock(Thread* self) ACQUIRE();
181 void Lock(Thread* self) ACQUIRE() { ExclusiveLock(self); } in Lock() argument
184 bool ExclusiveTryLock(Thread* self) TRY_ACQUIRE(true);
185 bool TryLock(Thread* self) TRY_ACQUIRE(true) { return ExclusiveTryLock(self); } in TryLock() argument
187 bool ExclusiveTryLockWithSpinning(Thread* self) TRY_ACQUIRE(true);
190 void ExclusiveUnlock(Thread* self) RELEASE();
191 void Unlock(Thread* self) RELEASE() { ExclusiveUnlock(self); } in Unlock() argument
[all …]
/art/test/961-default-iface-resolution-gen/util-src/
Dgenerate_java.py69 def __init__(self): argument
73 self.tests = set()
75 def get_expected(self): argument
79 all_tests = sorted(self.tests)
82 def add_test(self, ty): argument
86 self.tests.add(Func(ty))
88 def get_name(self): argument
94 def __str__(self): argument
98 all_tests = sorted(self.tests)
104 test_invoke += self.TEST_GROUP_INVOKE_TEMPLATE.format(test_name=t.get_name())
[all …]
/art/runtime/
Dthread_pool_test.cc32 void Run(Thread* self) override { in Run() argument
34 LOG(INFO) << "Running: " << *self; in Run()
63 Thread* self = Thread::Current(); in TEST_F() local
68 thread_pool.AddTask(self, new CountTask(&count)); in TEST_F()
70 thread_pool.StartWorkers(self); in TEST_F()
72 thread_pool.Wait(self, true, false); in TEST_F()
78 Thread* self = Thread::Current(); in TEST_F() local
83 thread_pool.AddTask(self, new CountTask(&count)); in TEST_F()
89 thread_pool.StartWorkers(self); in TEST_F()
91 thread_pool.StopWorkers(self); in TEST_F()
[all …]
Dmonitor_test.cc66 void Run(Thread* self) override { in Run() argument
68 ScopedObjectAccess soa(self); in Run()
70 monitor_test_->thread_ = self; // Pass the Thread. in Run()
71 monitor_test_->object_.Get()->MonitorEnter(self); // Lock the object. This should transition in Run()
77 monitor_test_->object_.Get()->MonitorExit(self); // To appease analysis. in Run()
89 monitor_test_->object_.Get()->MonitorExit(self); // To appease analysis. in Run()
95 monitor_test_->barrier_->Wait(self); // Let the other thread know we're done. in Run()
98 ScopedObjectAccess soa(self); in Run()
104 Monitor::Wait(self, monitor_test_->object_.Get(), millis_, 0, true, in Run()
108 EXPECT_EQ(expected_, self->IsExceptionPending()); in Run()
[all …]
Dthread_list.cc95 Thread* self = Thread::Current(); in ShutDown() local
97 MutexLock mu(self, *Locks::thread_list_lock_); in ShutDown()
98 contains = Contains(self); in ShutDown()
167 Thread* self = Thread::Current(); in DumpUnattachedThreads() local
175 MutexLock mu(self, *Locks::thread_list_lock_); in DumpUnattachedThreads()
208 Thread* self = Thread::Current(); in Run() local
209 CHECK(self != nullptr); in Run()
212 ScopedObjectAccess soa(self); in Run()
217 MutexLock mu(self, *Locks::logging_lock_); in Run()
220 barrier_.Pass(self); in Run()
[all …]
Dbarrier.cc35 template void Barrier::Increment<Barrier::kAllowHoldingLocks>(Thread* self, int delta);
36 template void Barrier::Increment<Barrier::kDisallowHoldingLocks>(Thread* self, int delta);
38 void Barrier::Pass(Thread* self) { in Pass() argument
39 MutexLock mu(self, *GetLock()); in Pass()
40 SetCountLocked(self, count_ - 1); in Pass()
43 void Barrier::Wait(Thread* self) { in Wait() argument
44 Increment(self, -1); in Wait()
47 void Barrier::Init(Thread* self, int count) { in Init() argument
48 MutexLock mu(self, *GetLock()); in Init()
49 SetCountLocked(self, count); in Init()
[all …]
/art/test/utils/python/testgen/
Dmixins.py31 def get_name(self): argument
43 def get_file_name(self): argument
48 def get_file_extension(self): argument
64 def get_file_name(self): argument
65 return self.get_name() + ext
67 def get_file_extension(self): argument
94 def __lt__(self, other): argument
95 return self.get_name() < other.get_name()
97 def __gt__(self, other): argument
98 return self.get_name() > other.get_name()
[all …]

12345678910>>...17