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

Add Perl support for ucalls / uflow / ustat #1959

Merged
merged 1 commit into from
Sep 4, 2018

Conversation

myllynen
Copy link
Contributor

@myllynen myllynen commented Sep 3, 2018

Sort language entries while at it.

Sort language entries while at it.
@yonghong-song
Copy link
Collaborator

[buildbot, test this please]

@yonghong-song
Copy link
Collaborator

Do you think perlcalls.py perlstat.py perlflow.py necessary? We do not have special scripts for other languages.

@myllynen
Copy link
Contributor Author

myllynen commented Sep 4, 2018

I don't think anything special is needed for Perl; however the reason I added them is because similar wrappers exists for other languages already, for example:

$ ls bcc.git/tools/python{calls,flow,stat}.sh                            
bcc.git/tools/pythoncalls.sh  bcc.git/tools/pythonflow.sh  bcc.git/tools/pythonstat.sh

Thanks.

@yonghong-song
Copy link
Collaborator

Ok, sounds good then!

@yonghong-song yonghong-song merged commit 9162be4 into iovisor:master Sep 4, 2018
@brendangregg
Copy link
Member

The only thing I don't like is the lack of specific examples; feel free to fix this in a follow up PR. Eg:

ls -lh perlcalls_example.txt
lrwxr-xr-x  1 bgregg  2119906183    22B Sep  4 11:36 perlcalls_example.txt@ -> lib/ucalls_example.txt

That's kinda a hack. Better than nothing, but as a Perl user I'm reading an example that's actually demonstrating Java. At some point I'd delete this symlink and replace it with a real perlcalls_example.txt file of Perl examples, and the same for all the others.

@myllynen
Copy link
Contributor Author

myllynen commented Sep 5, 2018

I agree that the it's not ideal at the moment but I was following the earlier convention with the other supported languages (Node, PHP, Python, Ruby), they all link to the generic u*txt versions:

$ ls -1l bcc.git/tools/*stat_example.txt
lrwxrwxrwx. 1 testuser testuser   21 2017-12-06 22:10 bcc.git/tools/javastat_example.txt -> lib/ustat_example.txt
lrwxrwxrwx. 1 testuser testuser   21 2017-12-06 22:10 bcc.git/tools/nodestat_example.txt -> lib/ustat_example.txt
lrwxrwxrwx. 1 testuser testuser   21 2018-09-04 20:40 bcc.git/tools/perlstat_example.txt -> lib/ustat_example.txt
lrwxrwxrwx. 1 testuser testuser   21 2017-12-06 22:10 bcc.git/tools/phpstat_example.txt -> lib/ustat_example.txt
lrwxrwxrwx. 1 testuser testuser   21 2017-12-06 22:10 bcc.git/tools/pythonstat_example.txt -> lib/ustat_example.txt
lrwxrwxrwx. 1 testuser testuser   21 2017-12-06 22:10 bcc.git/tools/rubystat_example.txt -> lib/ustat_example.txt

@zoidyzoidzoid
Copy link
Contributor

zoidyzoidzoid commented Sep 5, 2018

@myllynen Awesome work, thanks for contributing this. I looked at doing something similar recently, but struggled with finding the uprobes to attach to.

@myllynen
Copy link
Contributor Author

myllynen commented Sep 5, 2018

Glad you like it! FWIW, Performance Co-Pilot (PCP, https://pcp.io) now has BCC plugin (https://github.com/performancecopilot/pcp/tree/master/src/pmdas/bcc) which supports ucalls and ustat modules so in case you'd like to leave things running in the background for a longer period of time or collect also OS/DB/etc metrics at the same time, that might be something worth considering.

wcohen pushed a commit to wcohen/bcc that referenced this pull request Sep 13, 2018
CrackerCat pushed a commit to CrackerCat/bcc that referenced this pull request Jul 31, 2024
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.

None yet

4 participants