13. The device according to claim 9 , wherein the clustering handler further comprises: a threshold adjustor for automatically adjusting the significant gap threshold value according to user usages.
9. A device for computer system performance analysis, comprising: a performance log file receiver, executing using a processor, for receiving a computer system performance log file; a clustering handler for clustering instructions involved in the computer system performance log file at flexible granularity to acquire code clusters, wherein the clustering handler implements the following instruction clustering at flexible granularity: sorting all gaps in a descending order, the largest gap having a smallest number as its number, the numbers of other gaps increasing in order, wherein the gap is the difference between the address of a current instruction and the address of a next instruction adjacent to the current instruction, among all of the gaps, determining significant gaps which are significantly larger in relative to other gaps, and identifying instructions corresponding to the significant gaps to divide the codes into clusters, wherein determining the significant gaps comprises: determining a slope of each gap by: computing S=gap i /(N−i), wherein S is the sloe, gap i is the current gap, i is the ID of the current gap, and N is the total number of the gaps, and determining a gap with such a slope the rate of which to the slope of the next gap is larger than a significant gap threshold, identifying the gap as a first significant gap and other gaps larger than or equal to the gap as significant gaps; and a performance viewer for outputting the result of computer system performance analysis based on the code clusters.