https://github.com/torvalds/linux
Revision cdce6ac277a4a1aa5316cd0cdf30fff927433917 authored by Linus Torvalds on 20 December 2014, 21:42:57 UTC, committed by Linus Torvalds on 20 December 2014, 21:42:57 UTC
Pull SCSI update from James Bottomley:
 "This is a much shorter set of patches that were on the go but didn't
  make it in to the early pull request for the merge window.  It's
  really a set of bug fixes plus some final cleanup work on the new tag
  queue API"

* tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  storvsc: ring buffer failures may result in I/O freeze
  ipr: set scsi_level correctly for disk arrays
  ipr: add support for async scanning to speed up boot
  scsi_debug: fix missing "break;" in SDEBUG_UA_CAPACITY_CHANGED case
  scsi_debug: take sdebug_host_list_lock when changing capacity
  scsi_debug: improve driver description in Kconfig
  scsi_debug: fix compare and write errors
  qla2xxx: fix race in handling rport deletion during recovery causes panic
  scsi: blacklist RSOC for Microsoft iSCSI target devices
  scsi: fix random memory corruption with scsi-mq + T10 PI
  Revert "[SCSI] mpt3sas: Remove phys on topology change"
  Revert "[SCSI] mpt2sas: Remove phys on topology change."
  esas2r: Correct typos of "validate" in a comment
  fc: FCP_PTA_SIMPLE is 0
  ibmvfc: remove unused tag variable
  scsi: remove MSG_*_TAG defines
  scsi: remove scsi_set_tag_type
  scsi: remove scsi_get_tag_type
  scsi: never drop to untagged mode during queue ramp down
  scsi: remove ->change_queue_type method
2 parent s 5d6a546 + e617457
Raw File
Tip revision: cdce6ac277a4a1aa5316cd0cdf30fff927433917 authored by Linus Torvalds on 20 December 2014, 21:42:57 UTC
Merge tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Tip revision: cdce6ac
basic_profiling.txt
These instructions are deliberately very basic. If you want something clever,
go read the real docs ;-) Please don't add more stuff, but feel free to 
correct my mistakes ;-)    (mbligh@aracnet.com)
Thanks to John Levon, Dave Hansen, et al. for help writing this.

<test> is the thing you're trying to measure.
Make sure you have the correct System.map / vmlinux referenced!

It is probably easiest to use "make install" for linux and hack
/sbin/installkernel to copy vmlinux to /boot, in addition to vmlinuz,
config, System.map, which are usually installed by default.

Readprofile
-----------
A recent readprofile command is needed for 2.6, such as found in util-linux
2.12a, which can be downloaded from:

http://www.kernel.org/pub/linux/utils/util-linux/

Most distributions will ship it already.

Add "profile=2" to the kernel command line.

clear		readprofile -r
		<test>
dump output	readprofile -m /boot/System.map > captured_profile

Oprofile
--------

Get the source (see Changes for required version) from
http://oprofile.sourceforge.net/ and add "idle=poll" to the kernel command
line.

Configure with CONFIG_PROFILING=y and CONFIG_OPROFILE=y & reboot on new kernel

./configure --with-kernel-support
make install

For superior results, be sure to enable the local APIC. If opreport sees
a 0Hz CPU, APIC was not on. Be aware that idle=poll may mean a performance
penalty.

One time setup:
		opcontrol --setup --vmlinux=/boot/vmlinux

clear		opcontrol --reset
start		opcontrol --start
		<test>
stop		opcontrol --stop
dump output	opreport >  output_file

To only report on the kernel, run opreport -l /boot/vmlinux > output_file

A reset is needed to clear old statistics, which survive a reboot.

back to top