Searched defs:dex (Results 1 - 18 of 18) sorted by relevance

/art/libdexfile/dex/
H A Ddex_file_tracking_registrar.h26 namespace dex { namespace in namespace:art
78 } // namespace dex
H A Ddex_file_types.h24 namespace dex { namespace in namespace:art
98 } // namespace dex
103 template<> struct hash<art::dex::StringIndex> {
104 size_t operator()(const art::dex::StringIndex& index) const {
109 template<> struct hash<art::dex::TypeIndex> {
110 size_t operator()(const art::dex::TypeIndex& index) const {
H A Ddex_file_tracking_registrar.cc24 // For dex tracking through poisoning. Note: Requires forcing sanitization. This is the reason for
37 namespace dex { namespace in namespace:art
40 // If true, poison dex files to track accesses.
271 } // namespace dex
H A Ddex_file.cc43 static_assert(sizeof(dex::StringIndex) == sizeof(uint32_t), "StringIndex size is wrong");
44 static_assert(std::is_trivially_copyable<dex::StringIndex>::value, "StringIndex not trivial");
45 static_assert(sizeof(dex::TypeIndex) == sizeof(uint16_t), "TypeIndex size is wrong");
46 static_assert(std::is_trivially_copyable<dex::TypeIndex>::value, "TypeIndex not trivial");
177 // Bad offset. The dex file verifier runs after this method and will reject the file.
184 // Overflow or out out of bounds. The dex file verifier runs after
206 const DexFile::ClassDef* DexFile::FindClassDef(dex::TypeIndex type_idx) const {
247 const dex::TypeIndex class_idx = GetIndexForTypeId(declaring_klass);
248 const dex::StringIndex name_idx = GetIndexForStringId(name);
249 const dex
797 namespace dex { namespace in namespace:art
[all...]
H A Ddex_file.h63 // Dex file is the API that exposes native dex files (ordinary dex files) and CompactDex.
64 // Originally, the dex file format used by ART was mostly the same as APKs. The only change was
66 // Since ART needs to support both native dex files and CompactDex files, the DexFile interface
70 // Number of bytes in the dex file magic.
109 // Decode the dex magic version
162 dex::StringIndex descriptor_idx_; // index into string_ids
170 dex::TypeIndex class_idx_; // index into type_ids_ array for defining class
171 dex::TypeIndex type_idx_; // index into type_ids_ array for field type
172 dex
1162 Signature(const DexFile* dex, const DexFile::ProtoId& proto) argument
[all...]
/art/test/1949-short-dex-file/src/art/
H A DTest1949.java26 // This dex file is specifically crafted to have exactly 4 methodIDs in it. They are (in order):
32 // In the transformed version of the dex file there is a new method. The new list of methodIDs is:
39 // This test tries to get the JIT to read out-of-bounds on the initial dex file by getting it to
40 // read the 5th method id of the new file (Lxyz/Transform;->foo()V) from the old dex file (which
45 // JIT will read an incorrect (but valid) method-id from the old-dex file. This is why the error
49 // method-type the jit uses dex-file information to keep track of.
52 * base64 encoded class/dex file for
79 * base64 encoded class/dex file for
118 private static ClassLoader CreateClassLoader(byte[] clz, byte[] dex) throws Exception { argument
123 return (ClassLoader)ctor.newInstance(ByteBuffer.wrap(dex), Test194
[all...]
/art/build/
H A DAndroid.common_test.mk111 # Create a build rule to create the dex file for a test.
112 # $(1): module prefix, e.g. art-test-dex
120 # then a multi-dex file is created passing main.list as the --main-dex-list
122 define build-art-test-dex
135 LOCAL_DX_FLAGS := --multi-dex --main-dex-list=$(LOCAL_PATH)/$(2)/main.list --minimal-main-dex
150 LOCAL_DX_FLAGS := --multi-dex --main-dex
[all...]
/art/runtime/
H A Ddex_reference_collection.h29 // Collection of dex references that is more memory efficient than a vector of <dex, index> pairs.
30 // Also allows quick lookups of all of the references for a single dex.
48 void AddReference(const DexFile* dex, IndexType index) { argument
49 GetOrInsertVector(dex)->push_back(index);
70 ALWAYS_INLINE IndexVector* GetOrInsertVector(const DexFile* dex) { argument
71 // Optimize for adding to same vector in succession, the cached dex file and vector aims to
73 if (UNLIKELY(current_dex_file_ != dex)) {
76 current_vector_ = &map_.emplace(dex, IndexVector(vector_allocator_)).first->second;
77 current_dex_file_ = dex;
[all...]
H A Dcommon_runtime_test.h31 #include "dex/art_dex_file_loader.h"
32 #include "dex/compact_dex_level.h"
104 // Gets the paths of the libcore dex files.
113 // Retuerns the filename for a test dex (i.e. XandY or ManyMethods).
135 EXPECT_EQ(dex_files.size(), 1u) << "Only one input dex is supported";
136 const std::unique_ptr<const DexFile>& dex = dex_files[0]; local
137 CHECK(dex->EnableWrite()) << "Failed to enable write";
138 DexFile* dex_file = const_cast<DexFile*>(dex.get());
141 if (!output_dex->WriteFully(dex->Begin(), dex
[all...]
H A Dclass_loader_context.cc24 #include "dex/art_dex_file_loader.h"
25 #include "dex/dex_file.h"
26 #include "dex/dex_file_loader.h"
60 // If the context does not own the dex/oat files release the unique pointers to
151 // ClasspathElem is the path of dex/jar/apk file.
154 // By default we load the dex files in a PathClassLoader.
186 // Opens requested class path files and appends them to opened_dex_files. If the dex files have
195 // Assume we can open all dex files. If not, we will set this to false as we go.
203 // Note that we try to open all dex files even if some fail.
205 // TODO(calin): Refine the dex openin
261 std::unique_ptr<const DexFile>& dex = info.opened_dex_files[k]; local
[all...]
H A Doat_file_assistant.cc34 #include "dex/art_dex_file_loader.h"
35 #include "dex/dex_file_loader.h"
101 CHECK(dex_location != nullptr) << "OatFileAssistant: null dex location";
133 LOG(WARNING) << "Failed to determine oat file name for dex location "
138 // Check if the dex directory is writable.
144 LOG(WARNING) << "Failed to determine dex file parent directory: " << dex_location_;
189 // Note the lock will only succeed for secondary dex files and in test
193 // The app does not have permissions to create locks next to its dex location
254 // The method doesn't use zip_fd_ and directly opens dex files at dex_locations_.
270 // - however, MakeUpToDate will not always succeed (e.g. for primary apks, or for dex file
425 std::string dex = DexFileLoader::GetMultiDexLocation(i, dex_location_.c_str()); local
454 std::string dex = DexFileLoader::GetMultiDexLocation(i, dex_location_.c_str()); local
916 std::string dex = DexFileLoader::GetMultiDexLocation(i, dex_location_.c_str()); local
[all...]
/art/compiler/debug/
H A Delf_symtab_writer.h26 #include "dex/dex_file-inl.h"
27 #include "dex/code_item_accessors.h"
43 // Magic name for .symtab symbols which enumerate dex files used
44 // by this ELF file (currently mmapped inside the .dex section).
103 // Add symbols for dex files.
105 auto dex = builder->GetDex(); local
107 uint64_t dex_address = dex->GetAddress() + it.first /* offset within the section */;
110 symtab->Add(dex_name, dex, dex_address, dex_file->Size(), STB_GLOBAL, STT_FUNC);
H A Delf_debug_line_writer.h27 #include "dex/dex_file-inl.h"
101 // Use stack maps to create mapping table from pc to dex.
109 const int32_t dex = stack_map.GetDexPc(encoding.stack_map.encoding); local
110 pc2dex_map.push_back({pc, dex});
161 const DexFile* dex = mi->dex_file; local
162 CodeItemDebugInfoAccessor accessor(*dex, mi->code_item, mi->dex_method_index);
164 if (!dex->DecodeDebugPositionInfo(debug_info_offset, PositionInfoCallback, &dex2line_map)) {
179 auto& dex_class_def = dex->GetClassDef(mi->class_def_index);
180 const char* source_file = dex->GetSourceFile(dex_class_def);
184 std::string class_name(dex
[all...]
H A Delf_debug_info_writer.h30 #include "dex/code_item_accessors-inl.h"
31 #include "dex/dex_file-inl.h"
32 #include "dex/dex_file.h"
61 names.push_back(mi->dex_file->StringDataByIdx(dex::StringIndex(id)));
165 const DexFile* dex = mi->dex_file; local
166 CodeItemDebugInfoAccessor accessor(*dex, mi->code_item, mi->dex_method_index);
167 const DexFile::MethodId& dex_method = dex->GetMethodId(mi->dex_method_index);
168 const DexFile::ProtoId& dex_proto = dex->GetMethodPrototype(dex_method);
169 const DexFile::TypeList* dex_params = dex->GetProtoParameters(dex_proto);
170 const char* dex_class_desc = dex
[all...]
/art/openjdkjvmti/
H A Dfixed_up_dex_file.cc34 #include "dex/dex_file-inl.h"
35 #include "dex/dex_file_loader.h"
36 #include "dex/dex_file_verifier.h"
40 #include "dex/compact_dex_level.h"
84 // The dex file isn't quickened since it is being used directly. We might still have hiddenapis
90 static void DCheckVerifyDexFile(const art::DexFile& dex) { argument
93 if (!art::DexFileVerifier::Verify(&dex,
94 dex.Begin(),
95 dex.Size(),
96 "FixedUpDexFile_Verification.dex",
[all...]
/art/libartbase/base/
H A Dlogging.h60 bool dex; // Some dex access output etc. member in struct:art::LogVerbosity
/art/tools/hiddenapi/
H A Dhiddenapi_test.cc21 #include "dex/art_dex_file_loader.h"
22 #include "dex/dex_file-inl.h"
55 std::unique_ptr<ZipEntry> jar_classes_dex(jar->Find("classes.dex", &error));
57 LOG(FATAL) << "Could not find classes.dex in test file " << GetTestDexFileName("HiddenApi")
61 LOG(FATAL) << "Could not extract classes.dex from test file "
69 argv_str.push_back("--dex=" + out_dex->GetFilename());
97 LOG(FATAL) << "Expected a standard dex file '" << file.GetFilename() << "'";
224 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
228 auto dex_file = RunHiddenApi(light_greylist, dark_greylist, blacklist, {}, &dex);
233 ScratchFile dex, light_greylis local
242 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
251 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
260 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
269 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
278 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
287 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
296 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
305 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
314 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
323 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
332 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
341 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
350 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
359 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
368 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
377 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
386 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
395 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
404 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
413 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
422 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
431 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
440 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
449 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
458 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
467 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
476 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
485 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
494 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
503 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
512 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
521 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
530 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
539 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
548 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
557 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
566 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
575 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
584 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
593 ScratchFile dex, light_greylist, dark_greylist, blacklist; local
[all...]
/art/compiler/driver/
H A Dcompiler_driver_test.cc29 #include "dex/dex_file.h"
30 #include "dex/dex_file_types.h"
107 // TODO: Update the test for hash-based dex cache arrays. Bug: 30627598
114 const DexFile& dex = *java_lang_dex_file_; local
115 ObjPtr<mirror::DexCache> dex_cache = class_linker_->FindDexCache(soa.Self(), dex);
116 EXPECT_EQ(dex.NumStringIds(), dex_cache->NumStrings());
118 const mirror::String* string = dex_cache->GetResolvedString(dex::StringIndex(i));
121 EXPECT_EQ(dex.NumTypeIds(), dex_cache->NumResolvedTypes());
123 mirror::Class* type = dex_cache->GetResolvedType(dex::TypeIndex(i));
125 << " " << dex
[all...]

Completed in 409 milliseconds