Skip to content

Conversation

@grariel
Copy link
Contributor

@grariel grariel commented Sep 14, 2022

Most of the code is copied from:
https://github.com/Granulate/gprofiler/blob/master/gprofiler/profilers/perf.py#L272

And will be used there as well.

@michelhe
Copy link
Contributor

put these in a their own module, don't throw it in the package root

@grariel
Copy link
Contributor Author

grariel commented Sep 14, 2022

put these in a their own module, don't throw it in the package root

Python and Java are also in the root folder.

# Licensed under the AGPL3 License. See LICENSE.md in the project root for license information.
#

DETECTED_NODE_PROCESSES_REGEX = r"^.+/libnode\.so"
Copy link
Contributor

Choose a reason for hiding this comment

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

There is no such thing as libnode. Node process identification is done by /proc/pid/exe.

Copy link
Contributor Author

@grariel grariel Sep 15, 2022

Choose a reason for hiding this comment

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

Apparently it's only loaded on some versions. Changed to gProfiler's method, so now all logic is copied.

@grariel grariel requested a review from Jongy September 15, 2022 12:10
@michelhe
Copy link
Contributor

See that the runtime detection code in gProfiler has gone through some changes here :
intel/gprofiler#460


@functools.lru_cache(maxsize=4096)
def get_process_golang_version(process: Process) -> Optional[str]:
elf_path = f"/proc/{process.pid}/exe"
Copy link
Contributor

Choose a reason for hiding this comment

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

use granulate_utils.linux.process.process_exe

@grariel grariel requested a review from michelhe September 19, 2022 15:22
@grariel grariel merged commit 9aa9eaa into master Sep 19, 2022
@grariel grariel deleted the feature/adding-runtime-process-utils branch September 19, 2022 15:43
Jongy pushed a commit to intel/gprofiler that referenced this pull request Oct 14, 2022
This PR updates granulate-utils post the changes in intel/granulate-utils#73,
and includes a few other updates from the utils repo as well, one of them is intel/granulate-utils#87 which fixes #503.
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.

4 participants