Home | History | Annotate | Download | only in dmtracedump

Lines Matching refs:method

97     "<th>Method</th>\n"
108 "<th>Method</th>\n"
140 struct MethodEntry *method;
159 * Entry from the method list.
177 int graphState; /* used when graphing to see if this method has been visited before */
196 MethodEntry *method;
300 void initMethodEntry(MethodEntry *method, unsigned int methodId,
305 method->methodId = methodId;
306 method->className = className;
307 method->methodName = methodName;
308 method->signature = signature;
309 method->fileName = fileName;
310 method->lineNum = (lineNumStr != NULL) ? atoi(lineNumStr) : -1;
311 method->elapsedExclusive = 0;
312 method->elapsedInclusive = 0;
313 method->topExclusive = 0;
314 method->recursiveInclusive = 0;
315 method->parents[0] = NULL;
316 method->parents[1] = NULL;
317 method->children[0] = NULL;
318 method->children[1] = NULL;
319 method->numCalls[0] = 0;
320 method->numCalls[1] = 0;
321 method->index = 0;
322 method->recursiveEntries = 0;
423 MethodEntry *methodA = timedA->method;
424 MethodEntry *methodB = timedB->method;
487 /* Break ties with the first method id. This is probably not
503 * MethodEntry pointers into alphabetical order by method name,
781 * Count the number of method entries (one per line).
790 /* Reserve an extra method at location 0 for the "toplevel" method,
791 * and another extra method for all other "unknown" methods.
822 fprintf(stderr, "ERROR: missing field on method line: '%s'\n",
831 fprintf(stderr, "ERROR: bad method ID '%s'\n", data);
836 // "class \t method \t signature"
911 * Sort the method list entries.
1098 * Look up a method by it's method ID.
1100 * Returns NULL if no matching method was found.
1199 printf("Trace (threadID action usecs class.method signature):\n");
1202 MethodEntry* method;
1242 method = lookupMethod(pKeys, methodId);
1243 if (method == NULL) {
1244 method = &bogusMethod;
1246 method->signature = bogusBuf;
1249 if (method->methodName) {
1254 method->className, method->methodName, method->signature);
1260 method->className);
1314 /* Find the child method in the parent */
1317 if (pTimed->method == child) {
1328 pTimed->method = child;
1335 /* Find the parent method in the child */
1338 if (pTimed->method == parent) {
1349 pTimed->method = parent;
1400 * method, depending on the list that is passed in.
1402 void printInclusiveMethod(MethodEntry *method, TimedMethod *list, int numCalls,
1421 double methodTotal = method->elapsedInclusive;
1423 MethodEntry *relative = pTimed->method;
1481 void countRecursiveEntries(CallStack *pStack, int top, MethodEntry *method)
1485 method->recursiveEntries = 0;
1487 if (pStack->calls[ii].method == method)
1488 method->recursiveEntries += 1;
1497 MethodEntry *method = pStack->calls[ii].method;
1499 if (method->methodName) {
1501 method->className, method->methodName, method->signature);
1503 fprintf(stderr, " %2d: %8llu %s\n", ii, entryTime, method->className);
1515 printf(" <li><a href=\"#class\">Class/method profile</a></li>\n");
1516 printf(" <li><a href=\"#method\">Method/class profile</a></li>\n");
1526 printf("<a href=\"#method\">[Method]</a>\n");
1534 MethodEntry* method;
1553 * elapsed time so that we can assign the method indices.
1569 printf("Exclusive elapsed times for each method, not including time spent in\n");
1575 printf(" Usecs self %% sum %% Method\n");
1581 method = pMethods[ii];
1583 if (method->elapsedExclusive == 0)
1585 className = (char*)(method->className);
1586 methodName = (char*)(method->methodName);
1587 signature = (char*)(method->signature);
1588 sum += method->elapsedExclusive;
1589 per = 100.0 * method->elapsedExclusive / total;
1592 sprintf(anchor_buf, "<a href=\"#m%d\">", method->index);
1597 if (method->methodName) {
1599 method->elapsedExclusive, per, sum_per,
1600 anchor_buf, method->index, anchor_close,
1604 method->elapsedExclusive, per, sum_per,
1605 anchor_buf, method->index, anchor_close,
1614 /* check to make sure that the child method meets the threshold of the parent */
1623 void createLabels(FILE* file, MethodEntry* method)
1626 method->index, method->index, method->className, method->methodName,
1627 method->elapsedInclusive / 1000,
1628 method->elapsedExclusive / 1000,
1629 method->numCalls[0]);
1631 method->graphState = GRAPH_LABEL_VISITED;
1634 for (child = method->children[0] ; child ; child = child->next) {
1635 MethodEntry* childMethod = child->method;
1637 if ((childMethod->graphState & GRAPH_LABEL_VISITED) == 0 && checkThreshold(method, childMethod)) {
1638 createLabels(file, child->method);
1643 void createLinks(FILE* file, MethodEntry* method)
1645 method->graphState |= GRAPH_NODE_VISITED;
1648 for (child = method->children[0] ; child ; child = child->next) {
1649 MethodEntry* childMethod = child->method;
1650 if (checkThreshold(method, child->method)) {
1651 fprintf(file, "node%d -> node%d\n", method->index, child->method->index);
1654 createLinks(file, child->method);
1695 MethodEntry* method;
1717 printf("\nInclusive elapsed times for each method and its parents and children,\n");
1732 method = pMethods[ii];
1734 if (method->elapsedInclusive == 0)
1737 className = (char*)(method->className);
1738 methodName = (char*)(method->methodName);
1739 signature = (char*)(method->signature);
1742 printf("<a name=\"m%d\"></a>", method->index);
1750 int numCalls = method->numCalls[0] + method->numCalls[1];
1751 printInclusiveMethod(method, method->parents[0], numCalls, 0);
1752 if (method->parents[1]) {
1754 printInclusiveMethod(method, method->parents[1], numCalls,
1758 per = 100.0 * method->elapsedInclusive / total;
1760 if (method->methodName) {
1763 per, "", "", method->numCalls[0], method->numCalls[1],
1764 method->elapsedInclusive,
1769 per, "", "", method->numCalls[0], method->numCalls[1],
1770 method->elapsedInclusive,
1773 excl_per = 100.0 * method->topExclusive / method->elapsedInclusive;
1775 "", "", excl_per, "excl", "", "", method->topExclusive);
1778 printInclusiveMethod(method, method->children[0], 0, 0);
1779 if (method->children[1]) {
1781 printInclusiveMethod(method, method->children[1], 0,
1896 MethodEntry* method;
1925 * in that class. Also sum the number of method calls. Also
1933 method = pClass->methods[jj];
1934 pClass->elapsedExclusive += method->elapsedExclusive;
1935 pClass->numCalls[0] += method->numCalls[0];
1936 pClass->numCalls[1] += method->numCalls[1];
2010 method = pClass->methods[jj];
2011 methodName = (char*)(method->methodName);
2012 signature = (char*)(method->signature);
2013 per = 100.0 * method->elapsedExclusive / classExclusive;
2014 sumMethods += method->elapsedExclusive;
2022 sprintf(buf, "%llu", method->elapsedExclusive);
2025 sprintf(buf, "%llu", method->elapsedInclusive);
2034 sprintf(buf, "%d", method->numCalls[0]);
2037 sprintf(buf, "%d", method->numCalls[1]);
2041 method->index, method->index, methodName, signature);
2045 method->elapsedExclusive,
2046 method->elapsedInclusive,
2048 method->numCalls[0], method->numCalls[1],
2049 method->index, methodName, signature);
2062 /* Sort the methods into alphabetical order of method names
2063 * to find the unique method names.
2067 /* Count the number of unique method names, ignoring class and
2107 /* Create the array of MethodEntry pointers for each unique method */
2132 MethodEntry* method;
2142 printf("<a name=\"method\"></a>\n");
2149 printf("\nExclusive elapsed time for each method, summed over all the classes\n");
2150 method with the same name.\n\n");
2155 /* For each unique method, sum the exclusive times in all of the methods
2156 * with the same name. Also sum the number of method calls. Also
2163 method = pUnique->methods[jj];
2164 pUnique->elapsedExclusive += method->elapsedExclusive;
2165 pUnique->numCalls[0] += method->numCalls[0];
2166 pUnique->numCalls[1] += method->numCalls[1];
2189 printf("Cycles %%/total Cumul.%% &nbsp;Calls+Recur&nbsp; Method</div>\n");
2191 printf(" Cycles %%/total Cumul.%% Calls+Recur Method\n");
2241 method = pUnique->methods[jj];
2242 className = (char*)(method->className);
2243 signature = (char*)(method->signature);
2244 per = 100.0 * method->elapsedExclusive / methodExclusive;
2245 sumMethods += method->elapsedExclusive;
2253 sprintf(buf, "%llu", method->elapsedExclusive);
2256 sprintf(buf, "%llu", method->elapsedInclusive);
2265 sprintf(buf, "%d", method->numCalls[0]);
2268 sprintf(buf, "%d", method->numCalls[1]);
2272 method->index, method->index,
2277 method->elapsedExclusive,
2278 method->elapsedInclusive,
2280 method->numCalls[0], method->numCalls[1],
2281 method->index, className, methodName, signature);
2297 MethodEntry* method;
2344 /* Lookup the current method */
2345 method = lookupMethod(dataKeys, methodId);
2346 if (method == NULL)
2347 method = &dataKeys->methods[UNKNOWN_INDEX];
2350 if (method->methodName) {
2353 method->recursiveEntries,
2354 pStack->top, method->className, method->methodName,
2355 method->signature);
2359 method->recursiveEntries,
2360 pStack->top, method->className);
2365 /* This is a method entry */
2372 /* Get the caller method */
2374 caller = pStack->calls[pStack->top - 1].method;
2390 /* Push the method on the stack for this thread */
2391 pStack->calls[pStack->top].method = method;
2394 /* This is a method exit */
2397 /* Pop the method off the stack for this thread */
2401 if (method != pStack->calls[pStack->top].method) {
2402 if (method->methodName) {
2404 "Exit from method %s.%s %s does not match stack:\n",
2405 method->className, method->methodName,
2406 method->signature);
2409 "Exit from method %s does not match stack:\n",
2410 method->className);
2417 /* Get the caller method */
2419 caller = pStack->calls[pStack->top - 1].method;
2423 countRecursiveEntries(pStack, pStack->top, method);
2425 addInclusiveTime(caller, method, elapsed);
2426 method->elapsedExclusive += currentTime - pStack->lastEventTime;
2427 if (method->recursiveEntries == 0) {
2428 method->topExclusive += currentTime - pStack->lastEventTime;
2456 caller = pStack->calls[ii - 1].method;
2457 method = pStack->calls[ii].method;
2459 countRecursiveEntries(pStack, ii, method);
2463 addInclusiveTime(caller, method, elapsed);
2550 MethodEntry* method = methods[i];
2552 if (method != NULL && !compareMethodNamesForDiff(&method, &matchThis)) {
2554 // method->className, method->methodName);
2557 /* if (!compareMethodNames(&method, &matchThis)) {
2598 void printMissingMethod(MethodEntry* method)
2605 className = htmlEscape(method->className, classBuf, HTML_BUFSIZE);
2606 methodName = htmlEscape(method
2613 printf("%lld ", method->elapsedExclusive);
2616 printf("%lld ", method->elapsedInclusive);
2619 printf("%d\n", method->numCalls[0]);