X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/29a3b2869c0075fc75e8ccc66fc1d9c4c8bf6a85..8b0d5ae29ebd13e69a23991b8adfb67c5c5d79d3:/src/mc/mc_hash.cpp diff --git a/src/mc/mc_hash.cpp b/src/mc/mc_hash.cpp index fff7d69002..8c23131509 100644 --- a/src/mc/mc_hash.cpp +++ b/src/mc/mc_hash.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2014-2018. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2014-2019. 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. */ @@ -29,7 +29,7 @@ public: template void update(T& x) { - state_ = (state_ << 5) + state_ + state_; + state_ = (state_ << 5) + state_ + x; } hash_type value() { @@ -41,14 +41,15 @@ public: hash_type hash(Snapshot const& snapshot) { - XBT_DEBUG("START hash %i", snapshot.num_state); + XBT_DEBUG("START hash %i", snapshot.num_state_); djb_hash hash; - // TODO, nb_processes - // TODO, heap_bytes_used - // TODO, root variables - // TODO, basic stack frame information - // TODO, stack frame local variables - XBT_DEBUG("END hash %i", snapshot.num_state); + // TODO: + // * nb_processes + // * heap_bytes_used + // * root variables + // * basic stack frame information + // * stack frame local variables + XBT_DEBUG("END hash %i", snapshot.num_state_); return hash.value(); }