Home | History | Annotate | Download | only in dmtracedump

Lines Matching refs:method

99     "<th>Method</th>\n"
110 "<th>Method</th>\n"
142 struct MethodEntry* method;
161 * Entry from the method list.
179 int32_t graphState; /* used when graphing to see if this method has been visited before */
198 MethodEntry* method;
296 void initMethodEntry(MethodEntry* method, int64_t methodId, const char* className,
299 method->methodId = methodId;
300 method->className = className;
301 method->methodName = methodName;
302 method->signature = signature;
303 method->fileName = fileName;
304 method->lineNum = (lineNumStr != nullptr) ? atoi(lineNumStr) : -1;
305 method->elapsedExclusive = 0;
306 method->elapsedInclusive = 0;
307 method->topExclusive = 0;
308 method->recursiveInclusive = 0;
309 method->parents[0] = nullptr;
310 method->parents[1] = nullptr;
311 method->children[0] = nullptr;
312 method->children[1] = nullptr;
313 method->numCalls[0] = 0;
314 method->numCalls[1] = 0;
315 method->index = 0;
316 method->recursiveEntries = 0;
394 MethodEntry* methodA = timedA->method;
395 MethodEntry* methodB = timedB->method;
446 /* Break ties with the first method id. This is probably not
460 * MethodEntry pointers into alphabetical order by method name,
691 * Count the number of method entries (one per line).
699 /* Reserve an extra method at location 0 for the "toplevel" method,
700 * and another extra method for all other "unknown" methods.
726 fprintf(stderr, "ERROR: missing field on method line: '%s'\n", data);
735 fprintf(stderr, "ERROR: bad method ID '%s'\n", data);
740 // "class \t method \t signature"
805 * Sort the method list entries.
870 * end of the key section is, there is a pitfall. The method names and
871 * signatures in the method list contain pointers into the fileData area.
970 * Look up a method by it's method ID.
972 * Returns nullptr if no matching method was found.
1065 printf("Trace (threadID action usecs class.method signature):\n");
1103 MethodEntry* method = lookupMethod(pKeys, methodId);
1104 if (method == nullptr) {
1105 method = &bogusMethod;
1107 method->signature = bogusBuf;
1110 if (method->methodName) {
1113 spaces + (MAX_STACK_DEPTH - printDepth), method->className,
1114 method->methodName, method->signature);
1118 spaces + (MAX_STACK_DEPTH - printDepth), method->className);
1165 /* Find the child method in the parent */
1169 if (pTimed->method == child) {
1180 pTimed->method = child;
1187 /* Find the parent method in the child */
1190 if (pTimed->method == parent) {
1201 pTimed->method = parent;
1247 * method, depending on the list that is passed in.
1249 void printInclusiveMethod(MethodEntry* method, TimedMethod* list, int32_t numCalls, int32_t flags) {
1262 double methodTotal = method->elapsedInclusive;
1264 MethodEntry* relative = pTimed->method;
1307 void countRecursiveEntries(CallStack* pStack, int32_t top, MethodEntry* method) {
1308 method->recursiveEntries = 0;
1310 if (pStack->calls[ii].method == method) method->recursiveEntries += 1;
1316 MethodEntry* method = pStack->calls[ii].method;
1318 if (method->methodName) {
1320 method->className, method->methodName, method->signature);
1322 fprintf(stderr, " %2d: %8" PRIu64 " %s\n", ii, entryTime, method->className);
1333 printf(" <li><a href=\"#class\">Class/method profile</a></li>\n");
1334 printf(" <li><a href=\"#method\">Method/class profile</a></li>\n");
1343 printf("<a href=\"#method\">[Method]</a>\n");
1363 * elapsed time so that we can assign the method indices.
1376 printf("Exclusive elapsed times for each method, not including time spent in\n");
1382 printf(" Usecs self %% sum %% Method\n");
1387 MethodEntry* method = pMethods[ii];
1389 if (method->elapsedExclusive == 0) break;
1390 const char* className = method->className;
1391 const char* methodName = method->methodName;
1392 const char* signature = method->signature;
1393 sum += method->elapsedExclusive;
1394 double per = 100.0 * method->elapsedExclusive / total;
1397 sprintf(anchor_buf, "<a href=\"#m%d\">", method->index);
1402 if (method->methodName) {
1404 method->elapsedExclusive, per, sum_per, anchor_buf, method->index,
1408 method->elapsedExclusive, per, sum_per, anchor_buf, method->index,
1417 /* check to make sure that the child method meets the threshold of the parent */
1425 void createLabels(FILE* file, MethodEntry* method) {
1428 method->index, method->index, method->className, method->methodName,
1429 method->elapsedInclusive / 1000, method->elapsedExclusive / 1000,
1430 method->numCalls[0]);
1432 method->graphState = GRAPH_LABEL_VISITED;
1434 for (TimedMethod* child = method->children[0]; child; child = child->next) {
1435 MethodEntry* childMethod = child->method;
1438 checkThreshold(method, childMethod)) {
1439 createLabels(file, child->method);
1444 void createLinks(FILE* file, MethodEntry* method) {
1445 method->graphState |= GRAPH_NODE_VISITED;
1447 for (TimedMethod* child = method->children[0]; child; child = child->next) {
1448 MethodEntry* childMethod = child->method;
1449 if (checkThreshold(method, child->method)) {
1450 fprintf(file, "node%d -> node%d\n", method->index, child->method->index);
1453 createLinks(file, child->method);
1507 printf("\nInclusive elapsed times for each method and its parents and children,\n");
1520 MethodEntry* method = pMethods[ii];
1522 if (method->elapsedInclusive == 0) break;
1524 const char* className = method->className;
1525 const char* methodName = method->methodName;
1526 const char* signature = method->signature;
1529 printf("<a name=\"m%d\"></a>", method->index);
1537 int32_t numCalls = method->numCalls[0] + method->numCalls[1];
1538 printInclusiveMethod(method, method->parents[0], numCalls, 0);
1539 if (method->parents[1]) {
1541 printInclusiveMethod(method, method->parents[1], numCalls, kIsRecursive);
1544 double per = 100.0 * method->elapsedInclusive / total;
1546 if (method->methodName) {
1548 per, "", "", method->numCalls[0], method->numCalls[1],
1549 method->elapsedInclusive, className, methodName, signature);
1552 "", method->numCalls[0], method->numCalls[1],
1553 method->elapsedInclusive, className);
1555 double excl_per = 100.0 * method->topExclusive / method->elapsedInclusive;
1557 "excl", "", "", method->topExclusive);
1560 printInclusiveMethod(method, method->children[0], 0, 0);
1561 if (method->children[1]) {
1563 printInclusiveMethod(method, method->children[1], 0, kIsRecursive);
1692 * in that class. Also sum the number of method calls. Also
1700 MethodEntry* method = pClass->methods[jj];
1701 pClass->elapsedExclusive += method->elapsedExclusive;
1702 pClass->numCalls[0] += method->numCalls[0];
1703 pClass->numCalls[1] += method->numCalls[1];
1776 MethodEntry* method = pClass->methods[jj];
1777 const char* methodName = method->methodName;
1778 const char* signature = method->signature;
1779 per = 100.0 * method->elapsedExclusive / classExclusive;
1780 sumMethods += method->elapsedExclusive;
1788 sprintf(buf, "%" PRIu64, method->elapsedExclusive);
1791 sprintf(buf, "%" PRIu64, method->elapsedInclusive);
1800 sprintf(buf, "%d", method->numCalls[0]);
1803 sprintf(buf, "%d", method->numCalls[1]);
1806 printf("<a href=\"#m%d\">[%d]</a>&nbsp;%s&nbsp;%s", method->index,
1807 method->index, methodName, signature);
1811 method->elapsedExclusive, method->elapsedInclusive, per, sum_per,
1812 method->numCalls[0], method->numCalls[1], method->index,
1823 /* Sort the methods into alphabetical order of method names
1824 * to find the unique method names.
1828 /* Count the number of unique method names, ignoring class and signature. */
1861 /* Create the array of MethodEntry pointers for each unique method */
1888 printf("<a name=\"method\"></a>\n");
1895 printf("\nExclusive elapsed time for each method, summed over all the classes\n");
1896 printf("that contain a method with the same name.\n\n");
1901 /* For each unique method, sum the exclusive times in all of the methods
1902 * with the same name. Also sum the number of method calls. Also
1909 MethodEntry* method = pUnique->methods[jj];
1910 pUnique->elapsedExclusive += method->elapsedExclusive;
1911 pUnique->numCalls[0] += method->numCalls[0];
1912 pUnique->numCalls[1] += method->numCalls[1];
1932 printf("Cycles %%/total Cumul.%% &nbsp;Calls+Recur&nbsp; Method</div>\n");
1934 printf(" Cycles %%/total Cumul.%% Calls+Recur Method\n");
1986 MethodEntry* method = pUnique->methods[jj];
1987 const char* className = method->className;
1988 const char* signature = method->signature;
1989 per = 100.0 * method->elapsedExclusive / methodExclusive;
1990 sumMethods += method->elapsedExclusive;
1998 sprintf(buf, "%" PRIu64, method->elapsedExclusive);
2001 sprintf(buf, "%" PRIu64, method->elapsedInclusive);
2010 sprintf(buf, "%d", method->numCalls[0]);
2013 sprintf(buf, "%d", method->numCalls[1]);
2016 printf("<a href=\"#m%d\">[%d]</a>&nbsp;%s.%s&nbsp;%s", method->index,
2017 method->index, className, methodName, signature);
2021 method->elapsedExclusive, method->elapsedInclusive, per, sum_per,
2022 method->numCalls[0], method->numCalls[1], method->index,
2081 /* Lookup the current method */
2082 MethodEntry* method = lookupMethod(dataKeys, methodId);
2083 if (method == nullptr) method = &dataKeys->methods[UNKNOWN_INDEX];
2086 if (method->methodName) {
2089 method->recursiveEntries,
2090 pStack->top, method->className, method->methodName,
2091 method->signature);
2095 method->recursiveEntries,
2096 pStack->top, method->className);
2101 /* This is a method entry */
2108 /* Get the caller method */
2110 caller = pStack->calls[pStack->top - 1].method;
2126 /* Push the method on the stack for this thread */
2127 pStack->calls[pStack->top].method = method;
2130 /* This is a method exit */
2133 /* Pop the method off the stack for this thread */
2137 if (method != pStack->calls[pStack->top].method) {
2138 if (method->methodName) {
2139 fprintf(stderr, "Exit from method %s.%s %s does not match stack:\n",
2140 method->className, method->methodName, method->signature);
2142 fprintf(stderr, "Exit from method %s does not match stack:\n",
2143 method->className);
2150 /* Get the caller method */
2152 caller = pStack->calls[pStack->top - 1].method;
2156 countRecursiveEntries(pStack, pStack->top, method);
2158 addInclusiveTime(caller, method, elapsed);
2159 method->elapsedExclusive += currentTime - pStack->lastEventTime;
2160 if (method->recursiveEntries == 0) {
2161 method->topExclusive += currentTime - pStack->lastEventTime;
2186 caller = pStack->calls[ii - 1].method;
2187 MethodEntry* method = pStack->calls[ii].method;
2189 countRecursiveEntries(pStack, ii, method);
2193 addInclusiveTime(caller, method, elapsed);
2269 MethodEntry* method = methods[i];
2271 if (method != nullptr && !compareMethodNamesForDiff(&method, &matchThis)) {
2273 // method->className, method->methodName);
2276 // if (!compareMethodNames(&method, &matchThis)) return i;
2309 void printMissingMethod(MethodEntry* method) {
2313 char* className = htmlEscape(method->className, classBuf, HTML_BUFSIZE);
2314 char* methodName = htmlEscape(method->methodName, methodBuf, HTML_BUFSIZE);
2321 printf("%" PRIu64 " ", method->elapsedExclusive);
2324 printf("%" PRIu64 " ", method->elapsedInclusive);
2327 printf("%d\n", method->numCalls[0]);