Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TODO] profiler improvements #10119

Closed
wants to merge 4 commits into from

Conversation

timotheecour
Copy link
Member

@timotheecour timotheecour commented Dec 28, 2018

/cc @Araq @zah

  • add line to stacktrace in profiler results

  • fixes can't profile nim compiler #10106

  • remove duplicate type StackTrace = object definition
    note to reviewer: not sure where/when this was used, maybe I overlook some use case?

  • minor bugfix in "for i in 0..<min(100, entries)" (previously printed 101 entries unlike what comment suggested)

Note: the fix for #10106 works but leads to code duplication; alternatives would be:

  • move this to include (yuk...):
proc `==`(x, y: cstring): bool {.noSideEffect, inline.} 

if pointer(x) == pointer(y): result = true
elif x.isNil or y.isNil: result = false
else: result = strcmp(x, y) == 0

Copy link
Contributor

Choose a reason for hiding this comment

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

is this still a letfover, I don't see you use it anywhere.

Copy link
Member Author

Choose a reason for hiding this comment

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

that's the fix for #10106 ; without it it fails:

nim c --profiler:on compiler/nim.nim
compiler/nim c -o:/tmp/z01  compiler/nim.nim

fails with error msg here #10106 (comment)

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 a fix, it's workaround and I don't like it.

@Araq
Copy link
Member

Araq commented Feb 23, 2019

It works around the underlying problem.

@Araq Araq closed this Feb 23, 2019
@timotheecour timotheecour changed the title profiler improvements [TODO] profiler improvements May 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

can't profile nim compiler
3 participants