blob: 80914dbd219ccde07c0b07b980ce45aec26feb8d [file] [log] [blame]
Carl Shapiro1fb86202011-06-27 17:43:13 -07001// Copyright 2011 Google Inc. All Rights Reserved.
2
Brian Carlstrom578bbdc2011-07-21 14:07:47 -07003#include "runtime.h"
Carl Shapiro1fb86202011-06-27 17:43:13 -07004
Elliott Hughesffe67362011-07-17 12:09:27 -07005#include <cstdio>
6#include <cstdlib>
Brian Carlstrom8a436592011-08-15 21:27:23 -07007#include <limits>
Carl Shapiro2ed144c2011-07-26 16:52:08 -07008#include <vector>
Elliott Hughesffe67362011-07-17 12:09:27 -07009
Elliott Hughes18c07532011-08-18 15:50:51 -070010#include "JniConstants.h"
Brian Carlstrom578bbdc2011-07-21 14:07:47 -070011#include "class_linker.h"
12#include "heap.h"
Elliott Hughesc5f7c912011-08-18 14:00:42 -070013#include "jni_internal.h"
Carl Shapirofc322c72011-07-27 00:20:01 -070014#include "scoped_ptr.h"
Brian Carlstrom578bbdc2011-07-21 14:07:47 -070015#include "thread.h"
Carl Shapiro61e019d2011-07-14 16:53:09 -070016
Carl Shapiro1fb86202011-06-27 17:43:13 -070017namespace art {
18
Carl Shapiro2ed144c2011-07-26 16:52:08 -070019Runtime* Runtime::instance_ = NULL;
20
Carl Shapiro61e019d2011-07-14 16:53:09 -070021Runtime::~Runtime() {
Elliott Hughesc5f7c912011-08-18 14:00:42 -070022 // TODO: use smart pointers instead. (we'll need the pimpl idiom.)
Carl Shapiro61e019d2011-07-14 16:53:09 -070023 delete class_linker_;
Carl Shapiro69759ea2011-07-21 18:13:35 -070024 Heap::Destroy();
Carl Shapiro61e019d2011-07-14 16:53:09 -070025 delete thread_list_;
Elliott Hughesc5f7c912011-08-18 14:00:42 -070026 delete java_vm_;
Elliott Hughesc1674ed2011-08-25 18:09:09 -070027 Thread::Shutdown();
Carl Shapiro4acf4642011-07-26 18:54:13 -070028 // TODO: acquire a static mutex on Runtime to avoid racing.
Brian Carlstrom4a289ed2011-08-16 17:17:49 -070029 CHECK(instance_ == NULL || instance_ == this);
Carl Shapiro4acf4642011-07-26 18:54:13 -070030 instance_ = NULL;
Carl Shapiro61e019d2011-07-14 16:53:09 -070031}
32
Elliott Hughesffe67362011-07-17 12:09:27 -070033void Runtime::Abort(const char* file, int line) {
34 // Get any pending output out of the way.
35 fflush(NULL);
36
37 // Many people have difficulty distinguish aborts from crashes,
38 // so be explicit.
39 LogMessage(file, line, ERROR, -1).stream() << "Runtime aborting...";
40
Elliott Hughesffe67362011-07-17 12:09:27 -070041 // Perform any platform-specific pre-abort actions.
42 PlatformAbort(file, line);
43
Brian Carlstrom6ea095a2011-08-16 15:26:54 -070044 // use abort hook if we have one
45 if (Runtime::Current() != NULL && Runtime::Current()->abort_ != NULL) {
46 Runtime::Current()->abort_();
47 // notreached
48 }
49
Elliott Hughesffe67362011-07-17 12:09:27 -070050 // If we call abort(3) on a device, all threads in the process
Carl Shapiro69759ea2011-07-21 18:13:35 -070051 // receive SIGABRT. debuggerd dumps the stack trace of the main
52 // thread, whether or not that was the thread that failed. By
53 // stuffing a value into a bogus address, we cause a segmentation
Elliott Hughesffe67362011-07-17 12:09:27 -070054 // fault in the current thread, and get a useful log from debuggerd.
55 // We can also trivially tell the difference between a VM crash and
56 // a deliberate abort by looking at the fault address.
57 *reinterpret_cast<char*>(0xdeadd00d) = 38;
58 abort();
Elliott Hughesffe67362011-07-17 12:09:27 -070059 // notreached
60}
61
Brian Carlstrom6ea095a2011-08-16 15:26:54 -070062// Splits a C string using the given delimiter characters into a vector of
63// strings. Empty strings will be omitted.
64void Split(const char* str, const char* delim, std::vector<std::string>& vec) {
65 DCHECK(str != NULL);
66 DCHECK(delim != NULL);
67 scoped_ptr_malloc<char> tmp(strdup(str));
Carl Shapirofc322c72011-07-27 00:20:01 -070068 char* full = tmp.get();
69 char* p = full;
Carl Shapirod3c15752011-07-27 16:27:22 -070070 while (p != NULL) {
Brian Carlstrom6ea095a2011-08-16 15:26:54 -070071 p = strpbrk(full, delim);
Carl Shapirofc322c72011-07-27 00:20:01 -070072 if (p != NULL) {
73 p[0] = '\0';
74 }
75 if (full[0] != '\0') {
Brian Carlstrom6ea095a2011-08-16 15:26:54 -070076 vec.push_back(std::string(full));
Carl Shapirofc322c72011-07-27 00:20:01 -070077 }
Carl Shapirod3c15752011-07-27 16:27:22 -070078 if (p != NULL) {
Carl Shapirofc322c72011-07-27 00:20:01 -070079 full = p + 1;
80 }
81 }
82}
83
Brian Carlstrom6ea095a2011-08-16 15:26:54 -070084// Splits a colon delimited list of pathname elements into a vector of
85// strings. Empty strings will be omitted.
86void ParseClassPath(const char* class_path, std::vector<std::string>& vec) {
87 Split(class_path, ":", vec);
88}
Brian Carlstrom8a436592011-08-15 21:27:23 -070089
90// Parse a string of the form /[0-9]+[kKmMgG]?/, which is used to specify
91// memory sizes. [kK] indicates kilobytes, [mM] megabytes, and
92// [gG] gigabytes.
93//
94// "s" should point just past the "-Xm?" part of the string.
Brian Carlstrom8a436592011-08-15 21:27:23 -070095// "div" specifies a divisor, e.g. 1024 if the value must be a multiple
96// of 1024.
97//
98// The spec says the -Xmx and -Xms options must be multiples of 1024. It
99// doesn't say anything about -Xss.
100//
101// Returns 0 (a useless size) if "s" is malformed or specifies a low or
102// non-evenly-divisible value.
103//
104size_t ParseMemoryOption(const char *s, size_t div) {
105 // strtoul accepts a leading [+-], which we don't want,
106 // so make sure our string starts with a decimal digit.
107 if (isdigit(*s)) {
108 const char *s2;
109 size_t val = strtoul(s, (char **)&s2, 10);
110 if (s2 != s) {
111 // s2 should be pointing just after the number.
112 // If this is the end of the string, the user
113 // has specified a number of bytes. Otherwise,
114 // there should be exactly one more character
115 // that specifies a multiplier.
116 if (*s2 != '\0') {
Brian Carlstromf734cf52011-08-17 16:28:14 -0700117 // The remainder of the string is either a single multiplier
118 // character, or nothing to indicate that the value is in
119 // bytes.
120 char c = *s2++;
121 if (*s2 == '\0') {
122 size_t mul;
123 if (c == '\0') {
124 mul = 1;
125 } else if (c == 'k' || c == 'K') {
126 mul = KB;
127 } else if (c == 'm' || c == 'M') {
128 mul = MB;
129 } else if (c == 'g' || c == 'G') {
130 mul = GB;
Brian Carlstrom8a436592011-08-15 21:27:23 -0700131 } else {
Brian Carlstromf734cf52011-08-17 16:28:14 -0700132 // Unknown multiplier character.
Brian Carlstrom8a436592011-08-15 21:27:23 -0700133 return 0;
134 }
Brian Carlstromf734cf52011-08-17 16:28:14 -0700135
136 if (val <= std::numeric_limits<size_t>::max() / mul) {
137 val *= mul;
138 } else {
139 // Clamp to a multiple of 1024.
140 val = std::numeric_limits<size_t>::max() & ~(1024-1);
141 }
142 } else {
143 // There's more than one character after the numeric part.
144 return 0;
145 }
Brian Carlstrom8a436592011-08-15 21:27:23 -0700146 }
147 // The man page says that a -Xm value must be a multiple of 1024.
148 if (val % div == 0) {
149 return val;
150 }
Carl Shapirofc322c72011-07-27 00:20:01 -0700151 }
152 }
Brian Carlstrom8a436592011-08-15 21:27:23 -0700153 return 0;
Carl Shapirofc322c72011-07-27 00:20:01 -0700154}
155
Elliott Hughes0af55432011-08-17 18:37:28 -0700156void LoadJniLibrary(JavaVMExt* vm, const char* name) {
157 // TODO: OS_SHARED_LIB_FORMAT_STR
158 std::string mapped_name(StringPrintf("lib%s.so", name));
Elliott Hughes75770752011-08-24 17:52:38 -0700159 std::string reason;
160 if (!vm->LoadNativeLibrary(mapped_name, NULL, reason)) {
Elliott Hughes0af55432011-08-17 18:37:28 -0700161 LOG(FATAL) << "LoadNativeLibrary failed for \"" << mapped_name << "\": "
162 << reason;
163 }
164}
165
Elliott Hughes40ef99e2011-08-11 17:44:34 -0700166DexFile* Open(const std::string& filename) {
167 if (filename.size() < 4) {
168 LOG(WARNING) << "Ignoring short classpath entry '" << filename << "'";
169 return NULL;
170 }
171 std::string suffix(filename.substr(filename.size() - 4));
172 if (suffix == ".zip" || suffix == ".jar" || suffix == ".apk") {
173 return DexFile::OpenZip(filename);
174 } else {
175 return DexFile::OpenFile(filename);
176 }
177}
178
Brian Carlstrom8a436592011-08-15 21:27:23 -0700179void CreateBootClassPath(const char* boot_class_path_cstr,
Brian Carlstrom9ea1cb12011-08-24 23:18:18 -0700180 std::vector<const DexFile*>& boot_class_path_vector) {
Brian Carlstrom8a436592011-08-15 21:27:23 -0700181 CHECK(boot_class_path_cstr != NULL);
Carl Shapirofc322c72011-07-27 00:20:01 -0700182 std::vector<std::string> parsed;
Brian Carlstrom6ea095a2011-08-16 15:26:54 -0700183 ParseClassPath(boot_class_path_cstr, parsed);
Carl Shapirofc322c72011-07-27 00:20:01 -0700184 for (size_t i = 0; i < parsed.size(); ++i) {
Elliott Hughes40ef99e2011-08-11 17:44:34 -0700185 DexFile* dex_file = Open(parsed[i]);
Carl Shapirofc322c72011-07-27 00:20:01 -0700186 if (dex_file != NULL) {
Brian Carlstrom8a436592011-08-15 21:27:23 -0700187 boot_class_path_vector.push_back(dex_file);
Carl Shapirofc322c72011-07-27 00:20:01 -0700188 }
189 }
190}
191
Brian Carlstrom6ea095a2011-08-16 15:26:54 -0700192Runtime::ParsedOptions* Runtime::ParsedOptions::Create(const Options& options, bool ignore_unrecognized) {
193 scoped_ptr<ParsedOptions> parsed(new ParsedOptions());
Brian Carlstrom8a436592011-08-15 21:27:23 -0700194 const char* boot_class_path = getenv("BOOTCLASSPATH");
Brian Carlstrom6ea095a2011-08-16 15:26:54 -0700195 parsed->boot_image_ = NULL;
Elliott Hughes515a5bc2011-08-17 11:08:34 -0700196#ifdef NDEBUG
Elliott Hughes5174fe62011-08-23 15:12:35 -0700197 // -Xcheck:jni is off by default for regular builds...
Elliott Hughes515a5bc2011-08-17 11:08:34 -0700198 parsed->check_jni_ = false;
199#else
200 // ...but on by default in debug builds.
201 parsed->check_jni_ = true;
202#endif
Brian Carlstrom6ea095a2011-08-16 15:26:54 -0700203 parsed->heap_initial_size_ = Heap::kInitialSize;
204 parsed->heap_maximum_size_ = Heap::kMaximumSize;
Brian Carlstromf734cf52011-08-17 16:28:14 -0700205 parsed->stack_size_ = Thread::kDefaultStackSize;
206
Brian Carlstrom6ea095a2011-08-16 15:26:54 -0700207 parsed->hook_vfprintf_ = vfprintf;
208 parsed->hook_exit_ = exit;
209 parsed->hook_abort_ = abort;
Brian Carlstrom8a436592011-08-15 21:27:23 -0700210
211 for (size_t i = 0; i < options.size(); ++i) {
212 const StringPiece& option = options[i].first;
Brian Carlstrom8a436592011-08-15 21:27:23 -0700213 if (option.starts_with("-Xbootclasspath:")) {
214 boot_class_path = option.substr(strlen("-Xbootclasspath:")).data();
215 } else if (option == "bootclasspath") {
Brian Carlstromf734cf52011-08-17 16:28:14 -0700216 const void* dex_vector = options[i].second;
Brian Carlstrom9ea1cb12011-08-24 23:18:18 -0700217 const std::vector<const DexFile*>* v
218 = reinterpret_cast<const std::vector<const DexFile*>*>(dex_vector);
Brian Carlstromf734cf52011-08-17 16:28:14 -0700219 if (v == NULL) {
220 if (ignore_unrecognized) {
221 continue;
222 }
223 // TODO: usage
224 LOG(FATAL) << "Could not parse " << option;
225 return NULL;
226 }
227 parsed->boot_class_path_ = *v;
Brian Carlstrom8a436592011-08-15 21:27:23 -0700228 } else if (option.starts_with("-Xbootimage:")) {
Brian Carlstrom6ea095a2011-08-16 15:26:54 -0700229 parsed->boot_image_ = option.substr(strlen("-Xbootimage:")).data();
Elliott Hughes515a5bc2011-08-17 11:08:34 -0700230 } else if (option.starts_with("-Xcheck:jni")) {
231 parsed->check_jni_ = true;
Brian Carlstrom8a436592011-08-15 21:27:23 -0700232 } else if (option.starts_with("-Xms")) {
Brian Carlstromf734cf52011-08-17 16:28:14 -0700233 size_t size = ParseMemoryOption(option.substr(strlen("-Xms")).data(), 1024);
234 if (size == 0) {
235 if (ignore_unrecognized) {
236 continue;
237 }
Brian Carlstrom4a289ed2011-08-16 17:17:49 -0700238 // TODO: usage
Brian Carlstromf734cf52011-08-17 16:28:14 -0700239 LOG(FATAL) << "Could not parse " << option;
240 return NULL;
241 }
242 parsed->heap_initial_size_ = size;
Brian Carlstrom8a436592011-08-15 21:27:23 -0700243 } else if (option.starts_with("-Xmx")) {
Brian Carlstromf734cf52011-08-17 16:28:14 -0700244 size_t size = ParseMemoryOption(option.substr(strlen("-Xmx")).data(), 1024);
245 if (size == 0) {
246 if (ignore_unrecognized) {
247 continue;
248 }
Brian Carlstrom4a289ed2011-08-16 17:17:49 -0700249 // TODO: usage
Brian Carlstromf734cf52011-08-17 16:28:14 -0700250 LOG(FATAL) << "Could not parse " << option;
251 return NULL;
252 }
253 parsed->heap_maximum_size_ = size;
254 } else if (option.starts_with("-Xss")) {
255 size_t size = ParseMemoryOption(option.substr(strlen("-Xss")).data(), 1);
256 if (size == 0) {
257 if (ignore_unrecognized) {
258 continue;
259 }
Brian Carlstrom4a289ed2011-08-16 17:17:49 -0700260 // TODO: usage
Brian Carlstromf734cf52011-08-17 16:28:14 -0700261 LOG(FATAL) << "Could not parse " << option;
262 return NULL;
263 }
264 parsed->stack_size_ = size;
Brian Carlstrom6ea095a2011-08-16 15:26:54 -0700265 } else if (option.starts_with("-D")) {
266 parsed->properties_.push_back(option.substr(strlen("-D")).data());
267 } else if (option.starts_with("-verbose:")) {
Elliott Hughes0af55432011-08-17 18:37:28 -0700268 std::vector<std::string> verbose_options;
269 Split(option.substr(strlen("-verbose:")).data(), ",", verbose_options);
270 for (size_t i = 0; i < verbose_options.size(); ++i) {
271 parsed->verbose_.insert(verbose_options[i]);
272 }
Brian Carlstrom6ea095a2011-08-16 15:26:54 -0700273 } else if (option == "vfprintf") {
274 parsed->hook_vfprintf_ = reinterpret_cast<int (*)(FILE *, const char*, va_list)>(options[i].second);
275 } else if (option == "exit") {
276 parsed->hook_exit_ = reinterpret_cast<void(*)(jint)>(options[i].second);
277 } else if (option == "abort") {
278 parsed->hook_abort_ = reinterpret_cast<void(*)()>(options[i].second);
Brian Carlstrom8a436592011-08-15 21:27:23 -0700279 } else {
280 if (!ignore_unrecognized) {
Brian Carlstrom6ea095a2011-08-16 15:26:54 -0700281 // TODO: print usage via vfprintf
Brian Carlstrom8a436592011-08-15 21:27:23 -0700282 LOG(FATAL) << "Unrecognized option " << option;
Brian Carlstrom6ea095a2011-08-16 15:26:54 -0700283 return NULL;
Brian Carlstrom8a436592011-08-15 21:27:23 -0700284 }
285 }
286 }
287
288 if (boot_class_path == NULL) {
289 boot_class_path = "";
290 }
Brian Carlstrom6ea095a2011-08-16 15:26:54 -0700291 if (parsed->boot_class_path_.size() == 0) {
292 CreateBootClassPath(boot_class_path, parsed->boot_class_path_);
Brian Carlstrom8a436592011-08-15 21:27:23 -0700293 }
Brian Carlstrom6ea095a2011-08-16 15:26:54 -0700294 return parsed.release();
Carl Shapiro2ed144c2011-07-26 16:52:08 -0700295}
296
Brian Carlstrom8a436592011-08-15 21:27:23 -0700297Runtime* Runtime::Create(const std::vector<const DexFile*>& boot_class_path) {
298 Runtime::Options options;
299 options.push_back(std::make_pair("bootclasspath", &boot_class_path));
300 return Runtime::Create(options, false);
301}
302
303Runtime* Runtime::Create(const Options& options, bool ignore_unrecognized) {
Carl Shapiro2ed144c2011-07-26 16:52:08 -0700304 // TODO: acquire a static mutex on Runtime to avoid racing.
305 if (Runtime::instance_ != NULL) {
306 return NULL;
307 }
Carl Shapiro61e019d2011-07-14 16:53:09 -0700308 scoped_ptr<Runtime> runtime(new Runtime());
Brian Carlstrom8a436592011-08-15 21:27:23 -0700309 bool success = runtime->Init(options, ignore_unrecognized);
Carl Shapiro61e019d2011-07-14 16:53:09 -0700310 if (!success) {
311 return NULL;
Carl Shapiro61e019d2011-07-14 16:53:09 -0700312 }
Elliott Hughes0af55432011-08-17 18:37:28 -0700313 instance_ = runtime.release();
314
315 // Most JNI libraries can just use System.loadLibrary, but you can't
316 // if you're the library that implements System.loadLibrary!
Elliott Hughes18c07532011-08-18 15:50:51 -0700317 Thread* self = Thread::Current();
318 Thread::State old_state = self->GetState();
319 self->SetState(Thread::kNative);
320 JniConstants::init(self->GetJniEnv());
Elliott Hughes0af55432011-08-17 18:37:28 -0700321 LoadJniLibrary(instance_->GetJavaVM(), "javacore");
Elliott Hughes18c07532011-08-18 15:50:51 -0700322 self->SetState(old_state);
Elliott Hughes0af55432011-08-17 18:37:28 -0700323
324 return instance_;
Carl Shapiro61e019d2011-07-14 16:53:09 -0700325}
326
Elliott Hughes0af55432011-08-17 18:37:28 -0700327bool Runtime::Init(const Options& raw_options, bool ignore_unrecognized) {
Elliott Hughesc1674ed2011-08-25 18:09:09 -0700328 CHECK_EQ(sysconf(_SC_PAGE_SIZE), kPageSize);
Brian Carlstrom6ea095a2011-08-16 15:26:54 -0700329
Elliott Hughes0af55432011-08-17 18:37:28 -0700330 scoped_ptr<ParsedOptions> options(ParsedOptions::Create(raw_options, ignore_unrecognized));
331 if (options == NULL) {
Brian Carlstrom6ea095a2011-08-16 15:26:54 -0700332 return false;
333 }
Elliott Hughes0af55432011-08-17 18:37:28 -0700334 vfprintf_ = options->hook_vfprintf_;
335 exit_ = options->hook_exit_;
336 abort_ = options->hook_abort_;
Brian Carlstrom6ea095a2011-08-16 15:26:54 -0700337
Brian Carlstromb765be02011-08-17 23:54:10 -0700338 stack_size_ = options->stack_size_;
Carl Shapiro61e019d2011-07-14 16:53:09 -0700339 thread_list_ = ThreadList::Create();
Brian Carlstrom6ea095a2011-08-16 15:26:54 -0700340
Brian Carlstrom4a289ed2011-08-16 17:17:49 -0700341 if (!Heap::Init(options->heap_initial_size_,
342 options->heap_maximum_size_,
343 options->boot_image_)) {
344 return false;
345 }
Brian Carlstrom6ea095a2011-08-16 15:26:54 -0700346
Elliott Hughesc1674ed2011-08-25 18:09:09 -0700347 BlockSignals();
348
Elliott Hughes0af55432011-08-17 18:37:28 -0700349 bool verbose_jni = options->verbose_.find("jni") != options->verbose_.end();
Elliott Hughesc5f7c912011-08-18 14:00:42 -0700350 java_vm_ = new JavaVMExt(this, options->check_jni_, verbose_jni);
Elliott Hughes515a5bc2011-08-17 11:08:34 -0700351
Elliott Hughesc1674ed2011-08-25 18:09:09 -0700352 if (!Thread::Startup()) {
Brian Carlstrom4a289ed2011-08-16 17:17:49 -0700353 return false;
354 }
Elliott Hughes515a5bc2011-08-17 11:08:34 -0700355 Thread* current_thread = Thread::Attach(this);
Carl Shapiro61e019d2011-07-14 16:53:09 -0700356 thread_list_->Register(current_thread);
Brian Carlstrom6ea095a2011-08-16 15:26:54 -0700357
Brian Carlstroma663ea52011-08-19 23:33:41 -0700358 class_linker_ = ClassLinker::Create(options->boot_class_path_, Heap::GetBootSpace());
Brian Carlstrom6ea095a2011-08-16 15:26:54 -0700359
Carl Shapiro1fb86202011-06-27 17:43:13 -0700360 return true;
361}
362
Elliott Hughesc1674ed2011-08-25 18:09:09 -0700363void Runtime::BlockSignals() {
364 sigset_t sigset;
365 if (sigemptyset(&sigset) == -1) {
366 PLOG(FATAL) << "sigemptyset failed";
367 }
368 if (sigaddset(&sigset, SIGPIPE) == -1) {
369 PLOG(ERROR) << "sigaddset SIGPIPE failed";
370 }
371 // SIGQUIT is used to dump the runtime's state (including stack traces).
372 if (sigaddset(&sigset, SIGQUIT) == -1) {
373 PLOG(ERROR) << "sigaddset SIGQUIT failed";
374 }
375 // SIGUSR1 is used to initiate a heap dump.
376 if (sigaddset(&sigset, SIGUSR1) == -1) {
377 PLOG(ERROR) << "sigaddset SIGUSR1 failed";
378 }
379 CHECK_EQ(sigprocmask(SIG_BLOCK, &sigset, NULL), 0);
380}
381
Elliott Hughes75770752011-08-24 17:52:38 -0700382bool Runtime::AttachCurrentThread(const char* name, JNIEnv** penv, bool as_daemon) {
383 if (as_daemon) {
384 UNIMPLEMENTED(WARNING) << "TODO: do something different for daemon threads";
385 }
Elliott Hughes515a5bc2011-08-17 11:08:34 -0700386 return Thread::Attach(instance_) != NULL;
Carl Shapiro61e019d2011-07-14 16:53:09 -0700387}
388
Ian Rogersb033c752011-07-20 12:22:35 -0700389bool Runtime::DetachCurrentThread() {
Elliott Hughesc1674ed2011-08-25 18:09:09 -0700390 Thread* self = Thread::Current();
391 thread_list_->Unregister(self);
392 delete self;
Ian Rogersb033c752011-07-20 12:22:35 -0700393 return true;
Carl Shapiro1fb86202011-06-27 17:43:13 -0700394}
395
396} // namespace art