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

Remove Rust/Aya-based toolchain #869

Merged
merged 2 commits into from
Oct 6, 2022

Conversation

kakkoyun
Copy link
Member

@kakkoyun kakkoyun commented Oct 5, 2022

Signed-off-by: Kemal Akkoyun [email protected]

This PR reverts the changes that introduced in #377.
We are basically removing the Rust, Aya-based toolchain for the time being to be able to deliver our goals quicker. Aya has some rough edges such as aya-rs/aya#351, we were missing certain APIs to be able to write complex eBPF programs (programs to solves issues such as #768).

This being said, we will still continue to spent our innovation tokens on Rust and Aya for the further. The team still wants to pursue the path when the conditions are ripe.

todo.md Outdated Show resolved Hide resolved
@javierhonduco
Copy link
Contributor

Could you run some end-to-end testing with Parca Demo (or some other test program you trust) to double-check that everything works fine? 😄

@kakkoyun
Copy link
Member Author

kakkoyun commented Oct 5, 2022

Could you run some end-to-end testing with Parca Demo (or some other test program you trust) to double-check that everything works fine? 😄

I have already done that. We do another run. After see everything ok with actions.

cmd/parca-agent/main.go Outdated Show resolved Hide resolved
shell.nix Show resolved Hide resolved
@kakkoyun
Copy link
Member Author

kakkoyun commented Oct 5, 2022

I'll check the failures soon.

shell.nix Show resolved Hide resolved
shell.nix Outdated Show resolved Hide resolved
@kakkoyun kakkoyun force-pushed the revert_rust_toolchain branch 3 times, most recently from 1d28fee to 9f91aeb Compare October 6, 2022 08:28
@javierhonduco
Copy link
Contributor

javierhonduco commented Oct 6, 2022

The CodeQL action is failing, but seems we can remove the LLVM bitcode generation (see below), and just generate the BPF object code

[...] -emit-llvm [...] cpu/cpu.bpf.ll


.PHONY: clean
clean:
cargo clean
rm -f $(OUT_BPF)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: What do you think about also adding - rm -rf target/ so when people rebase on this branch the targets/ directory that might have been created by the previous build is removed, too?

-xc \
-nostdinc \
-target bpf \
-O2 -emit-llvm -c -g $< -o $(@:.o=.ll)
Copy link
Contributor

Choose a reason for hiding this comment

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

We can do this in one step without requiring the external linker binary

something like:

Suggested change
-O2 -emit-llvm -c -g $< -o $(@:.o=.ll)
-O2 -c -g $< -o $(@:.o)

Copy link
Member Author

Choose a reason for hiding this comment

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

Have we already used any branches in the agent? or any other projects?

-nostdinc \
-target bpf \
-O2 -emit-llvm -c -g $< -o $(@:.o=.ll)
$(CMD_LLC) -march=bpf -filetype=obj -o $@ $(@:.o=.ll)
Copy link
Contributor

Choose a reason for hiding this comment

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

And we wouldn't need llc

Copy link
Contributor

@javierhonduco javierhonduco left a comment

Choose a reason for hiding this comment

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

LGTM!

@kakkoyun kakkoyun merged commit 4ba5c0a into parca-dev:main Oct 6, 2022
@kakkoyun kakkoyun deleted the revert_rust_toolchain branch October 6, 2022 10:13
@v-thakkar v-thakkar mentioned this pull request Oct 12, 2022
4 tasks
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