-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
python: Upgrade PyPerf to v1.0.3 (#70)
* Upgrade PyPerf to v1.0.3 (c568fdd751304ecf7907ebd27f8039ea3c492a4c) * Add tests for kernel stacks from PyPerf * Use larger events buffer & symbols map * Increase MAX_FREQUENCY to 1000 * Log PyPerf's stdout/stderr every interval * Bump gProfiler version to 1.0.4
- Loading branch information
Showing
13 changed files
with
89 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "1.0.3" | ||
__version__ = "1.0.4" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Copyright (c) Granulate. All rights reserved. | ||
# Licensed under the AGPL3 License. See LICENSE.md in the project root for license information. | ||
# | ||
set -e | ||
|
||
git clone --depth 1 -b v1.0.3 https://github.com/Granulate/bcc.git && cd bcc && git reset --hard c568fdd751304ecf7907ebd27f8039ea3c492a4c | ||
mkdir build | ||
cd build | ||
cmake -DPYTHON_CMD=python3 -DINSTALL_CPP_EXAMPLES=y -DCMAKE_INSTALL_PREFIX=/bcc/root .. | ||
make -C examples/cpp/pyperf -j -l VERBOSE=1 install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
FROM python:3.6-alpine | ||
|
||
WORKDIR /app | ||
ADD fibonacci.py /app | ||
ADD lister.py /app | ||
|
||
CMD ["/app/fibonacci.py"] | ||
CMD ["/app/lister.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
FROM python:3.6-alpine | ||
|
||
WORKDIR /app | ||
ADD fibonacci.py /app | ||
ADD lister.py /app | ||
# this is used to test that we identify Python processes to profile based on "libpython" in their "/proc/pid/maps". | ||
# so we'll run a Python script using non-"python" executable ("shmython" instead) but it'll have "libpython" | ||
# loaded. | ||
RUN ln /usr/local/bin/python3.6 /usr/local/bin/shmython && ! test -L /usr/local/bin/shmython && ldd /usr/local/bin/shmython | grep libpython > /dev/null | ||
|
||
CMD ["/usr/local/bin/shmython", "/app/fibonacci.py"] | ||
CMD ["/usr/local/bin/shmython", "/app/lister.py"] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/local/bin/python | ||
# | ||
# Copyright (c) Granulate. All rights reserved. | ||
# Licensed under the AGPL3 License. See LICENSE.md in the project root for license information. | ||
# | ||
import os | ||
from threading import Thread | ||
|
||
|
||
def lister(): | ||
os.listdir("/") # have some kernel stacks | ||
|
||
|
||
def burner(): | ||
while True: # have some Python stacks | ||
pass | ||
|
||
|
||
if __name__ == "__main__": | ||
Thread(target=burner).start() | ||
while True: | ||
lister() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters