Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(172)

Issue 342120043: New patch for core module changes (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
7 years, 1 month ago by ammo6818-vandals.uidaho.edu
Modified:
6 years, 4 months ago
Visibility:
Public.

Description

New patch for core module changes

Patch Set 1 #

Patch Set 2 : Updated core patch #

Total comments: 57

Patch Set 3 : Update for review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1217 lines, -484 lines) Patch
M src/core/helper/event-garbage-collector.h View 1 2 2 chunks +6 lines, -1 line 0 comments Download
M src/core/helper/random-variable-stream-helper.h View 2 chunks +5 lines, -1 line 0 comments Download
M src/core/model/assert.h View 3 chunks +4 lines, -3 lines 0 comments Download
M src/core/model/attribute.h View 7 chunks +10 lines, -6 lines 0 comments Download
M src/core/model/attribute-accessor-helper.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/core/model/attribute-construction-list.h View 2 chunks +5 lines, -1 line 0 comments Download
M src/core/model/attribute-helper.h View 1 2 11 chunks +64 lines, -2 lines 0 comments Download
M src/core/model/boolean.h View 3 chunks +7 lines, -3 lines 0 comments Download
M src/core/model/boolean.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/core/model/cairo-wideint-private.h View 5 chunks +8 lines, -8 lines 0 comments Download
M src/core/model/calendar-scheduler.h View 2 chunks +5 lines, -1 line 0 comments Download
M src/core/model/callback.h View 4 chunks +8 lines, -4 lines 0 comments Download
M src/core/model/callback.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M src/core/model/command-line.h View 1 2 7 chunks +19 lines, -6 lines 0 comments Download
M src/core/model/command-line.cc View 2 chunks +8 lines, -0 lines 0 comments Download
M src/core/model/config.h View 1 2 15 chunks +21 lines, -17 lines 0 comments Download
M src/core/model/default-simulator-impl.h View 2 chunks +5 lines, -1 line 0 comments Download
M src/core/model/des-metrics.h View 2 chunks +5 lines, -1 line 0 comments Download
M src/core/model/double.h View 3 chunks +7 lines, -3 lines 0 comments Download
M src/core/model/double.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/core/model/enum.h View 4 chunks +7 lines, -3 lines 0 comments Download
M src/core/model/event-id.h View 2 chunks +5 lines, -1 line 0 comments Download
M src/core/model/event-impl.h View 2 chunks +5 lines, -1 line 0 comments Download
M src/core/model/fatal-impl.h View 4 chunks +7 lines, -3 lines 0 comments Download
M src/core/model/fatal-impl.cc View 1 2 2 chunks +14 lines, -4 lines 0 comments Download
A src/core/model/fd-reader.h View 1 2 1 chunk +144 lines, -0 lines 0 comments Download
M src/core/model/global-value.h View 2 chunks +5 lines, -1 line 0 comments Download
M src/core/model/hash.h View 2 chunks +5 lines, -1 line 0 comments Download
M src/core/model/hash-fnv.h View 2 chunks +5 lines, -1 line 0 comments Download
M src/core/model/hash-function.h View 4 chunks +7 lines, -3 lines 0 comments Download
M src/core/model/hash-murmur3.h View 1 2 2 chunks +5 lines, -1 line 0 comments Download
M src/core/model/hash-murmur3.cc View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M src/core/model/heap-scheduler.h View 2 chunks +5 lines, -1 line 0 comments Download
M src/core/model/int64x64.h View 3 chunks +9 lines, -5 lines 0 comments Download
M src/core/model/int64x64-128.h View 2 chunks +5 lines, -1 line 0 comments Download
M src/core/model/int64x64-cairo.h View 3 chunks +14 lines, -10 lines 0 comments Download
M src/core/model/int64x64-double.h View 1 2 2 chunks +6 lines, -1 line 0 comments Download
M src/core/model/integer.h View 3 chunks +7 lines, -3 lines 0 comments Download
M src/core/model/integer.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/core/model/list-scheduler.h View 2 chunks +5 lines, -1 line 0 comments Download
M src/core/model/log.h View 12 chunks +20 lines, -16 lines 0 comments Download
M src/core/model/log-macros-enabled.h View 1 2 3 chunks +3 lines, -5 lines 0 comments Download
M src/core/model/make-event.h View 2 chunks +5 lines, -1 line 0 comments Download
M src/core/model/map-scheduler.h View 2 chunks +5 lines, -1 line 0 comments Download
M src/core/model/names.h View 2 chunks +5 lines, -1 line 0 comments Download
M src/core/model/names.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M src/core/model/non-copyable.h View 2 chunks +5 lines, -1 line 0 comments Download
A src/core/model/ns3-export.h View 1 2 1 chunk +33 lines, -0 lines 0 comments Download
A src/core/model/ns3-module.h View 1 2 1 chunk +69 lines, -0 lines 0 comments Download
M src/core/model/nstime.h View 8 chunks +12 lines, -8 lines 0 comments Download
M src/core/model/object.h View 3 chunks +6 lines, -2 lines 0 comments Download
M src/core/model/object-base.h View 1 2 3 chunks +26 lines, -1 line 0 comments Download
M src/core/model/object-factory.h View 6 chunks +10 lines, -6 lines 0 comments Download
M src/core/model/object-factory.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/core/model/object-ptr-container.h View 1 2 5 chunks +8 lines, -4 lines 0 comments Download
M src/core/model/pointer.h View 4 chunks +7 lines, -3 lines 0 comments Download
M src/core/model/random-variable-stream.h View 18 chunks +21 lines, -17 lines 0 comments Download
M src/core/model/realtime-simulator-impl.h View 2 chunks +5 lines, -1 line 0 comments Download
M src/core/model/ref-count-base.h View 2 chunks +5 lines, -1 line 0 comments Download
M src/core/model/rng-seed-manager.h View 2 chunks +5 lines, -1 line 0 comments Download
M src/core/model/rng-stream.h View 2 chunks +5 lines, -1 line 0 comments Download
M src/core/model/scheduler.h View 2 chunks +5 lines, -1 line 0 comments Download
M src/core/model/simulator.h View 3 chunks +6 lines, -2 lines 0 comments Download
M src/core/model/simulator-impl.h View 2 chunks +5 lines, -1 line 0 comments Download
M src/core/model/string.h View 2 chunks +7 lines, -3 lines 0 comments Download
M src/core/model/string.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/core/model/synchronizer.h View 2 chunks +5 lines, -1 line 0 comments Download
M src/core/model/system-condition.h View 2 chunks +5 lines, -1 line 0 comments Download
M src/core/model/system-mutex.h View 3 chunks +6 lines, -2 lines 0 comments Download
M src/core/model/system-path.h View 8 chunks +43 lines, -10 lines 0 comments Download
M src/core/model/system-path.cc View 1 2 14 chunks +96 lines, -21 lines 0 comments Download
M src/core/model/system-thread.h View 2 chunks +5 lines, -1 line 0 comments Download
M src/core/model/system-thread.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M src/core/model/system-wall-clock-ms.h View 2 chunks +5 lines, -1 line 0 comments Download
M src/core/model/test.h View 1 2 5 chunks +8 lines, -4 lines 0 comments Download
M src/core/model/test.cc View 6 chunks +21 lines, -62 lines 0 comments Download
M src/core/model/time.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/core/model/timer.h View 2 chunks +5 lines, -1 line 0 comments Download
M src/core/model/timer-impl.h View 2 chunks +5 lines, -1 line 0 comments Download
M src/core/model/trace-source-accessor.h View 2 chunks +5 lines, -1 line 0 comments Download
M src/core/model/traced-value.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/core/model/type-id.h View 1 2 12 chunks +19 lines, -10 lines 0 comments Download
M src/core/model/type-id.cc View 1 2 9 chunks +31 lines, -13 lines 0 comments Download
M src/core/model/type-name.h View 2 chunks +14 lines, -10 lines 0 comments Download
M src/core/model/uinteger.h View 3 chunks +7 lines, -3 lines 0 comments Download
M src/core/model/uinteger.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
R src/core/model/unix-fd-reader.h View 1 2 1 chunk +5 lines, -115 lines 0 comments Download
M src/core/model/unix-fd-reader.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/core/model/unix-system-condition.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M src/core/model/vector.h View 1 2 16 chunks +77 lines, -28 lines 0 comments Download
M src/core/model/vector.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/core/model/wall-clock-synchronizer.h View 1 2 3 chunks +77 lines, -1 line 0 comments Download
M src/core/model/wall-clock-synchronizer.cc View 2 chunks +6 lines, -0 lines 0 comments Download
M src/core/model/watchdog.h View 2 chunks +5 lines, -1 line 0 comments Download
M src/core/model/win32-system-wall-clock-ms.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/core/test/int64x64-test-suite.cc View 1 chunk +9 lines, -0 lines 0 comments Download
M src/core/wscript View 2 2 chunks +3 lines, -1 line 0 comments Download

