Lines Matching refs:function
39 symbol_type *function; // the symbol for the function we entered
40 uint32_t addr; // return address when this function returns
57 void updateStack(BBEvent *event, symbol_type *function);
79 Action getAction(BBEvent *event, symbol_type *function);
80 void doMethodAction(BBEvent *event, symbol_type *function);
82 void doSimplePush(symbol_type *function, uint32_t addr,
85 void doPush(BBEvent *event, symbol_type *function);
86 void doPop(BBEvent *event, symbol_type *function, Action methodAction);
161 CallStack<FRAME, BASE>::updateStack(BBEvent *event, symbol_type *function)
164 // If this is an interpreted function, then use the native VM function
166 if (function->vm_sym != NULL)
167 function = function->vm_sym;
169 doMethodAction(event, function);
172 Action action = getAction(event, function);
176 && (function->region->flags & region_type::kIsKernelRegion) == 0) {
180 if (function->vm_sym != NULL) {
181 function = function->vm_sym;
182 function->vm_sym = NULL;
185 doPush(event, function);
187 doPop(event, function, NONE);
193 // Pop off the previous function first.
194 doPop(event, function, NONE);
196 doPop(event, function, POP);
198 doPush(event, function);
204 } else if (function->vm_sym != NULL) {
205 // This function is a Java method. Don't push or pop the
210 doPop(event, function, methodAction);
212 doPush(event, function);
217 // If the stack is now empty, then push the current function.
221 if (function->vm_sym != NULL) {
224 doSimplePush(function, 0, time, 0);
227 mPrevFunction = function;
247 CallStack<FRAME, BASE>::getAction(BBEvent *event, symbol_type *function)
252 // Compute the offset from the start of the function to this basic
254 offset = event->bb_addr - function->addr - function->region->base_addr;
283 // checking if we are in a different function because we otherwise
284 // we might be fooled into thinking this is a PUSH to a new function
286 // that just looks like a new function.
292 // If this basic block is in the same function as the last basic block,
294 // Exception 1: if the function calls itself (offset == 0) then we
295 // want to push this function.
296 // Exception 2: if the function returns to itself, then we want
297 // to pop this function. We detect this case by checking if the last
300 if (function == mPrevFunction) {
302 // If this is the beginning of the function and the previous
318 // We have to figure out if this new function is a call or a
322 // of a function, or if the instruction that took us there was
324 // function offset is non-zero and the previous instruction is a
333 // If the function offset is non-zero and the previous instruction
347 && (function->region->flags & kIsKernelRegion)) {
349 // user-mode basic block and function.
353 && ((function->region->flags & kIsKernelRegion) == 0)) {
360 // We are jumping into the middle of a function, so this is
361 // probably a return, not a function call. But look at the
375 if (function->flags & symbol_type::kIsVectorTable)
383 void CallStack<FRAME, BASE>::doPush(BBEvent *event, symbol_type *function)
412 if (function->vm_sym != NULL) {
419 if (function->flags & symbol_type::kIsVectorStart) {
426 // off before pushing on the new function. Also, change the
427 // return address for the new function to the return address
430 && (mFrames[mTop - 1].function->flags & symbol_type::kIsVectorTable)) {
437 // The following code handles the case where one function, F1,
438 // calls another function, F2, but the before F2 can start
441 // then returns to the called function. The problem is that
442 // this looks like a new function call to F2 from the kernel.
451 && ((function->region->flags & kIsKernelRegion) == 0)
484 if ((function->flags & symbol_type::kIsVectorStart) && mTop > 0)
487 // If the function being pushed is a Java method, then mark it on
491 if (function->vm_sym != NULL) {
494 doSimplePush(function, retAddr, time, flags);
498 void CallStack<FRAME, BASE>::doSimplePush(symbol_type *function, uint32_t addr,
509 mFrames[mTop].function = function;
552 void CallStack<FRAME, BASE>::doPop(BBEvent *event, symbol_type *function,
586 // again for a matching function.
590 // Compare the function with the one in the stack frame.
591 if (function == mFrames[stackLevel].function) {
592 // We found a matching function. We want to pop up to but not
595 if (allowMethodPop && function == mPrevFunction) {
631 // If we are emptying the stack, then add the current function
632 // on top. If the current function is the same as the top of
634 if (stackLevel == 0 && mFrames[0].function == function)
661 // the getAction() function) and now we can check to see if
663 // getAction() function to determine this.
666 && ((function->region->flags & kIsKernelRegion) == 0)) {
669 if (getAction(event, function) == POP) {
674 doPop(event, function, methodAction);
704 symbol_type *func = mFrames[stackLevel].function;
722 void CallStack<FRAME, BASE>::doMethodAction(BBEvent *event, symbol_type *function)
740 doSimplePush(function, 0, time, FRAME::kInterpreted);
743 doSimplePush(function, 0, time, FRAME::kStartNative);
765 uint32_t addr = mFrames[ii].function->addr;
766 addr += mFrames[ii].function->region->vstart;
771 mFrames[ii].function->name);