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

Does the promu support setting the gcflags? #235

Open
kiragoo opened this issue Aug 22, 2022 · 0 comments
Open

Does the promu support setting the gcflags? #235

kiragoo opened this issue Aug 22, 2022 · 0 comments

Comments

@kiragoo
Copy link

kiragoo commented Aug 22, 2022

First of all, thanks for the project "prometheus/promu".

Recently I used the gdb to debug the smartctl_exporter which was built by the tool "promu".

The .promu.yaml for smartctl_exporter as blows:

go:
    # This must match .circle/config.yml.
    version: 1.18
repository:
    path: github.com/prometheus-community/smartctl_exporter
build:
    binaries:
        - name: smartctl_exporter
    flags: -a -tags 'netgo static_build'
    ldflags: |
        -X github.com/prometheus/common/version.Version={{.Version}}
        -X github.com/prometheus/common/version.Revision={{.Revision}}
        -X github.com/prometheus/common/version.Branch={{.Branch}}
        -X github.com/prometheus/common/version.BuildUser={{user}}@{{host}}
        -X github.com/prometheus/common/version.BuildDate={{date "20060102-15:04:05"}}
tarball:
    files:
        - LICENSE
        - NOTICE

While debugging the smartctl_exporter with gdb, I found the variable "devices" is "optimized out".
图片

I just want to print the variable "devices", maybe turning off optimization and inlining in Go gc compilers could solve the problem.

So, my question is that "does the promu support setting the "gcflags" ?

I'll be appreciate for your help ^_^.

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

No branches or pull requests

1 participant