Messages

Total messages: 5
ammo6818-vandals.uidaho.edu
Patch is ready for review.
7 years, 1 month ago (2018-05-23 02:33:43 UTC) #1
Peter Barnes
1. I have upstream patches addressing these issues, so these can be removed from this ...
7 years, 1 month ago (2018-05-23 19:45:39 UTC) #2
Peter Barnes
On 2018/05/23 19:45:39, Peter Barnes wrote: > 1. I have upstream patches addressing these issues, ...
7 years, 1 month ago (2018-05-23 20:53:08 UTC) #3
Peter Barnes
Additional comments on fd-reader. https://codereview.appspot.com/342120043/diff/20001/src/core/model/fd-reader.h File src/core/model/fd-reader.h (right): https://codereview.appspot.com/342120043/diff/20001/src/core/model/fd-reader.h#newcode22 src/core/model/fd-reader.h:22: #define WIN32_FD_READER_H Wrong include guard ...
7 years, 1 month ago (2018-05-24 18:04:37 UTC) #4
ammo6818-vandals.uidaho.edu
7 years, 1 month ago (2018-06-01 05:16:24 UTC) #5
Updated patch posted to address review comments.

https://codereview.appspot.com/342120043/diff/20001/src/core/model/assert.h
File src/core/model/assert.h (right):

