• Home
  • Raw
  • Download

Lines Matching +full:de +full:- +full:serialized

1 // SPDX-License-Identifier: GPL-2.0-only
4 * Simple profiling. Manages a direct-mapped profile hit count buffer,
9 * Scheduler profiling support, Arjan van de Ven and Ingo Molnar,
13 * Amortized hit count accounting via per-cpu open-addressed hashtables
71 prof_shift = clamp(par, 0, BITS_PER_LONG - 1); in profile_setup()
82 prof_shift = clamp(par, 0, BITS_PER_LONG - 1); in profile_setup()
90 prof_shift = clamp(par, 0, BITS_PER_LONG - 1); in profile_setup()
94 prof_shift = clamp(par, 0, BITS_PER_LONG - 1); in profile_setup()
111 prof_len = (_etext - _stext) >> prof_shift; in profile_init()
116 return -EINVAL; in profile_init()
122 return -ENOMEM; in profile_init()
140 return -ENOMEM; in profile_init()
180 int err = -EINVAL; in profile_event_register()
199 int err = -EINVAL; in profile_event_unregister()
218 * Each cpu has a pair of open-addressed hashtables for pending
221 * Flip requests are serialized by the profile_flip_mutex. The sole
227 * The open-addressed hashtables are indexed by profile buffer slot
242 * and was vaguely inspired by ppc64 firmware-supported inverted
246 * -- nyc
299 pc = min((pc - (unsigned long)_stext) >> prof_shift, prof_len - 1); in do_profile_hits()
300 i = primary = (pc & (NR_PROFILE_GRP - 1)) << PROFILE_GRPSHIFT; in do_profile_hits()
301 secondary = (~(pc << 1) & (NR_PROFILE_GRP - 1)) << PROFILE_GRPSHIFT; in do_profile_hits()
309 * We buffer the global profiler buffer into a per-CPU in do_profile_hits()
311 * NUMA-alien) accesses. The write-queue is self-coalescing: in do_profile_hits()
325 i = (i + secondary) & (NR_PROFILE_HIT - 1); in do_profile_hits()
329 * Add the current hit(s) and flush the write-queue out in do_profile_hits()
374 return -ENOMEM; in profile_prepare_cpu()
397 pc = ((unsigned long)__pc - (unsigned long)_stext) >> prof_shift; in do_profile_hits()
398 atomic_add(nr_hits, &prof_buffer[min(pc, prof_len - 1)]); in do_profile_hits()
442 return -ENOMEM; in prof_cpu_mask_proc_write()
484 if (count > (prof_len+1)*sizeof(unsigned int) - p) in read_profile()
485 count = (prof_len+1)*sizeof(unsigned int) - p; in read_profile()
490 return -EFAULT; in read_profile()
491 buf++; p++; count--; read++; in read_profile()
493 pnt = (char *)prof_buffer + p - sizeof(atomic_t); in read_profile()
495 return -EFAULT; in read_profile()
504 * Writing a 'profiling multiplier' value into it also re-sets the profiling
517 return -EFAULT; in write_profile()
520 return -EINVAL; in write_profile()