diff options
author | Dean Michael Berris <dberris@google.com> | 2017-12-05 12:21:14 +0000 |
---|---|---|
committer | Dean Michael Berris <dberris@google.com> | 2017-12-05 12:21:14 +0000 |
commit | f44f47d33b128141ce54bdd095275154211661b0 (patch) | |
tree | 5b195fd0bb23cc9a573040d494365de1f2eaa019 /lib/builtins/fixunsxfsi.c | |
parent | faed8464752e5c9ff234c96f167dda4bc448e618 (diff) |
[XRay][compiler-rt] Implement XRay Basic Mode Filtering
Summary:
This change implements the basic mode filtering similar to what we do in
FDR mode. The implementation is slightly simpler in basic-mode filtering
because we have less details to remember, but the idea is the same. At a
high level, we do the following to decide when to filter function call
records:
- We maintain a per-thread "shadow stack" which keeps track of the
XRay instrumented functions we've encountered in a thread's
execution.
- We push an entry onto the stack when we enter an XRay instrumented
function, and note the CPU, TSC, and type of entry (whether we have
payload or not when entering).
- When we encounter an exit event, we determine whether the function
being exited is the same function we've entered recently, was
executing in the same CPU, and the delta of the recent TSC and the
recorded TSC at the top of the stack is less than the equivalent
amount of microseconds we're configured to ignore -- then we un-wind
the record offset an appropriate number of times (so we can
overwrite the records later).
We also support limiting the stack depth of the recorded functions,
so that we don't arbitrarily write deep function call stacks.
Reviewers: eizan, pelikan, kpw, dblaikie
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D40828
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@319762 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/builtins/fixunsxfsi.c')
0 files changed, 0 insertions, 0 deletions