Permalink
Browse files

Improve oprofile scripts.

Now support importing dumps and running reports using a simple script.
Eliminated some spurious errors and warnings in the oprofile tools
when profiling Android libraries.

Change-Id: I618cf6f8937a6ab5f45b3d45bdf860792b6bebbe
  • Loading branch information...
1 parent 6e67eb0 commit 220b7fffe31541dc33e8a9bb297128dd46567e74 @j9brown j9brown committed May 3, 2011
Showing with 341 additions and 64 deletions.
  1. +8 −0 libpp/locate_images.cpp
  2. +10 −0 libpp/op_header.cpp
  3. +323 −64 oprofile_android
@@ -185,6 +185,13 @@ string const extra_images::find_image_path(string const & image_name,
return fixup ? result[0] : image_name;
}
+#ifdef ANDROID
+ // On Android, we often have both stripped and unstripped versions of the same
+ // library in the image path. Choose the first one found instead of issuing a
+ // multiple match error.
+ error = image_ok;
+ return fixup ? result[0] : image_name;
+#else
// We can't get multiple result except if only one result is prefixed
// by archive_path or by root_path.
size_t count = 0;
@@ -212,6 +219,7 @@ string const extra_images::find_image_path(string const & image_name,
error = image_multiple_match;
return image_name;
+#endif
}
View
@@ -114,6 +114,12 @@ void check_mtime(string const & file, opd_header const & header)
} else {
static bool warned_already = false;
+#ifdef ANDROID
+ // Android symbol files may not have the same timestamp as the stripped
+ // files deployed to the device. Suppress spurious warnings.
+ if (file.find("/symbols/") == string::npos) {
+#endif
+
cerr << "warning: the last modified time of the binary file "
"does not match that of the sample file for " << file
<< "\n";
@@ -123,6 +129,10 @@ void check_mtime(string const & file, opd_header const & header)
"has been modified since the sample file was created.\n";
warned_already = true;
}
+
+#ifdef ANDROID
+ }
+#endif
}
}
Oops, something went wrong.

0 comments on commit 220b7ff

Please sign in to comment.