237 {
239
240 Append(original_pc_, original_fp_);
241
242 uword* pc =
reinterpret_cast<uword*
>(original_pc_);
245
246 uword gap = original_fp_ - original_sp_;
247 if (gap >= kMaxStep) {
248
249
250 counters_->incomplete_sample_fp_step.fetch_add(1);
251 return;
252 }
253
254 if (!ValidFramePointer(
fp)) {
255 counters_->incomplete_sample_fp_bounds.fetch_add(1);
256 return;
257 }
258
259 while (true) {
263
265 return;
266 }
267
268 if (
fp <= previous_fp) {
269
270 counters_->incomplete_sample_fp_step.fetch_add(1);
271 return;
272 }
273
274 gap =
fp - previous_fp;
275 if (gap >= kMaxStep) {
276
277 counters_->incomplete_sample_fp_step.fetch_add(1);
278 return;
279 }
280
281 if (!ValidFramePointer(
fp)) {
282
283 counters_->incomplete_sample_fp_bounds.fetch_add(1);
284 return;
285 }
286
287 const uword pc_value =
reinterpret_cast<uword>(pc);
288 if ((pc_value + 1) < pc_value) {
289
290
291
292
293
294 counters_->incomplete_sample_bad_pc.fetch_add(1);
295 return;
296 }
297
298
299 lower_bound_ =
reinterpret_cast<uword>(
fp);
300
302 return;
303 }
304 }
305 }
bool Append(uword pc, uword fp)
static intptr_t PageSize()