Home
last modified time | relevance | path

Searched refs:self (Results 1 – 25 of 423) 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.py82 def __init__(self, name, is_dir, is_exec, is_symlink, size): argument
83 self.name = name
84 self.is_dir = is_dir
85 self.is_exec = is_exec
86 self.is_symlink = is_symlink
87 self.size = size
89 def __str__(self): argument
91 % (self.name, self.is_dir, self.is_exec, self.is_symlink, self.size)
93 def type_descr(self): argument
94 if self.is_dir:
[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/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()
28 self.read_barrier_type = "none"
30 def set_isa_features(self, features): argument
31 self.instruction_set_features = ImmutableDict(features)
33 def set_read_barrier_type(self, read_barrier_type): argument
34 self.read_barrier_type = read_barrier_type
[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/
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/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/
Dthread_test.cc34 Thread* self = Thread::Current(); in TEST_F() local
37 MutexLock mu(self, *Locks::thread_list_lock_); in TEST_F()
38 self->NotifyOnThreadExit(&tefs[2]); in TEST_F()
39 ASSERT_TRUE(self->IsRegistered(&tefs[2])); in TEST_F()
41 ASSERT_FALSE(self->IsRegistered(&tefs[1])); in TEST_F()
42 self->NotifyOnThreadExit(&tefs[1]); in TEST_F()
43 self->NotifyOnThreadExit(&tefs[0]); in TEST_F()
44 ASSERT_TRUE(self->IsRegistered(&tefs[0])); in TEST_F()
45 ASSERT_TRUE(self->IsRegistered(&tefs[1])); in TEST_F()
46 ASSERT_TRUE(self->IsRegistered(&tefs[2])); in TEST_F()
[all …]
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
69 thread_pool->AddTask(self, new CountTask(&count)); in TEST_F()
71 thread_pool->StartWorkers(self); in TEST_F()
73 thread_pool->Wait(self, true, false); in TEST_F()
79 Thread* self = Thread::Current(); in TEST_F() local
85 thread_pool->AddTask(self, new CountTask(&count)); in TEST_F()
91 thread_pool->StartWorkers(self); in TEST_F()
93 thread_pool->StopWorkers(self); in TEST_F()
[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::IncrementNoWait(Thread* self) { in IncrementNoWait() argument
44 MutexLock mu(self, *GetLock()); in IncrementNoWait()
45 SetCountLocked(self, count_ + 1); in IncrementNoWait()
48 void Barrier::Wait(Thread* self) { in Wait() argument
49 Increment(self, -1); in Wait()
[all …]
Dmonitor_test.cc71 void Run(Thread* self) override { in Run() argument
72 ScopedObjectAccess soa(self); in Run()
73 StackHandleScope<1u> hs(self); in Run()
76 monitor_test_->thread_ = self; // Pass the Thread. in Run()
77 obj->MonitorEnter(self); // Lock the object. This should transition in Run()
83 obj->MonitorExit(self); // To appease analysis. in Run()
95 obj->MonitorExit(self); // To appease analysis. in Run()
102 ScopedThreadSuspension sts(self, ThreadState::kSuspended); in Run()
103 monitor_test_->barrier_->Wait(self); // Let the other thread know we're done. in Run()
110 Monitor::Wait(self, obj.Get(), millis_, 0, true, ThreadState::kTimedWaiting); in Run()
[all …]
Dthread_list.cc93 Thread* self = Thread::Current(); in ShutDown() local
95 MutexLock mu(self, *Locks::thread_list_lock_); in ShutDown()
96 contains = Contains(self); in ShutDown()
164 Thread* self = Thread::Current(); in DumpUnattachedThreads() local
172 MutexLock mu(self, *Locks::thread_list_lock_); in DumpUnattachedThreads()
203 Thread* self = Thread::Current(); in Run() local
204 CHECK(self != nullptr); in Run()
208 ScopedObjectAccess soa(self); in Run()
212 MutexLock mu(self, lock_); in Run()
217 barrier_.Pass(self); in Run()
[all …]
/art/runtime/base/
Dmutex-inl.h48 static inline pid_t SafeGetTid(const Thread* self) { in SafeGetTid() argument
49 if (self != nullptr) { in SafeGetTid()
50 return self->GetTid(); in SafeGetTid()
87 inline void BaseMutex::RegisterAsLocked(Thread* self, bool check) { in RegisterAsLocked() argument
88 if (UNLIKELY(self == nullptr)) { in RegisterAsLocked()
93 RegisterAsLockedImpl(self, level_, check); in RegisterAsLocked()
97 inline void BaseMutex::RegisterAsLockedImpl(Thread* self, LockLevel level, bool check) { in RegisterAsLockedImpl() argument
98 DCHECK(self != nullptr); in RegisterAsLockedImpl()
105 if (UNLIKELY(level == kThreadWaitLock) && self->GetHeldMutex(kThreadWaitLock) != nullptr) { in RegisterAsLockedImpl()
116 Locks::mutator_lock_->IsSharedHeld(self) && in RegisterAsLockedImpl()
[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/entrypoints/quick/
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 …]
Dquick_jni_entrypoints.cc35 kind(self->GetJniEnv()); \
41 extern "C" int artMethodExitHook(Thread* self,
67 extern "C" void artJniMethodStart(Thread* self) { in artJniMethodStart() argument
69 ArtMethod* native_method = *self->GetManagedStack()->GetTopQuickFrame(); in artJniMethodStart()
75 self->TransitionFromRunnableToSuspended(ThreadState::kNative); in artJniMethodStart()
78 static void PopLocalReferences(uint32_t saved_local_ref_cookie, Thread* self) in PopLocalReferences() argument
80 JNIEnvExt* env = self->GetJniEnv(); in PopLocalReferences()
90 artJniUnlockObject(mirror::Object* locked, Thread* self) NO_THREAD_SAFETY_ANALYSIS in artJniUnlockObject() argument
94 uintptr_t old_poison_object_cookie = kIsDebugBuild ? self->GetPoisonObjectCookie() : 0u; in artJniUnlockObject()
97 if (UNLIKELY(self->IsExceptionPending())) { in artJniUnlockObject()
[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