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

Use proc_events on Java processes #208

Merged
merged 27 commits into from Nov 26, 2021
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
118340b
Add proc_events
YishaiZinkin Nov 14, 2021
c795706
Run lint.sh
YishaiZinkin Nov 21, 2021
a122366
Remove unused import
YishaiZinkin Nov 21, 2021
4697752
Move to class and done some fixes
YishaiZinkin Nov 22, 2021
fe2373e
Add stop functionality
YishaiZinkin Nov 22, 2021
5513350
Integrate with java profiler
YishaiZinkin Nov 22, 2021
916ace5
select -> selectors
YishaiZinkin Nov 22, 2021
77088e8
Merge branch 'master' into feature/track-java-processes-termination
YishaiZinkin Nov 22, 2021
ffe742e
Typo
YishaiZinkin Nov 23, 2021
6dc4140
Raise in case of error in socket.bind
YishaiZinkin Nov 23, 2021
6d3f4c1
Add tid to callback
YishaiZinkin Nov 23, 2021
2032625
Fix: Don't call socket.close while in select()
YishaiZinkin Nov 23, 2021
728c9c8
Remove ProcEventsListener object from the API
YishaiZinkin Nov 23, 2021
c8b2097
Typo
YishaiZinkin Nov 24, 2021
b68c289
Cleanup properly
YishaiZinkin Nov 24, 2021
7520777
Differ thread start to first registration
YishaiZinkin Nov 24, 2021
8f7d5ce
Merge branch 'master' into feature/track-java-processes-termination
YishaiZinkin Nov 24, 2021
b06b654
Add unregister
YishaiZinkin Nov 24, 2021
2cc5df1
Add type hints
YishaiZinkin Nov 24, 2021
def3098
Add type hints
YishaiZinkin Nov 24, 2021
2b22419
Add module doc
YishaiZinkin Nov 24, 2021
4675511
Use granulate-utils
YishaiZinkin Nov 25, 2021
c4e3a4c
Fix linting
YishaiZinkin Nov 25, 2021
02f4cf0
Log the error code of the main thread only
YishaiZinkin Nov 25, 2021
7cdc3d4
Add git to Dockerfile
YishaiZinkin Nov 25, 2021
dfca758
Add package name in requirements.txt
YishaiZinkin Nov 25, 2021
99a1b59
Merge branch 'master' into feature/track-java-processes-termination
YishaiZinkin Nov 25, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 2 additions & 6 deletions gprofiler/proc_events.py
Expand Up @@ -4,10 +4,6 @@
import struct
import threading

from gprofiler.log import get_logger_adapter

logger = get_logger_adapter(__name__)


def _raise_if_not_running(func):
def wrapper(self, *args, **kwargs):
Expand Down Expand Up @@ -96,8 +92,8 @@ def _proc_events_listener(self):
"""Runs forever and calls registered callbacks on process events"""
try:
self._socket.bind((os.getpid(), self._CN_IDX_PROC))
except socket.error:
logger.exception("")
except PermissionError as e:
raise PermissionError("You don't have permissions to bind to the process events connector") from e
Jongy marked this conversation as resolved.
Show resolved Hide resolved

self._register_for_connector_events(self._socket)
selector = selectors.DefaultSelector()
Expand Down