[LNT] r264717 - [profile] Counter values are an array, not a scalar
James Molloy via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 29 04:07:38 PDT 2016
Author: jamesm
Date: Tue Mar 29 06:07:38 2016
New Revision: 264717
URL: http://llvm.org/viewvc/llvm-project?rev=264717&view=rev
Log:
[profile] Counter values are an array, not a scalar
This worked in some contexts because javascript coerces arrays to scalars when they have one value.
Modified:
lnt/trunk/lnt/server/ui/static/lnt_profile.js
Modified: lnt/trunk/lnt/server/ui/static/lnt_profile.js
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/static/lnt_profile.js?rev=264717&r1=264716&r2=264717&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/static/lnt_profile.js (original)
+++ lnt/trunk/lnt/server/ui/static/lnt_profile.js Tue Mar 29 06:07:38 2016
@@ -668,7 +668,7 @@ function pf_init(run1, run2, testid, url
},
updated: function(fname) {
var fn_percentage = $('#fn1_box').functionTypeahead().getFunctionPercentage(fname);
- var ctr_value = $('#stats').statsBar().getCounterValue(pf_get_counter());
+ var ctr_value = $('#stats').statsBar().getCounterValue(pf_get_counter())[0];
$('#profile1').profile('go', fname,
pf_get_counter(), pf_get_absolute(),
fn_percentage * ctr_value);
@@ -702,7 +702,7 @@ function pf_init(run1, run2, testid, url
},
updated: function(fname) {
var fn_percentage = $('#fn2_box').functionTypeahead().getFunctionPercentage(fname);
- var ctr_value = $('#stats').statsBar().getCounterValue(pf_get_counter());
+ var ctr_value = $('#stats').statsBar().getCounterValue(pf_get_counter())[1];
$('#profile2').profile('go', fname,
pf_get_counter(), pf_get_absolute(),
fn_percentage * ctr_value);
@@ -775,13 +775,13 @@ function pf_init(run1, run2, testid, url
g_counter = $('#counters').val();
if ($('#fn1_box').val()) {
var fn_percentage = $('#fn1_box').functionTypeahead().getFunctionPercentage(fname);
- var ctr_value = $('#stats').statsBar().getCounterValue(pf_get_counter());
+ var ctr_value = $('#stats').statsBar().getCounterValue(pf_get_counter())[0];
$('#profile1').profile('go', $('#fn1_box').val(), g_counter, pf_get_absolute(),
fn_percentage * ctr_value);
}
if ($('#fn2_box').val()) {
var fn_percentage = $('#fn2_box').functionTypeahead().getFunctionPercentage(fname);
- var ctr_value = $('#stats').statsBar().getCounterValue(pf_get_counter());
+ var ctr_value = $('#stats').statsBar().getCounterValue(pf_get_counter())[1];
$('#profile2').profile('go', $('#fn2_box').val(), g_counter, pf_get_absolute(),
fn_percentage * ctr_value);
}
More information about the llvm-commits
mailing list