From: Peter Zijlstra Date: Tue, 26 Jan 2010 17:50:16 +0000 (+0100) Subject: perf: Reimplement frequency driven sampling X-Git-Tag: v2.6.34-rc1~197^2~103 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=abd50713944c8ea9e0af5b7bffa0aacae21cc91a;p=pandora-kernel.git perf: Reimplement frequency driven sampling There was a bug in the old period code that caused intel_pmu_enable_all() or native_write_msr_safe() to show up quite high in the profiles. In staring at that code it made my head hurt, so I rewrote it in a hopefully simpler fashion. Its now fully symetric between tick and overflow driven adjustments and uses less data to boot. The only complication is that it basically wants to do a u128 division. The code approximates that in a rather simple truncate until it fits fashion, taking care to balance the terms while truncating. This version does not generate that sampling artefact. Signed-off-by: Peter Zijlstra LKML-Reference: Cc: Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed