123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- #ifndef BASE_PROFILER_STACK_COPIER_H_
- #define BASE_PROFILER_STACK_COPIER_H_
- #include <stdint.h>
- #include "base/base_export.h"
- #include "base/profiler/register_context.h"
- #include "base/time/time.h"
- namespace base {
- class StackBuffer;
- class BASE_EXPORT StackCopier {
- public:
-
-
- class BASE_EXPORT Delegate {
- public:
- virtual ~Delegate() {}
-
-
-
-
-
-
- virtual void OnStackCopy() = 0;
- };
- virtual ~StackCopier();
-
-
-
-
- virtual bool CopyStack(StackBuffer* stack_buffer,
- uintptr_t* stack_top,
- TimeTicks* timestamp,
- RegisterContext* thread_context,
- Delegate* delegate) = 0;
- protected:
-
-
-
-
- static uintptr_t RewritePointerIfInOriginalStack(
- const uint8_t* original_stack_bottom,
- const uintptr_t* original_stack_top,
- const uint8_t* stack_copy_bottom,
- uintptr_t pointer);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- static const uint8_t* CopyStackContentsAndRewritePointers(
- const uint8_t* original_stack_bottom,
- const uintptr_t* original_stack_top,
- int platform_stack_alignment,
- uintptr_t* stack_buffer_bottom);
- };
- }
- #endif
|