Merge branch 'master' of https://github.com/plasma-umass/coz into mmeraz/gcc10fix

This commit is contained in:
Manuel Meraz 2020-12-21 11:27:09 -05:00
commit e1792377e8
7 changed files with 15 additions and 78 deletions

View File

@ -19,7 +19,7 @@ An OpenSUSE package was prepared by user
Coz should work on any modern Linux system (specifically, running
version 2.6.32 or later, with support for the `perf_event_open` system
call) with a Python interpreter.
call) with a Python 3.x interpreter.
## Java version
@ -31,7 +31,7 @@ To build Coz from source, you will need:
- A copy of the source code for this project
- A compiler with C++0x support (clang++ or g++)
- A Python interpreter (Python 3 is recommended)
- A Python interpreter (Python 3.x is required)
- The libelfin development libraries (Use release 0.2 or the latest from <https://github.com/aclements/libelfin>. _Version 0.3 does not work_.)
- The `rst2man` command (for building documentation)
- NodeJS and npm (for building the profiler viewer)

2
coz
View File

@ -1,4 +1,4 @@
#!/usr/bin/env python2.7
#!/usr/bin/env python3
# Copyright (c) 2019, Charlie Curtsinger and Emery Berger,
# University of Massachusetts Amherst

View File

@ -328,6 +328,7 @@ var Profile = /** @class */ (function () {
}
_this.drawPlots(true);
_this.drawLegend();
update();
});
legend_entries_sel.append('span')
.attr('class', 'path')
@ -365,7 +366,7 @@ var Profile = /** @class */ (function () {
var div_height = 190;
var svg_width = div_width - 10;
var svg_height = div_height - 40;
var margins = { left: 55, right: 20, top: 10, bottom: 35 };
var margins = { left: 60, right: 20, top: 10, bottom: 35 };
var plot_width = svg_width - margins.left - margins.right;
var plot_height = svg_height - margins.top - margins.bottom;
var radius = 3;
@ -446,6 +447,7 @@ var Profile = /** @class */ (function () {
plot_title_sel.enter().append('div').attr('class', 'plot-title');
plot_title_sel.text(function (d) { return d; })
.classed('path', true)
.attr('title', function (d) { return d; })
.style('width', div_width + 'px');
plot_title_sel.exit().remove();
/****** Update scales ******/
@ -512,8 +514,8 @@ var Profile = /** @class */ (function () {
/****** Add or update y-axis title ******/
var ytitle_sel = plot_area_sel.selectAll('text.ytitle').data([0]);
ytitle_sel.enter().append('text').attr('class', 'ytitle');
ytitle_sel.attr('x', -yscale(0)) // x and y are flipped because of rotation
.attr('y', -50) // Approximate width of y-axis
ytitle_sel.attr('x', -(svg_height - margins.bottom) / 2) // x and y are flipped because of rotation
.attr('y', -45) // Approximate width of y-axis
.attr('transform', 'rotate(-90)')
.style('text-anchor', 'middle')
.style('alignment-baseline', 'central')

File diff suppressed because one or more lines are too long

View File

@ -75,73 +75,6 @@ function remove_duplicates(array) {
}
return Object.keys(uniq).map(function (key) { return uniq[key]; });
}
{
var test_data = [
"/home/fitzgen/walrus/src/lib.rs",
"/home/fitzgen/walrus/src/passes/mod.rs",
"/home/fitzgen/rayon/src/lib.rs",
"/home/fitzgen/rayon/src/spawner/mod.rs"
];
console.log(test_data);
console.log(get_minimum_parts_for_unique_path(test_data));
}
{
var test_data = [
"/a/b/c/test.cpp:135",
"/a/b/c/test.cpp:145",
"/a/b/c/test.cpp:251",
];
console.log(test_data);
console.log(get_minimum_parts_for_unique_path(test_data));
}
{
var test_data = [
"src/lib.rs:330",
"src/lib.rs:367",
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libcore/slice/mod.rs:3261",
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libcore/slice/mod.rs:5348",
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libcore/ptr/mod.rs:197",
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/liballoc/vec.rs:1563",
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/liballoc/vec.rs:1787",
"/home/cmchenry/.cargo/registry/src/github.com-1ecc6299db9ec823/memchr-2.2.1/src/x86/sse2.rs:0",
"/home/cmchenry/.cargo/registry/src/github.com-1ecc6299db9ec823/parse_wiki_text-0.1.5/src/table.rs:288",
"/home/cmchenry/.cargo/registry/src/github.com-1ecc6299db9ec823/quick-xml-0.16.1/src/reader.rs:0",
];
console.log(test_data);
console.log(get_minimum_parts_for_unique_path(test_data));
}
{
var test_data = [
"/home/cmchenry/.cargo/registry/src/github.com-1ecc6299db9ec823/failure-0.1.5/src/error/error_impl.rs:23",
"/home/cmchenry/.cargo/registry/src/github.com-1ecc6299db9ec823/regex-1.3.1/src/dfa.rs:1742",
"/home/cmchenry/workspace/rust/walrus/src/ir/mod.rs:209",
"/home/cmchenry/workspace/rust/walrus/src/module/functions/local_function/context.rs:0",
"/home/cmchenry/workspace/rust/walrus/src/module/functions/local_function/context.rs:175",
"/home/cmchenry/workspace/rust/walrus/src/module/functions/local_function/context.rs:178",
"/home/cmchenry/workspace/rust/walrus/src/module/functions/local_function/context.rs:192",
"/home/cmchenry/workspace/rust/walrus/src/module/functions/local_function/context.rs:200",
"/home/cmchenry/workspace/rust/walrus/src/module/functions/mod.rs:306",
"/home/cmchenry/workspace/rust/walrus/src/tombstone_arena.rs:62",
"/home/cmchenry/workspace/rust/walrus/src/tombstone_arena.rs:67",
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/liballoc/alloc.rs:208",
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/liballoc/alloc.rs:82",
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/liballoc/boxed.rs:116",
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/liballoc/raw_vec.rs:0",
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/liballoc/raw_vec.rs:230",
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/liballoc/raw_vec.rs:492",
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/liballoc/vec.rs:1101",
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/liballoc/vec.rs:2003",
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libcore/alloc.rs:242",
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libcore/cmp.rs:978",
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libcore/num/mod.rs:3399",
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libcore/ptr/mod.rs:197",
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libcore/ptr/mod.rs:783",
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libcore/result.rs:800",
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/stdsimd/crates/core_arch/src/x86/sse2.rs:1401"
];
console.log(test_data);
console.log(get_minimum_parts_for_unique_path(test_data));
}
function display_warning(title, text) {
var warning = $("<div class=\"alert alert-warning alert-dismissible\" role=\"alert\">\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n <strong>" + title + ":</strong> " + text + "\n </div>");
$('#warning-area').append(warning);

File diff suppressed because one or more lines are too long

View File

@ -405,6 +405,7 @@ class Profile {
}
this.drawPlots(true);
this.drawLegend();
update();
});
legend_entries_sel.append('span')
.attr('class', 'path')
@ -447,7 +448,7 @@ class Profile {
const div_height = 190;
const svg_width = div_width - 10;
const svg_height = div_height - 40;
const margins = {left: 55, right: 20, top: 10, bottom: 35};
const margins = {left: 60, right: 20, top: 10, bottom: 35};
const plot_width = svg_width - margins.left - margins.right;
const plot_height = svg_height - margins.top - margins.bottom;
const radius = 3;
@ -539,6 +540,7 @@ class Profile {
plot_title_sel.enter().append('div').attr('class', 'plot-title');
plot_title_sel.text(function(d) { return d; })
.classed('path', true)
.attr('title', function(d) { return d; })
.style('width', div_width+'px');
plot_title_sel.exit().remove();
@ -618,8 +620,8 @@ class Profile {
/****** Add or update y-axis title ******/
let ytitle_sel = plot_area_sel.selectAll('text.ytitle').data([0]);
ytitle_sel.enter().append('text').attr('class', 'ytitle');
ytitle_sel.attr('x', -yscale(0)) // x and y are flipped because of rotation
.attr('y', -50) // Approximate width of y-axis
ytitle_sel.attr('x', - ( svg_height - margins.bottom) / 2)
.attr('y', -45) // Approximate width of y-axis
.attr('transform', 'rotate(-90)')
.style('text-anchor', 'middle')
.style('alignment-baseline', 'central')