Lines Matching refs:method
54 /** This method is in the call stack. */
56 /** VM is in this method. */
65 const Method* method; // 4 bytes
66 /** Sample counts for method divided by thread type and state. */
133 if (oldEntry.method != NULL) {
135 int start = hash(oldEntry.method) & newSet.mask;
137 while (newSet.entries[i].method != NULL) {
152 /** Increments counter for method in set. */
153 static void countMethod(SampleSet* set, const Method* method,
157 int start = hash(method) & set->mask;
162 if (entry->method == method) {
168 if (entry->method == NULL) {
171 entry->method = method;
179 countMethod(set, method, threadType, threadState,
230 const Method* method = saveArea->method;
231 // Count the method now. We'll validate later that it's a real Method*.
232 if (method != NULL) {
233 countMethod(set, method, threadType, threadState, methodState);
289 * Returns true if the method is in the given table.
291 static bool inTable(const Method* method, const Method* table,
297 const Method* last = table + (tableLength - 1);
300 return (char*) method >= (char*) table
301 && (char*) method <= (char*) last;
304 /** Entry in a hash of method counts by class. */
306 /** Decorated method count. */
309 /** Shortcut to methodCount->method->clazz. */
317 /** Next method in the same class. */
328 * Heurtistically guesses whether or not 'method' actually points to a Method
331 static bool isValidMethod(const Method* method) {
332 if (!dvmLinearAllocContains(method, sizeof(Method))) {
333 LOGW("Method* is not in linear allocation table.");
336 ClassObject* clazz = method->clazz;
338 LOGW("method->clazz doesn't point to an object at all.");
342 LOGW("method->clazz doesn't point to a ClassObject.");
347 if (!inTable(method, clazz->directMethods, clazz->directMethodCount)
348 && !inTable(method, clazz->virtualMethods,
350 LOGW("Method not found in associated ClassObject.");
354 // We're pretty sure at this point that we're looking at a real Method*.
355 // The only alternative is that 'method' points to the middle of a Method
358 // the address to ensure that the Method* is aligned as expected, but it's
374 * Compares class pointers from two method count wrappers. Used in the by-class
409 = strlen(wrapper->methodCount->method->name);
411 size += 2; // method name size
455 // Method count.
460 // Method entries.
462 // Method name.
463 writeString(offset, wrapper->methodCount->method->name,
481 // Go back and write method count.
503 * # of method entries (2 bytes)
507 * method name length (2 bytes)
508 * UTF-8 method name
517 * as calling method (2 bytes)
518 * as leaf method (2 bytes)
534 // Method count wrappers by class.
542 // Validate method pointers and index by class.
549 const Method* method = mc->method;
550 if (method != NULL && isValidMethod(method)) {
553 wrapper->clazz = mc->method->clazz;