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

perf flamegraphs: no tooltips #124

Closed
asheplyakov opened this issue Mar 23, 2021 · 5 comments · May be fixed by #125
Closed

perf flamegraphs: no tooltips #124

asheplyakov opened this issue Mar 23, 2021 · 5 comments · May be fixed by #125
Assignees
Labels
bug Something isn't working javascript Pull requests that update Javascript code

Comments

@asheplyakov
Copy link

flamescope used to show nice tooltips when hovering a stack frame.
However now (commit 8eee594) there are no tooltips.
Instead there are lots of error messages in the browser console:

Uncaught TypeError: n.data.extras is undefined
    e http://HHHH.local:5000/main.js:43
    e http://HHHH.local:5000/main.js:43
    show http://HHHH.local:5000/main.js:43
    H http://HHHH.local:5000/main.js:11
    J http://HHHH.local:5000/main.js:11
main.js:43:1021238
@asheplyakov
Copy link
Author

Reverting commit 8eee594 restores tooltips

@asheplyakov
Copy link
Author

A more useful stack trace:

Uncaught TypeError: d.data.extras is undefined
    FlameGraph FlameGraph.jsx:177
    FlameGraph FlameGraph.jsx:181
    show index.js:37
    update d3-flamegraph.js:4360
    contextListener d3-flamegraph.js:708
    onAdd d3-flamegraph.js:745
    selection_each d3-flamegraph.js:364
    selection_on d3-flamegraph.js:774
    update d3-flamegraph.js:4359
    default each.js:5
    update d3-flamegraph.js:4277
    clear d3-flamegraph.js:4643
    default each.js:5
    clear d3-flamegraph.js:4641
    executeQuery FlameGraph.jsx:152
    promise callback*executeQuery FlameGraph.jsx:144
    componentDidMount FlameGraph.jsx:92
    React 9
    unstable_runWithPriority scheduler.development.js:697
    React 5
    unstable_runWithPriority scheduler.development.js:697
    React 6
    render index.jsx:31
    jsx index.jsx:43
    jsx main.js:93812

@asheplyakov
Copy link
Author

Reproducer:

$ cat > dummy.c <<EOF
#define LOOPS 1000

static __attribute__((noinline)) void h() {
	for (int i = 0; i < LOOPS; i++) {
		asm __volatile__("" : : : "memory");
	}
}

static __attribute__((noinline)) void g() {
	for (int i = 0; i < LOOPS; i++) {
		h();
	}
}

static __attribute__((noinline)) void f() {
	for (int i = 0; i < LOOPS; i++) {
		g();
	}
}

int main(int argc, char **argv) {
	f();
	return 0;
}
EOF

$ gcc -O0 -o dummy dummy.c
$ perf record --call-graph=fp ./dummy
$ perf script --header | gzip -9 > dummy.stacks.gz

And inspect those stacks with flamescope

@asheplyakov asheplyakov changed the title flamegraphs: no tooltips C/C++ flamegraphs: no tooltips Mar 23, 2021
@asheplyakov asheplyakov changed the title C/C++ flamegraphs: no tooltips perf flamegraphs: no tooltips Mar 23, 2021
asheplyakov added a commit to asheplyakov/flamescope that referenced this issue Mar 23, 2021
app/perf/flame_graph.py now uses the same naming as nflxprofile

Closes: Netflix#124
@spiermar spiermar self-assigned this Oct 14, 2021
@spiermar spiermar added review Tagged for review. javascript Pull requests that update Javascript code labels Oct 14, 2021
@spiermar
Copy link
Contributor

New error message:

Uncaught TypeError: Cannot read properties of undefined (reading 'realName')
    at FlameGraph.getNameWithFile (main.js:2518)
    at Function.<anonymous> (main.js:2522)
    at Function.tip.show (main.js:18183)

@spiermar
Copy link
Contributor

d3-tip was discontinued and there were some data changes. Will replace the plugin with the new flame graph tooltip and data structure.

@spiermar spiermar added bug Something isn't working and removed review Tagged for review. labels Oct 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants