Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
yunwei37 committed Sep 16, 2024
1 parent 8cb2e19 commit 413ffae
Show file tree
Hide file tree
Showing 11 changed files with 46,900 additions and 152,303 deletions.
82,696 changes: 88 additions & 82,608 deletions commit_info_output.txt

Large diffs are not rendered by default.

92,426 changes: 46,213 additions & 46,213 deletions data/bpf_commits.csv

Large diffs are not rendered by default.

23,426 changes: 29 additions & 23,397 deletions data/commit_survey.csv

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data/generate_bpf_commits.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def get_commit_details(commit_id):
# Function to write commit details into a CSV
def write_to_csv(data, csv_file):
with open(csv_file, mode='w', newline='') as file:
writer = csv.writer(file)
writer = csv.writer(file, quoting=csv.QUOTE_ALL)
writer.writerow(["commit_id", "commit_hash", "author_name", "author_email", "author_date",
"committer_name", "committer_email", "commit_date_timestamp", "tree_hash",
"parent_hashes", "commit_message", "refs"])
Expand Down
187 changes: 187 additions & 0 deletions docs/eBPF-questions.md

Large diffs are not rendered by default.

288 changes: 288 additions & 0 deletions docs/questions.o1.md

Large diffs are not rendered by default.

138 changes: 76 additions & 62 deletions survey/commit_survey.yml
Original file line number Diff line number Diff line change
@@ -1,70 +1,84 @@
title: "Commit Classification Survey"
description: "A survey about the type, use cases and summary of commit in Linux eBPF."
questions:
- id: summary
type: fill_in
question: "Please provide a summary of the commit in one short sentence not longer than 30 words. Only output one sentence."
required: true
- id: summary
type: fill_in
question: "Please provide a summary of the commit in one short sentence not longer than 30 words. Only output one sentence."
required: true

- id: keywords
type: fill_in
question: "Please extract no more than 3 keywords from the commit. Only output 3 keywords, without any special characters."
required: true
- id: keywords
type: fill_in
question: "Please extract no more than 3 keywords from the commit. Only output 3 keywords without any special characters."
required: true

- id: commit_classification
type: single_choice
question: "What may be the main type of the commit?"
choices:
- value: It's a bug fix.
- value: It's a new feature.
- value: It's a performance optimization.
- value: It's a cleanup or refactoring in the code.
- value: It's a documentation change or typo fix.
- value: It's a test case or test infrastructure change.
- value: It's a build system or CI/CD change.
- value: It's a security fix.
- value: It's other type of commit.
- id: commit_classification
type: single_choice
question: "What may be the main type of the commit?"
choices:
- value: It's a bug fix.
- value: It's a new feature.
- value: It's a performance optimization.
- value: It's a cleanup or refactoring in the code.
- value: It's a documentation change or typo fix.
- value: It's a test case or test infrastructure change.
- value: It's a build system or CI/CD change.
- value: It's a security fix.
- value: It's other type of commit.

- id: commit_complexity
type: single_choice
question: "What is the estimated complexity of implementing this commit?"
choices:
- value: Simple, can be used without much configuration. For example, a simple helper function.
- value: Moderate, requires some setup or understanding of the system. For example, a new map type or a new link type.
- value: Complex, needs expert knowledge or significant changes to existing systems. Like adding a completely new subsystem support or a completely new program type don't exist before.
- id: commit_complexity
type: single_choice
question: "What is the estimated complexity of implementing this commit?"
choices:
- value: Simple can be used without much configuration. For example a simple helper function.
- value: Moderate requires some setup or understanding of the system. For example a new map type or a new link type.
- value: Complex needs expert knowledge or significant changes to existing systems. Like adding a completely new subsystem support or a completely new program type don't exist before.
- value: It's a merge commit not related to any of the above.

- id: Major related component
type: single_choice
question: "What major component that the commit is related to?"
choices:
- value: The eBPF verifier
- value: The JIT compiler
- value: The helper and kfuncs
- value: The syscall interface
- value: The eBPF maps
- value: The libbpf library
- value: The bpftool utility
- value: The test cases and makefiles
- value: The attach events and bpf link. e.g. perf events, tracepoints, etc.
- value: The BPF Type Format (BTF)
- value: Other component related to eBPF but not listed above.
- value: It's not related to any of the above, it's not related to bpf subsystem in Linux kernel, may be wrong data.
- id: Major related implementation component
type: single_choice
question: "What major implementation component that the commit is modified on?"
choices:
- value: The eBPF verifier
- value: The eBPF JIT compiler for different architectures
- value: The helper and kfuncs
- value: The syscall interface
- value: The eBPF maps
- value: The libbpf library
- value: The bpftool utility
- value: The test cases and makefiles
- value: The attach events e.g. perf events tracepoints network HID LSM etc.
- value: The BPF Type Format (BTF)
- value: Other component related to eBPF but not listed above.
- value: It's a merge commit including changes to multiple implementation components.
- value: It's not related to any of the above it's not related to bpf subsystem in Linux kernel may be wrong data.

- id: program_types_related
type: multiple_choice
question: "What eBPF program(s) may the commit relate to and designed for?"
choices:
- value: xdp like programs
- value: socket like programs
- value: tc/netfilter like programs
- value: tracepoints like programs
- value: kprobe/uprobe/ftrace like programs
- value: profile like programs
- value: LSM like programs
- value: cgroup like programs
- value: HID driver like programs
- value: scheduler like programs
- value: It improves the overall eBPF infrastructure (e.g., verifier, runtime, etc.).
- value: It's an experimental feature that doesn't fit into existing categories.
- value: It's not related to any of the above.
- value: other
- id: Major related logic component
type: single_choice
question: "What major logic component that the commit is related to? logic component is different to implementation component."
choices:
- value: A eBPF Instruction Logic for adding fixing or updating the way eBPF instructions are interpreted validated or executed by the eBPF virtual machine in the kernel. e.g. add fix optimized eBPF instructions.
- value: A eBPF Program Logic related to different eBPF program types (e.g. XDP tc kprobes) and how the kernel manages attaches and runs these programs. e.g. add eBPF program type fix things related to eBPF program.
- value: Runtime features Logic related to eBPF helper or kfunc functions which provide access to kernel resources from eBPF programs (e.g. reading from maps manipulating packet data). e.g. helpers kfuncs etc.
- value: eBPF events Logic for handling events that trigger eBPF programs such as network packet reception system calls or tracing events. e.g. add new event fix things related to XDP HID perf events tracepoint etc.
- value: Control Plane interface Logic for userspace control. This involves adding fixing or modifying syscalls that are part of the control plane interface for eBPF allowing userspace programs to interact with eBPF features in the kernel.
- value: Maps Logic for how eBPF maps (data structures shared between kernel and user space) are created accessed and managed.
- value: It's a merge commit including changes to multiple logic components.

- id: usecases_or_events
type: multiple_choice
question: "What eBPF usecases/events may the commit relate to and designed for?"
choices:
- value: xdp type programs
- value: socket type programs
- value: tc/netfilter type programs
- value: tracepoints type programs
- value: kprobe/uprobe/ftrace type programs
- value: profile type programs
- value: LSM type programs
- value: cgroup type programs
- value: HID driver type programs
- value: scheduler type programs
- value: It improves the overall eBPF infrastructure (e.g. verifier runtime etc.)
- value: It's an experimental feature that doesn't fit into existing categories.
- value: It's not related to any of the above.
- value: other
6 changes: 3 additions & 3 deletions survey/feature_survey.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ questions:
type: single_choice
question: "What is the estimated complexity of implementing this commit?"
choices:
- value: Simple, can be used without much configuration. For example, a simple helper function.
- value: Moderate, requires some setup or understanding of the system. For example, a new map type or a new link type.
- value: Complex, needs expert knowledge or significant changes to existing systems. Like adding a completely new subsystem support or a completely new program type don't exist before.
- value: Simple and can be used without much configuration. For example, a simple helper function.
- value: Moderate and requires some setup or understanding of the system. For example, a new map type or a new link type.
- value: Complex and needs expert knowledge or significant changes to existing systems. Like adding a completely new subsystem support or a completely new program type don't exist before.
- value: It's a merge commit, not related to any of the above.

- id: program_types_related
Expand Down
File renamed without changes.
28 changes: 15 additions & 13 deletions survey/survey_struct.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,26 +126,28 @@ def send_openai_request(api_url, headers, payload):
else:
raise Exception(f"API call failed: {response.status_code} {response.text}")

# Function to save the response to the CSV file, combining it with commit data
def save_response_to_csv(content, csv_filename, commit_data):
# Define the fieldnames (commit fields + survey response fields)
fieldnames = list(commit_data.keys()) + list(content.keys())

# Check if the file exists to determine if we need to write headers
file_exists = os.path.isfile(csv_filename)

with open(csv_filename, mode="a", newline="") as file:
writer = csv.DictWriter(file, fieldnames=fieldnames)

if not file_exists:
# Write header if the file doesn't exist
writer.writeheader()

# Combine commit data with survey response content
combined_data = {**commit_data, **content}

# Write the row to the CSV
writer.writerow(combined_data)
try:
with open(csv_filename, mode="a", newline="") as file:
writer = csv.DictWriter(file, fieldnames=fieldnames, quoting=csv.QUOTE_ALL)

if not file_exists:
# Write header if the file doesn't exist
writer.writeheader()

# Combine commit data with survey response content
combined_data = {**commit_data, **content}

# Write the row to the CSV
writer.writerow(combined_data)
except Exception as e:
print(f"Error writing to CSV: {e}")

# Function to read commit data from the CSV file
def read_commit_data(commit_csv_file):
Expand Down
6 changes: 0 additions & 6 deletions survey_response.csv

This file was deleted.

0 comments on commit 413ffae

Please sign in to comment.