Add hprof. This code builds but is untested.
Change-Id: Ied6549ef903761447fb3d28cf28b8bbc76e5ef35
diff --git a/src/object.h b/src/object.h
index 1051985..46c30cd 100644
--- a/src/object.h
+++ b/src/object.h
@@ -396,7 +396,7 @@
void SetDeclaringClass(Class *new_declaring_class);
- const String* GetName() const;
+ String* GetName() const;
void SetName(String* new_name);
@@ -2501,7 +2501,13 @@
DISALLOW_IMPLICIT_CONSTRUCTORS(String);
};
-inline const String* Field::GetName() const {
+struct StringHashCode {
+ int32_t operator()(art::String* string) const {
+ return string->GetHashCode();
+ }
+};
+
+inline String* Field::GetName() const {
DCHECK(GetDeclaringClass()->IsLoaded() || GetDeclaringClass()->IsErroneous());
String* result = GetFieldObject<String*>(OFFSET_OF_OBJECT_MEMBER(Field, name_), false);
DCHECK(result != NULL);