From bb0b53f58f11c628f077603b56077dfed1a18f11 Mon Sep 17 00:00:00 2001 From: Calin Juravle Date: Fri, 23 May 2014 17:33:29 +0100 Subject: Clean up the sampling profiler - rename variables/fields names to match the code style (use _underscore_names_) - extract common property parsing in utils.cc - fail to load profile file if any line is malformed - added ProfileFile to manage the profile data generate in the previous runs (replaces ProfileHelper and nests ProfileData) Bug: 12877748 Change-Id: Ie7bda30bfdeb7e78534c986615b0649eac12a97b --- runtime/utils.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'runtime/utils.h') diff --git a/runtime/utils.h b/runtime/utils.h index 4a9236a4de..0f9b22bad4 100644 --- a/runtime/utils.h +++ b/runtime/utils.h @@ -28,6 +28,10 @@ #include "instruction_set.h" #include "primitive.h" +#ifdef HAVE_ANDROID_OS +#include "cutils/properties.h" +#endif + namespace art { class DexFile; @@ -439,6 +443,10 @@ class VoidFunctor { } }; +// Returns the given property as a double or its default_value if the property string is not valid +// or the parsed value is outside the interval [min_value, max_value]. +double GetDoubleProperty(const char* property, double min_value, double max_value, double default_value); + } // namespace art #endif // ART_RUNTIME_UTILS_H_ -- cgit v1.2.3-59-g8ed1b