Skip to content
This repository was archived by the owner on Oct 15, 2020. It is now read-only.

Conversation

@mrkmarron
Copy link
Contributor

@mrkmarron mrkmarron commented Mar 20, 2017

  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
Affected core subsystem(s)

fs

Description of change

Fix for TTD break after change to FS Stats access.

PR-URL: mrkmarron@3e52041

// needs room to store data for *two* `fs.Stats` instances.
fields = new double[2 * 14];
Local<ArrayBuffer> ab = ArrayBuffer::New(env->isolate(),
new double[2 * 14],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who frees this allocation?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not related to @mrkmarron changes but was like this in upstream. I have raised the question to check this.

Copy link
Contributor

@digitalinfinity digitalinfinity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM modulo that one question. Also, I'm guessing the perf impact of this change should be negligible but it would be good to run the benchmarks in benchmark\fs to verify.

@kunalspathak
Copy link
Member

@mrkmarron - I get your changes, but instead of modifying node code in so many places, why not have simple change to pass statValues from Jsland to C++ and use that Float64Array to extract ArrayBuffer and record in TTD?

Also, I agree with @digitalinfinity . We should do a perf run for fs module and compare the numbers with your change vs. before we got this changes.

@digitalinfinity digitalinfinity merged commit 87ce098 into nodejs:xplat Mar 22, 2017
@digitalinfinity
Copy link
Contributor

Landed in 87ce098 since TTD is broken badly without this change

@kunalspathak
Copy link
Member

Sure, the main reason for doing minimal changes on node side is to avoid resolving merge conflicts around that code in future.

@mrkmarron
Copy link
Contributor Author

I agree with the goal of minimal changes and I initially tried the approach we discussed of explicitly passing statValues from JSLand. However, I ended up needed to add this code in more places than I expected and also was seeing some odd replay divergences. So, I opted for this approach which turned out cleaner and simpler.

@mrkmarron mrkmarron mentioned this pull request Mar 23, 2017
2 tasks
mrkmarron added a commit that referenced this pull request Mar 24, 2017
kunalspathak pushed a commit to kunalspathak/node-chakracore that referenced this pull request Mar 24, 2017
Fixes: nodejs#194
PR-URL: nodejs#199
Reviewed-By: Hitesh Kanwathirtha <[email protected]>
@mrkmarron mrkmarron deleted the xplat-statfix branch May 21, 2017 04:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants