@brief Push function name onto stack and update frame id hash. */
| 1157 | |
| 1158 | /** @brief Push function name onto stack and update frame id hash. */ |
| 1159 | MEM_NO_INSTRUMENT void push(const char *v) |
| 1160 | { |
| 1161 | if (_offset >= __MEM_MAX_STACK_DEPTH) { |
| 1162 | static bool warned_stack = false; |
| 1163 | if (!warned_stack) { |
| 1164 | fprintf(stderr, "[FASTGRIND] WARNING: Call stack depth exceeded %d\n", __MEM_MAX_STACK_DEPTH); |
| 1165 | warned_stack = true; |
| 1166 | } |
| 1167 | |
| 1168 | return; |
| 1169 | } |
| 1170 | |
| 1171 | assert(_offset < __MEM_MAX_STACK_DEPTH); |
| 1172 | |
| 1173 | _stack[_offset++] = v; |
| 1174 | _stackId += size_t(v); |
| 1175 | } |
| 1176 | |
| 1177 | /** @brief Pop top of stack (must not be empty). */ |
| 1178 | MEM_NO_INSTRUMENT const char *pop() |
no outgoing calls
no test coverage detected