Chromium Code Reviews| Index: src/sampler.h |
| diff --git a/src/sampler.h b/src/sampler.h |
| index fe94a02e9350d1437d5ac63fc22a03f8989f6758..80fe5a978a83018d06951407c02a20116bef1c32 100644 |
| --- a/src/sampler.h |
| +++ b/src/sampler.h |
| @@ -44,10 +44,11 @@ struct TickSample { |
| Address tos; // Top stack value (*sp). |
| Address external_callback; |
| }; |
| - static const int kMaxFramesCount = 64; |
| + static const unsigned kMaxFramesCountLog2 = 8; |
| + static const unsigned kMaxFramesCount = (1 << kMaxFramesCountLog2) - 1; |
|
loislo
2014/06/24 13:09:21
why do you have -1 here?
alph
2014/06/24 13:21:54
the max value that can be stored in frames_count i
|
| Address stack[kMaxFramesCount]; // Call stack. |
| TimeTicks timestamp; |
| - int frames_count : 8; // Number of captured frames. |
| + unsigned frames_count : kMaxFramesCountLog2; // Number of captured frames. |
|
Jakob Kummerow
2014/06/24 13:54:37
I'm not sure this will work. IIRC we've had an iss
alph
2014/06/24 14:10:23
MSVC is noisy about implicit signed/unsigned conve
|
| bool has_external_callback : 1; |
| StackFrame::Type top_frame_type : 4; |
| }; |