https://codereview.appspot.com/342120043/diff/20001/src/core/model/assert.h#n...
src/core/model/assert.h:54: #include <string>
On 2018/05/23 19:45:40, Peter Barnes wrote:
> Is this needed?

Affirmative, some files in Network wont compile with out it.

https://codereview.appspot.com/342120043/diff/20001/src/core/model/cairo-wide...
File src/core/model/cairo-wideint-private.h (right):

https://codereview.appspot.com/342120043/diff/20001/src/core/model/cairo-wide...
src/core/model/cairo-wideint-private.h:108: NS3_EXPORT extern const char *
cairo_impl64;
On 2018/05/23 19:45:40, Peter Barnes wrote:
> Why does the declaration *and* the implementation have to be exported?

Removed from the .c file

https://codereview.appspot.com/342120043/diff/20001/src/core/model/config.h
File src/core/model/config.h (right):

https://codereview.appspot.com/342120043/diff/20001/src/core/model/config.h#n...
src/core/model/config.h:24: #include "object.h"
On 2018/05/23 19:45:40, Peter Barnes wrote:
> This doesn't appear to be necessary with gcc: Ptr<Object> compiles fine with
> just the forward declaration below.  If this is strictly necessary, then we
> should remove the forward declaration.

Because DLLs are self contained execution units, they must be complete so
forward declarations of Ptr<> items are not sufficient.  An actual declaration
of the class is required (e.g. the declaration header file) so the Ref() and
UnRef() functions are known.

The forward class declaration was removed.

https://codereview.appspot.com/342120043/diff/20001/src/core/model/fd-reader.h
File src/core/model/fd-reader.h (right):

https://codereview.appspot.com/342120043/diff/20001/src/core/model/fd-reader....
src/core/model/fd-reader.h:22: #define WIN32_FD_READER_H
On 2018/05/24 18:04:36, Peter Barnes wrote:
> Wrong include guard symbol

Updated

https://codereview.appspot.com/342120043/diff/20001/src/core/model/int64x64-c...
File src/core/model/int64x64-cairo.h (right):

https://codereview.appspot.com/342120043/diff/20001/src/core/model/int64x64-c...
src/core/model/int64x64-cairo.h:256: friend NS3_EXPORT bool         operator ==
(const int64x64_t & lhs, const int64x64_t & rhs);
On 2018/05/23 19:45:40, Peter Barnes wrote:
> Why do these friend declarations have to be explicitly exported?  The
> equivalents in nstime.h aren't.

Because the implementation of the functions are outside of the class so they
also have to be declared as NS3_EXPORT to match the implementation

https://codereview.appspot.com/342120043/diff/20001/src/core/model/int64x64.h
File src/core/model/int64x64.h (right):

https://codereview.appspot.com/342120043/diff/20001/src/core/model/int64x64.h...
src/core/model/int64x64.h:30: #include "ns3/int64x64-128.h"
On 2018/05/23 19:45:41, Peter Barnes wrote:
> Why do these includes have to be qualified by "ns3/"?

Because this header file is included by modules outside of core, Intellisense
cant find the references for the items defined in these files without the folder
path.

https://codereview.appspot.com/342120043/diff/20001/src/core/model/names.cc
File src/core/model/names.cc (right):

