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

Interpreter Stack Profiler flag #799

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

B13rg
Copy link

@B13rg B13rg commented Apr 6, 2025

This is a continuation of #529

I have attempted to finish what was started by @igorwwwwwwwwwwwwwwwwwwww .

To not use global variable, I added the field profilerOpts to the VM and interpreter objects.
The StackProfilerOpts object stores what was the global variables.

As part of adding the field, I simplified the function calls of evaluate, evaluateStream, and evaluateMulti to just take the VM object instead of individual parameters.

I am unsure if it is the right type, or if it should be a *StackProfilerOpts instead.

Thanks!

Copy link

google-cla bot commented Apr 6, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@@ -281,6 +286,15 @@ type interpreter struct {
stack callStack

evalHook EvalHook

profilerOpts StackProfilerOpts
Copy link
Author

Choose a reason for hiding this comment

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

When running the govet linter, I am seeing the following issue:

interpreter.go:267:18: fieldalignment: struct with 128 pointer bytes could be 104 (govet)
type interpreter struct {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants