Skip to content

Conversation

@GlenTiki
Copy link
Contributor

This fixes some build errors I was getting while trying to build --with-lttng. :)

@mscdexmscdex added the post-mortem Issues and PRs related to the post-mortem diagnostics of Node.js. label Oct 15, 2015
@Fishrock123
Copy link
Contributor

cc @nodejs/lts

@rvagg
Copy link
Member

@thekemkid do you know how long this has been broken? it'd be nice if we could get some lttng folks using releases more often so this stuff was kept in shape.

@GlenTiki
Copy link
ContributorAuthor

@rvagg it looks like it was working in the v4.1.2 proposal branch. I'm planning on doing some more work on lttng/adding more lttng tracepoints so I'll keep maintaining it. :)

Copy link
Member

Choose a reason for hiding this comment

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

Long lines, please keep them <= 80 columns.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Would it be okay if I used a switch here instead?
Heres what I'm thinking:

switch (flags){case v8::GCCallbackFlags::kNoGCCallbackFlags: flagsStr = "kNoGCCallbackFlags"; break; case v8::GCCallbackFlags::kGCCallbackFlagConstructRetainedObjectInfos; flagsStr = "kGCCallbackFlagConstructRetainedObjectInfos"; break; case v8::GCCallbackFlags::kGCCallbackFlagForced: flagsStr = "kGCCallbackFlagForced"; break; case v8::GCCallbackFlags::kGCCallbackFlagSynchronousPhantomCallbackProcessing: flagsStr = "kGCCallbackFlagSynchronousPhantomCallbackProcessing"; break; default: flagsStr = "Unrecognised GCCallbackFlag"; break}

Copy link
Member

Choose a reason for hiding this comment

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

That looks a little awkward. You could add a using F = v8::GCCallbackFlags a few lines up so you can shorten the names but I'd probably use an x-macro to generate the clauses. That lets you drop the duplication of the enum and the string as well. You can find an example of an x-macro in src/node_v8.cc, grep for HEAP_STATISTICS_PROPERTIES.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Done! I also shortened the GCType if statement with an x-macro too.

@bnoordhuis
Copy link
Member

The breakage is because of the recent upgrade to V8 4.6 in master.

@GlenTiki
Copy link
ContributorAuthor

Okay, I think this is ready to be reviewed again :) Let me know if I need to squash the commits.

@GlenTiki
Copy link
ContributorAuthor

could I get another review? @nodejs/lts

bnoordhuis pushed a commit that referenced this pull request Oct 20, 2015
@bnoordhuis
Copy link
Member

Landed in 9adc6a6, thanks. Can you make sure next time that make cpplint is happy?

@MylesBorins
Copy link
Contributor

Should we add an LTS tag here?

@Fishrock123
Copy link
Contributor

The breakage is because of the recent upgrade to V8 4.6 in master.

Should we add an LTS tag here?

No need. :)

@GlenTiki
Copy link
ContributorAuthor

@bnoordhuis will do, thanks :)

rvagg pushed a commit that referenced this pull request Oct 21, 2015
@rvaggrvagg mentioned this pull request Oct 21, 2015
@rvaggrvagg mentioned this pull request Dec 17, 2015
@MylesBorins
Copy link
Contributor

@jasnell it doesn't look like 2930867 has been backported to LTS. I don't think we should be backporting this commit unless we upgrade v8 to 4.6 on LTS

thoughts?

@MylesBorins
Copy link
Contributor

Removing LTS tag. @jasnell@rvagg feel free to re apply

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

post-mortemIssues and PRs related to the post-mortem diagnostics of Node.js.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@GlenTiki@Fishrock123@rvagg@bnoordhuis@MylesBorins@mscdex@jasnell