https://codereview.appspot.com/342120043/diff/20001/src/core/model/names.cc#n...
src/core/model/names.cc:682: #ifndef _WIN32
On 2018/05/23 19:45:41, Peter Barnes wrote:
> Why is this block conditional?

Windows throws an unreachable code error.

https://codereview.appspot.com/342120043/diff/20001/src/core/model/ns3-export.h
File src/core/model/ns3-export.h (right):

https://codereview.appspot.com/342120043/diff/20001/src/core/model/ns3-export...
src/core/model/ns3-export.h:31: #else
On 2018/05/23 19:45:41, Peter Barnes wrote:
> Please label this else, and corresponding endif:
>     #else  /* not __WIN32 */
>     ...
>     #endif  /* _WIN32 */
> 
> asdf

Done.

https://codereview.appspot.com/342120043/diff/20001/src/core/model/ns3-module.h
File src/core/model/ns3-module.h (right):

https://codereview.appspot.com/342120043/diff/20001/src/core/model/ns3-module...
src/core/model/ns3-module.h:20: /* Make sure NS3_MODULE is undefined, it will be
defined by the file including this file. */
On 2018/05/23 19:45:41, Peter Barnes wrote:
> Is this file auto-generated? (I hope so...)  If so, it should state that in a
> comment: 
>     autogenerated by... Do not modify.  Each configured module is assigned a
> unique name..

NS-3 core modules are not auto generated in Phase 1-4.  

In Phase 5,the file will be changed to be auto generated including contrib
modules.

https://codereview.appspot.com/342120043/diff/20001/src/core/model/object-fac...
File src/core/model/object-factory.h (right):

https://codereview.appspot.com/342120043/diff/20001/src/core/model/object-fac...
src/core/model/object-factory.h:123: friend NS3_EXPORT std::ostream & operator
<< (std::ostream &os, const ObjectFactory &factory);
On 2018/05/23 19:45:41, Peter Barnes wrote:
> Do the friend declaration and the real declaration both need to be marked for
> export?

Yes, because the real declaration is outside of the class so it must be
NS3_EXPORT and the friend declaration must match the real declaration.

https://codereview.appspot.com/342120043/diff/20001/src/core/model/system-pat...
File src/core/model/system-path.cc (right):

https://codereview.appspot.com/342120043/diff/20001/src/core/model/system-pat...
src/core/model/system-path.cc:363: #else
On 2018/05/23 19:45:41, Peter Barnes wrote:
> This block should appear before line 359, so they can share error reporting.

HAVE_MKDIR_H is always undefined for Visual Studio.

Error message corrected for Visual Studio

https://codereview.appspot.com/342120043/diff/20001/src/core/model/system-path.h
File src/core/model/system-path.h (right):

https://codereview.appspot.com/342120043/diff/20001/src/core/model/system-pat...
src/core/model/system-path.h:52: class NS3_EXPORT SystemPath
On 2018/05/23 19:45:41, Peter Barnes wrote:
> Why convert this namespace to a class?  To avoid explicit export of every
> function?

So dllimport and dllexport could be used because these functions are used by
other modules after the Visual Studio port.

dllimport and dllexport cannot be used for namespaces, they require classes

https://codereview.appspot.com/342120043/diff/20001/src/core/model/system-pat...
src/core/model/system-path.h:142: /**
On 2018/05/23 19:45:41, Peter Barnes wrote:
> Looks like these are being promoted from test-runner.cc?

They are needed by other modules and programs to access test files which are in
a different relative path to the executable file on the two platforms so these
functions are used to make a path from the root folder.

https://codereview.appspot.com/342120043/diff/20001/src/core/model/system-thr...
File src/core/model/system-thread.cc (right):

https://codereview.appspot.com/342120043/diff/20001/src/core/model/system-thr...
src/core/model/system-thread.cc:98: #ifndef _WIN32
On 2018/05/23 19:45:41, Peter Barnes wrote:
> Why is this conditional?

Visual Studio implementation cannot determine an output operator.  Added code to
output address on Windows.

https://codereview.appspot.com/342120043/diff/20001/src/core/model/test.cc
File src/core/model/test.cc (left):

https://codereview.appspot.com/342120043/diff/20001/src/core/model/test.cc#ol...
src/core/model/test.cc:159: * Get the path to the root of the source tree.
On 2018/05/23 19:45:41, Peter Barnes wrote:
> Why are these moved to system-path.h?

Because they are used by code outside of core so they need to be exportable from
core.dll

https://codereview.appspot.com/342120043/diff/20001/src/core/model/test.cc
File src/core/model/test.cc (right):

https://codereview.appspot.com/342120043/diff/20001/src/core/model/test.cc#ne...
src/core/model/test.cc:457: // The default value of NS_TEST_SOURCEDIR (__FILE__)
contains an absolute path instead of a relative path
On 2018/05/23 19:45:41, Peter Barnes wrote:
> Don't understand this section.

NS_TEST_SOURCEDIR was previously set by WAF.  Under VS, its set as a defined
symbol in the project settings using the predefined symbol __FILE__. __FILE__
creates an absolute file reference while the WAF setting is a relative path
reference.  This code creates a relative path reference to match the WAF
implementation.

https://codereview.appspot.com/342120043/diff/20001/src/core/model/test.h
File src/core/model/test.h (right):

https://codereview.appspot.com/342120043/diff/20001/src/core/model/test.h#new...
src/core/model/test.h:1287: friend class NS3_EXPORT TestRunnerImpl;
On 2018/05/23 19:45:41, Peter Barnes wrote:
> Why does the impl have to be exported?  It's only forward declared in this
file,
> and used as a pointer.

Removed.

https://codereview.appspot.com/342120043/diff/20001/src/core/model/traced-val...
File src/core/model/traced-value.h (right):

https://codereview.appspot.com/342120043/diff/20001/src/core/model/traced-val...
src/core/model/traced-value.h:158: : m_v (other.Get ())
On 2018/05/23 19:45:41, Peter Barnes wrote:
> Should this be instead
>     : m_v ( (T)other.Get () )
> Would that avoid the need to suppress warnings?  Or are we down casting from
> wide to narrow?

Added (T) and removed the #pragma.  Good catch!!

https://codereview.appspot.com/342120043/diff/20001/src/core/model/vector.h
File src/core/model/vector.h (right):

https://codereview.appspot.com/342120043/diff/20001/src/core/model/vector.h#n...
src/core/model/vector.h:79: friend NS3_EXPORT double CalculateDistance (const
Vector3D &a, const Vector3D &b);
On 2018/05/23 19:45:42, Peter Barnes wrote:
> Do both the friend declaration and formal declaration below need to be
exported?

Yes, because the function is defined outside of the class, it is required for
the implementation and the reference must match the implmentation.

https://codereview.appspot.com/342120043/diff/20001/src/core/model/wall-clock...
File src/core/model/wall-clock-synchronizer.cc (right):

https://codereview.appspot.com/342120043/diff/20001/src/core/model/wall-clock...
src/core/model/wall-clock-synchronizer.cc:336: #ifndef _WIN32
On 2018/05/23 19:45:42, Peter Barnes wrote:
> Why is this conditional?

Because it generates a code cannot be reached warning under VS.

https://codereview.appspot.com/342120043/diff/20001/src/core/model/win32-fd-r...
File src/core/model/win32-fd-reader.cc (right):

https://codereview.appspot.com/342120043/diff/20001/src/core/model/win32-fd-r...
src/core/model/win32-fd-reader.cc:69: // TODO: Windows implementation
On 2018/05/24 18:04:36, Peter Barnes wrote:
> Todo.  I think we need to see this file complete before deciding if and how to
> refactor fd-reader.

Windows implementation of this is a Phase 5 or Phase 6 effort and wont be done
for some time.

Initial VS changes are being implemented only for compilation success on VS.

https://codereview.appspot.com/342120043/diff/20001/src/core/model/win32-fd-r...
src/core/model/win32-fd-reader.cc:157: #pragma warning(disable : 4389)
On 2018/05/23 19:45:42, Peter Barnes wrote:
> Document which warning message is being suppressed.

Added.

https://codereview.appspot.com/342120043/diff/20001/src/core/test/int64x64-te...
File src/core/test/int64x64-test-suite.cc (right):

https://codereview.appspot.com/342120043/diff/20001/src/core/test/int64x64-te...
src/core/test/int64x64-test-suite.cc:1000: #ifndef _MSC_VER
On 2018/05/23 19:45:42, Peter Barnes wrote:
> Refactor with following comment.

Its unclear what change you are requesting.

https://codereview.appspot.com/342120043/diff/20001/src/fd-net-device/model/f...
File src/fd-net-device/model/fd-net-device.h (right):

https://codereview.appspot.com/342120043/diff/20001/src/fd-net-device/model/f...
src/fd-net-device/model/fd-net-device.h:36: #include "ns3/fd-reader.h"
On 2018/05/23 19:45:42, Peter Barnes wrote:
> Need to discuss deprecation process for old header name

Change old header to include comment about deprecation.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b