-#!/usr/bin/perl -w
+#!/usr/bin/env perl
# Copyright (c) 2009, 2011, 2014. The SimGrid Team.
# All rights reserved.
# under the terms of the license (GNU LGPL) which comes with this package.
use strict;
+use warnings;
sub melange {
my $tableau=shift;
-#!/usr/bin/python
+#!/usr/bin/env python
# Copyright (c) 2011, 2014. The SimGrid Team.
# All rights reserved.
-#!/usr/bin/python
+#!/usr/bin/env python
# Copyright (c) 2013-2014. The SimGrid Team.
# All rights reserved.
-#!/usr/bin/python
+#!/usr/bin/env python
# Copyright (c) 2012, 2014. The SimGrid Team.
# All rights reserved.
-#!/usr/bin/python
+#!/usr/bin/env python
# Copyright (c) 2011-2012, 2014. The SimGrid Team.
# All rights reserved.
-#!/usr/bin/python
+#!/usr/bin/env python
# Copyright (c) 2012, 2014. The SimGrid Team.
# All rights reserved.
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
# Copyright (c) 2011, 2014. The SimGrid Team.
# All rights reserved.
# under the terms of the license (GNU LGPL) which comes with this package.
use strict;
+use warnings;
if($#ARGV!=0) {
die "Usage: perl transfrom_optorsim_platform.pl <file.conf>\n";
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
# Copyright (c) 2011, 2014. The SimGrid Team.
# All rights reserved.
# under the terms of the license (GNU LGPL) which comes with this package.
use strict;
+use warnings;
use Switch;
my $toversion=3;
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
# Copyright (c) 2011, 2014. The SimGrid Team.
# All rights reserved.
# under the terms of the license (GNU LGPL) which comes with this package.
use strict;
+use warnings;
use Switch;
my $site="";
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
# Copyright (c) 2011, 2014. The SimGrid Team.
# All rights reserved.
# under the terms of the license (GNU LGPL) which comes with this package.
use strict;
+use warnings;
my $toversion=3;
my $nb_peer = $ARGV[0];
namespace simgrid {
namespace mc {
+static inline
+const char* to_cstr(RegionType region)
+{
+ switch (region) {
+ case RegionType::Unknown:
+ return "unknown";
+ case RegionType::Heap:
+ return "Heap";
+ case RegionType::Data:
+ return "Data";
+ default:
+ return "?";
+ }
+}
+
RegionSnapshot dense_region(
RegionType region_type,
void *start_addr, void* permanent_addr, size_t size)
region_type, start_addr, permanent_addr, size);
region.flat_data(std::move(data));
- XBT_DEBUG("New region : type : %d, data : %p (real addr %p), size : %zu",
- region_type, region.flat_data().data(), permanent_addr, size);
+ XBT_DEBUG("New region : type : %s, data : %p (real addr %p), size : %zu",
+ to_cstr(region_type), region.flat_data().data(), permanent_addr, size);
return std::move(region);
}
-#!/usr/bin/perl
+#!/usr/bin/env perl
# Copyright (c) 2011, 2014. The SimGrid Team.
# All rights reserved.
-#!/usr/bin/perl
+#!/usr/bin/env perl
# Copyright (c) 2005, 2007, 2010, 2014. The SimGrid Team.
# All rights reserved.
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
# Copyright (c) 2006-2007, 2014. The SimGrid Team.
# All rights reserved.
# under the terms of the license (GNU LGPL) which comes with this package.
use strict;
+use warnings;
+
#use Data::Dumper;
use XFig;
use POSIX;
set(CMAKE_JAVA_COMPILE_FLAGS "-Xlint")
endif()
+# Se the optimisation flags
+# NOTE, we should CMAKE_BUILD_TYPE for this
if(enable_compile_optimizations)
set(optCFLAGS "-O3 -funroll-loops -fno-strict-aliasing ")
- if(CMAKE_COMPILER_IS_GNUCC AND (NOT enable_model-checking))
- set(optCFLAGS "${optCFLAGS} -finline-functions ")
- if(WIN32)
- if (COMPILER_C_VERSION_MAJOR_MINOR STRGREATER "4.8")
+else()
+ set(optCFLAGS "-O0 ")
+endif()
+if(enable_compile_optimizations AND CMAKE_COMPILER_IS_GNUCC
+ AND (NOT enable_model-checking))
+ # This is redundant (already in -03):
+ set(optCFLAGS "${optCFLAGS} -finline-functions ")
+endif()
+
+# Configure LTO
+# TODO, provide an option to manually choose whether to use LTO
+# NOTE, cmake 3.0 has a INTERPROCEDURAL_OPTIMIZATION target
+# property for this (http://www.cmake.org/cmake/help/v3.0/prop_tgt/INTERPROCEDURAL_OPTIMIZATION.html)
+set(enable_lto OFF)
+if(enable_compile_optimizations
+ AND CMAKE_COMPILER_IS_GNUCC
+ AND (NOT enable_model-checking))
+ if(WIN32)
+ if (COMPILER_C_VERSION_MAJOR_MINOR STRGREATER "4.8")
# On windows, we need 4.8 or higher to enable lto because of http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50293
#
# We are experiencing assertion failures even with 4.8 on MinGW.
# Push the support forward: will see if 4.9 works when we test it.
- set(optCFLAGS "${optCFLAGS} -flto ")
- endif()
- else()
- # On non-windows, 4.6 is enough for that
- if(LINKER_VERSION STRGREATER "2.22")
- set(optCFLAGS "${optCFLAGS} -flto ")
- endif()
+ set(enable_lto ON)
endif()
+ elseif(LINKER_VERSION STRGREATER "2.22")
+ set(enable_lto ON)
+ endif()
+endif()
+if(enable_lto)
+ set(optCFLAGS "${optCFLAGS} -flto ")
+ # See https://gcc.gnu.org/wiki/LinkTimeOptimizationFAQ#ar.2C_nm_and_ranlib:
+ # "Since version 4.9 gcc produces slim object files that only contain
+ # the intermediate representation. In order to handle archives of
+ # these objects you have to use the gcc wrappers:
+ # gcc-ar, gcc-nm and gcc-ranlib."
+ if(${CMAKE_C_COMPILER_ID} STREQUAL "GNU"
+ AND COMPILER_C_VERSION_MAJOR_MINOR STRGREATER "4.8")
+ set (CMAKE_AR gcc-ar)
+ set (CMAKE_RANLIB gcc-ranlib)
endif()
-else()
- set(optCFLAGS "-O0 ")
endif()
if(enable_model-checking AND enable_compile_optimizations)
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
# Copyright (c) 2012-2014. The SimGrid Team.
# All rights reserved.
# under the terms of the license (GNU LGPL) which comes with this package.
use strict;
+use warnings;
# input file = AddTest.txt
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
# Copyright (c) 2012-2014. The SimGrid Team.
# All rights reserved.
# under the terms of the license (GNU LGPL) which comes with this package.
use strict;
+use warnings;
+
my @argv = ("valgrind");
my $count = 0;
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
# Copyright (c) 2012, 2014. The SimGrid Team.
# All rights reserved.
# under the terms of the license (GNU LGPL) which comes with this package.
use strict;
+use warnings;
if($#ARGV!=1) {
die "Usage: perl make_tesh.pl <directory> <old.tesh>\n";
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
# Copyright (c) 2005, 2012-2014. The SimGrid Team.
# All rights reserved.
# This program is free software; you can redistribute it and/or modify it
# under the terms of the license (GNU LGPL) which comes with this package.
+use warnings;
+
($#ARGV >= 1) or die "Usage: index_create.pl <input-tag-file> <output-doc-file>";
my($type) = "";
-#!/usr/bin/perl
+#!/usr/bin/env perl
# Copyright (c) 2008, 2010, 2012-2014. The SimGrid Team.
# All rights reserved.
-#!/usr/bin/python
+#!/usr/bin/env python
# Copyright (c) 2013-2014. The SimGrid Team.
# All rights reserved.
-#!/usr/bin/perl
+#!/usr/bin/env perl
# Copyright (c) 2013-2015. The SimGrid Team.
# All rights reserved.
# Copyright 2003, Dan Kegel. Licensed under GPL. See the file ../COPYING for details.
use strict;
+use warnings;
die "Please install iamerican to use that script."
unless (-r "/usr/lib/ispell/american.hash");
-#!/usr/bin/python
+#!/usr/bin/env python
# Copyright (c) 2013-2014. The SimGrid Team.
# All rights reserved.
-#!/usr/bin/ruby
+#!/usr/bin/env ruby
# Wrapper around the real `as` which adds filtering capabilities.
require "tempfile"
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
# Transform assembly in order to clean each stack frame for X86_64.
use strict;
-$SIG{__WARN__} = sub { die @_ };
+use warnings;
+$SIG{__WARN__} = sub { die @_ };
# Whether we are still scanning the content of a function:
our $scanproc = 0;
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
# Compiler wrapper with stack-cleaner support (enabled by default).
# Usage: ./compiler-wrapper target-compiler args [-f[no-]stack-cleaner]
+use warnings;
+
use File::Basename;
my $compiler = shift(@ARGV);
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
# Copyright (c) 2010, 2014. The SimGrid Team.
# All rights reserved.
# This program is free software; you can redistribute it and/or modify it
# under the terms of the license (GNU LGPL) which comes with this package.
+use warnings;
+
use Term::ANSIColor qw{:constants};
$Term::ANSIColor::AUTORESET = 1;