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.
966 * Look up a method by it's method ID.
968 * Returns nullptr if no matching method was found.
1061 printf("Trace (threadID action usecs class.method signature):\n");
1099 MethodEntry* method = lookupMethod(pKeys, methodId);
1100 if (method == nullptr) {
1101 method = &bogusMethod;
1103 method->signature = bogusBuf;
1106 if (method->methodName) {
1109 spaces + (MAX_STACK_DEPTH - printDepth), method->className,
1110 method->methodName, method->signature);
1114 spaces + (MAX_STACK_DEPTH - printDepth), method->className);
1161 /* Find the child method in the parent */
1165 if (pTimed->method == child) {
1176 pTimed->method = child;
1183 /* Find the parent method in the child */
1186 if (pTimed->method == parent) {
1197 pTimed->method = parent;
1243 * method, depending on the list that is passed in.
1245 void printInclusiveMethod(MethodEntry* method, TimedMethod* list, int32_t numCalls, int32_t flags) {
1258 double methodTotal = method->elapsedInclusive;
1260 MethodEntry* relative = pTimed->method;
1303 void countRecursiveEntries(CallStack* pStack, int32_t top, MethodEntry* method) {
1304 method->recursiveEntries = 0;
1306 if (pStack->calls[ii].method == method) method->recursiveEntries += 1;
1312 MethodEntry* method = pStack->calls[ii].method;
1314 if (method->methodName) {
1316 method->className, method->methodName, method->signature);
1318 fprintf(stderr, " %2d: %8" PRIu64 " %s\n", ii, entryTime, method->className);
1329 printf(" <li><a href=\"#class\">Class/method profile</a></li>\n");
1330 printf(" <li><a href=\"#method\">Method/class profile</a></li>\n");
1339 printf("<a href=\"#method\">[Method]</a>\n");
1359 * elapsed time so that we can assign the method indices.
1372 printf("Exclusive elapsed times for each method, not including time spent in\n");
1378 printf(" Usecs self %% sum %% Method\n");
1383 MethodEntry* method = pMethods[ii];
1385 if (method->elapsedExclusive == 0) break;
1386 const char* className = method->className;
1387 const char* methodName = method->methodName;
1388 const char* signature = method->signature;
1389 sum += method->elapsedExclusive;
1390 double per = 100.0 * method->elapsedExclusive / total;
1393 sprintf(anchor_buf, "<a href=\"#m%d\">", method->index);
1398 if (method->methodName) {
1400 method->elapsedExclusive, per, sum_per, anchor_buf, method->index,
1404 method->elapsedExclusive, per, sum_per, anchor_buf, method->index,
1413 /* check to make sure that the child method meets the threshold of the parent */
1421 void createLabels(FILE* file, MethodEntry* method) {
1424 method->index, method->index, method->className, method->methodName,
1425 method->elapsedInclusive / 1000, method->elapsedExclusive / 1000,
1426 method->numCalls[0]);
1428 method->graphState = GRAPH_LABEL_VISITED;
1430 for (TimedMethod* child = method->children[0]; child; child = child->next) {
1431 MethodEntry* childMethod = child->method;
1434 checkThreshold(method, childMethod)) {
1435 createLabels(file, child->method);
1440 void createLinks(FILE* file, MethodEntry* method) {
1441 method->graphState |= GRAPH_NODE_VISITED;
1443 for (TimedMethod* child = method->children[0]; child; child = child->next) {
1444 MethodEntry* childMethod = child->method;
1445 if (checkThreshold(method, child->method)) {
1446 fprintf(file, "node%d -> node%d\n", method->index, child->method->index);
1449 createLinks(file, child->method);
1503 printf("\nInclusive elapsed times for each method and its parents and children,\n");
1516 MethodEntry* method = pMethods[ii];
1518 if (method->elapsedInclusive == 0) break;
1520 const char* className = method->className;
1521 const char* methodName = method->methodName;
1522 const char* signature = method->signature;
1525 printf("<a name=\"m%d\"></a>", method->index);
1533 int32_t numCalls = method->numCalls[0] + method->numCalls[1];
1534 printInclusiveMethod(method, method->parents[0], numCalls, 0);
1535 if (method->parents[1]) {
1537 printInclusiveMethod(method, method->parents[1], numCalls, kIsRecursive);
1540 double per = 100.0 * method->elapsedInclusive / total;
1542 if (method->methodName) {
1544 per, "", "", method->numCalls[0], method->numCalls[1],
1545 method->elapsedInclusive, className, methodName, signature);
1548 "", method->numCalls[0], method->numCalls[1],
1549 method->elapsedInclusive, className);
1551 double excl_per = 100.0 * method->topExclusive / method->elapsedInclusive;
1553 "excl", "", "", method->topExclusive);
1556 printInclusiveMethod(method, method->children[0], 0, 0);
1557 if (method->children[1]) {
1559 printInclusiveMethod(method, method->children[1], 0, kIsRecursive);
1688 * in that class. Also sum the number of method calls. Also
1696 MethodEntry* method = pClass->methods[jj];
1697 pClass->elapsedExclusive += method->elapsedExclusive;
1698 pClass->numCalls[0] += method->numCalls[0];
1699 pClass->numCalls[1] += method->numCalls[1];
1772 MethodEntry* method = pClass->methods[jj];
1773 const char* methodName = method->methodName;
1774 const char* signature = method->signature;
1775 per = 100.0 * method->elapsedExclusive / classExclusive;
1776 sumMethods += method->elapsedExclusive;
1784 sprintf(buf, "%" PRIu64, method->elapsedExclusive);
1787 sprintf(buf, "%" PRIu64, method->elapsedInclusive);
1796 sprintf(buf, "%d", method->numCalls[0]);
1799 sprintf(buf, "%d", method->numCalls[1]);
1802 printf("<a href=\"#m%d\">[%d]</a>&nbsp;%s&nbsp;%s", method->index,
1803 method->index, methodName, signature);
1807 method->elapsedExclusive, method->elapsedInclusive, per, sum_per,
1808 method->numCalls[0], method->numCalls[1], method->index,
1819 /* Sort the methods into alphabetical order of method names
1820 * to find the unique method names.
1824 /* Count the number of unique method names, ignoring class and signature. */
1857 /* Create the array of MethodEntry pointers for each unique method */
1884 printf("<a name=\"method\"></a>\n");
1891 printf("\nExclusive elapsed time for each method, summed over all the classes\n");
1892 printf("that contain a method with the same name.\n\n");
1897 /* For each unique method, sum the exclusive times in all of the methods
1898 * with the same name. Also sum the number of method calls. Also
1905 MethodEntry* method = pUnique->methods[jj];
1906 pUnique->elapsedExclusive += method->elapsedExclusive;
1907 pUnique->numCalls[0] += method->numCalls[0];
1908 pUnique->numCalls[1] += method->numCalls[1];
1928 printf("Cycles %%/total Cumul.%% &nbsp;Calls+Recur&nbsp; Method</div>\n");
1930 printf(" Cycles %%/total Cumul.%% Calls+Recur Method\n");
1982 MethodEntry* method = pUnique->methods[jj];
1983 const char* className = method->className;
1984 const char* signature = method->signature;
1985 per = 100.0 * method->elapsedExclusive / methodExclusive;
1986 sumMethods += method->elapsedExclusive;
1994 sprintf(buf, "%" PRIu64, method->elapsedExclusive);
1997 sprintf(buf, "%" PRIu64, method->elapsedInclusive);
2006 sprintf(buf, "%d", method->numCalls[0]);
2009 sprintf(buf, "%d", method->numCalls[1]);
2012 printf("<a href=\"#m%d\">[%d]</a>&nbsp;%s.%s&nbsp;%s", method->index,
2013 method->index, className, methodName, signature);
2017 method->elapsedExclusive, method->elapsedInclusive, per, sum_per,
2018 method->numCalls[0], method->numCalls[1], method->index,
2077 /* Lookup the current method */
2078 MethodEntry* method = lookupMethod(dataKeys, methodId);
2079 if (method == nullptr) method = &dataKeys->methods[UNKNOWN_INDEX];
2082 if (method->methodName) {
2085 method->recursiveEntries,
2086 pStack->top, method->className, method->methodName,
2087 method->signature);
2091 method->recursiveEntries,
2092 pStack->top, method->className);
2097 /* This is a method entry */
2104 /* Get the caller method */
2106 caller = pStack->calls[pStack->top - 1].method;
2122 /* Push the method on the stack for this thread */
2123 pStack->calls[pStack->top].method = method;
2126 /* This is a method exit */
2129 /* Pop the method off the stack for this thread */
2133 if (method != pStack->calls[pStack->top].method) {
2134 if (method->methodName) {
2135 fprintf(stderr, "Exit from method %s.%s %s does not match stack:\n",
2136 method->className, method->methodName, method->signature);
2138 fprintf(stderr, "Exit from method %s does not match stack:\n",
2139 method->className);
2146 /* Get the caller method */
2148 caller = pStack->calls[pStack->top - 1].method;
2152 countRecursiveEntries(pStack, pStack->top, method);
2154 addInclusiveTime(caller, method, elapsed);
2155 method->elapsedExclusive += currentTime - pStack->lastEventTime;
2156 if (method->recursiveEntries == 0) {
2157 method->topExclusive += currentTime - pStack->lastEventTime;
2182 caller = pStack->calls[ii - 1].method;
2183 MethodEntry* method = pStack->calls[ii].method;
2185 countRecursiveEntries(pStack, ii, method);
2189 addInclusiveTime(caller, method, elapsed);
2265 MethodEntry* method = methods[i];
2267 if (method != nullptr && !compareMethodNamesForDiff(&method, &matchThis)) {
2269 // method->className, method->methodName);
2272 // if (!compareMethodNames(&method, &matchThis)) return i;
2305 void printMissingMethod(MethodEntry* method) {
2309 char* className = htmlEscape(method->className, classBuf, HTML_BUFSIZE);
2310 char* methodName = htmlEscape(method->methodName, methodBuf, HTML_BUFSIZE);
2317 printf("%" PRIu64 " ", method->elapsedExclusive);
2320 printf("%" PRIu64 " ", method->elapsedInclusive);
2323 printf("%d\n", method->numCalls[0]);