namespace art { namespace dex { namespace tracking {
// Class for (un)poisoning various sections of Dex Files // // This class provides the means to log accesses only of sections whose // accesses are needed. All accesses are displayed as stack traces in // logcat. class DexFileTrackingRegistrar { public: explicit DexFileTrackingRegistrar(const DexFile* const dex_file)
: dex_file_(dex_file) {
}
// This function is where the functions below it are called to actually // poison sections. void SetDexSections();
// Uses data contained inside range_values_ to poison memory through the // memory tool. void SetCurrentRanges();
// Set of functions concerning Code Items of dex_file_ void SetAllCodeItemRegistration(bool should_poison); // Sets the insns_ section of all code items. void SetAllInsnsRegistration(bool should_poison); // This function finds the code item of a class based on class name. void SetCodeItemRegistration(constchar* class_name, bool should_poison); // Sets the size and offset information along with first instruction in insns_ // section of all code items. void SetAllCodeItemStartRegistration(bool should_poison);
// Set of functions concerning String Data Items of dex_file_ void SetAllStringDataRegistration(bool should_poison); // Sets the first byte of size value and data section of all string data // items. void SetAllStringDataStartRegistration(bool should_poison);
// Contains tuples of all ranges of memory that need to be explicitly // (un)poisoned by the memory tool.
std::deque<std::tuple<constvoid *, size_t, bool>> range_values_;
const DexFile* const dex_file_;
};
// This function is meant to called externally to use DexfileTrackingRegistrar void RegisterDexFile(const DexFile* dex_file);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.