| Index: third_party/WebKit/Source/devtools/front_end/sdk/CPUProfileDataModel.js | 
| diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/CPUProfileDataModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/CPUProfileDataModel.js | 
| index 0a7872fdc5c15b98863135737d5ba1b67cfa9fe5..f3f378553171457f3693fbb8de7e2f9f7b0a45db 100644 | 
| --- a/third_party/WebKit/Source/devtools/front_end/sdk/CPUProfileDataModel.js | 
| +++ b/third_party/WebKit/Source/devtools/front_end/sdk/CPUProfileDataModel.js | 
| @@ -16,6 +16,7 @@ WebInspector.CPUProfileDataModel = function(profile) | 
| this.profileEndTime = profile.endTime * 1000; | 
| this._assignParentsInProfile(); | 
| if (this.samples) { | 
| +        this._sortSamples(); | 
| this._normalizeTimestamps(); | 
| this._buildIdToNodeMap(); | 
| this._fixMissingSamples(); | 
| @@ -156,6 +157,32 @@ WebInspector.CPUProfileDataModel.prototype = { | 
| } | 
| }, | 
|  | 
| +    _sortSamples: function() | 
| +    { | 
| +        var timestamps = this.timestamps; | 
| +        var samples = this.samples; | 
| +        var indices = timestamps.map((x, index) => index); | 
| +        indices.sort((a, b) => timestamps[a] - timestamps[b]); | 
| +        for (var i = 0; i < timestamps.length; ++i) { | 
| +            var index = indices[i]; | 
| +            if (index === i) | 
| +                continue; | 
| +            // Move items in a cycle. | 
| +            var savedTimestamp = timestamps[i]; | 
| +            var savedSample = samples[i]; | 
| +            var currentIndex = i; | 
| +            while (index !== i) { | 
| +                samples[currentIndex] = samples[index]; | 
| +                timestamps[currentIndex] = timestamps[index]; | 
| +                currentIndex = index; | 
| +                index = indices[index]; | 
| +                indices[currentIndex] = currentIndex; | 
| +            } | 
| +            samples[currentIndex] = savedSample; | 
| +            timestamps[currentIndex] = savedTimestamp; | 
| +        } | 
| +    }, | 
| + | 
| _normalizeTimestamps: function() | 
| { | 
| var timestamps = this.timestamps; | 
|  |