]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r266208: Speed up pmcstat by improving string hash
authoremaste <emaste@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 23 May 2014 17:46:00 +0000 (17:46 +0000)
committeremaste <emaste@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 23 May 2014 17:46:00 +0000 (17:46 +0000)
commitefcb42956887dcfef57aed07c43cc55547ffcd32
treec7a21d5b2af4d4b6e5afe344d322a3680e62de28
parent4d513d5fa4419ee546e7ab65f947c89a9d52fe76
MFC r266208: Speed up pmcstat by improving string hash

  In one case generating callgraph output from a 24MB system-wide sampling
  data file took 17.4 seconds on average.  Profiling showed pmcstat
  spending a lot of time in strcmp, due to hash collisions.

  Replacing the XOR-only hash with FNV-1a reduces the run time for my
  test by 40%.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266590 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
usr.sbin/pmcstat/pmcstat_log.c