MCPcopy Create free account
hub / github.com/adny-code/fastgrind / push

Method push

include/fastgrind.h:1159–1175  ·  view source on GitHub ↗

@brief Push function name onto stack and update frame id hash. */

Source from the content-addressed store, hash-verified

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()

Callers 2

fastgrindMethod · 0.80
__cyg_profile_func_enterFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected