-static inline void do_profile (unsigned long pc)
-{
- if (prof_buffer && current->pid) {
- extern int _stext;
- pc -= (unsigned long) &_stext;
- pc >>= prof_shift;
- if (pc < prof_len)
- ++prof_buffer[pc];
- else
- /*
- * Don't ignore out-of-bounds PC values silently,
- * put them into the last histogram slot, so if
- * present, they will show up as a sharp peak.
- */
- ++prof_buffer[prof_len-1];
- }
-}
-