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

BOARD: clean naming of profiling data *.gcda #92

Merged
merged 3 commits into from
Feb 25, 2024

Conversation

Apaczer
Copy link
Member

@Apaczer Apaczer commented Feb 11, 2024

Otherwise it brakes MinGW git or be it WSL2 with native git - to long file names for Win FS.

@Apaczer
Copy link
Member Author

Apaczer commented Feb 11, 2024

welp the compiler ask for #home#runner#work#buildroot#buildroot#output#build#libretro-gpsp-092c5144827ee3ac07a6af9276244221c303ca41#<src_file>.gcda so need to find a workaround to explictly point to only <src_file>.gcda or maybe run prebuild script and change the naming on the run.

Anyway you can't use normally provided *.gcda data in current state because for e.g. when running locally on your machine, a working directory of compiler changes.

@Apaczer Apaczer marked this pull request as draft February 11, 2024 21:37
for file in *; do cleanname=$(echo "$file" | sed 's/^.*<commit>#//') ; mv "$file" "$cleanname" ; done

for file in *; do newdirectory=$(echo "$file" | sed 's/#[^#]*$//' | sed 's/#/\//g') ; mkdir -p "$newdirectory" ; newname=$(echo "$file" | sed 's/^.*#//') ; mv "$file" "$newdirectory/$newname" ; done
@TriForceX
Copy link
Member

Otherwise it brakes MinGW git or be it WSL2 with native git - to long file names for Win FS.

mm ive had similar problems with paths so i solved it by using git config --system core.longpaths true i wonder if this affects also files (or if there is a counterpart for files)

@Apaczer Apaczer marked this pull request as ready for review February 22, 2024 23:28
@Apaczer Apaczer force-pushed the clean_gcda branch 2 times, most recently from c24d430 to 6d03ff4 Compare February 24, 2024 22:44
PROFILE=
0 - don't use PGO
YES - generate data at runtime
APPLY - apply optimization at compilation step
@Apaczer Apaczer merged commit 5c1e9aa into MiyooCFW:master Feb 25, 2024
4 checks passed
@Apaczer
Copy link
Member Author

Apaczer commented Feb 25, 2024

If you want directory structure intact in profile/ data output don't indicate path in -fprofile-generate.

or run this script for output .gcda files (replace <commit> with git hash):

for file in *; do cleanname=$(echo "$file" | sed 's/^.*<commit>#//') ; mv "$file" "$cleanname" ; done

for file in *; do newdirectory=$(echo "$file" | sed 's/#[^#]*$//' | sed 's/#/\//g') ; mkdir -p "$newdirectory" ; newname=$(echo "$file" | sed 's/^.*#//') ; mv "$file" "$newdirectory/$newname" ; done

@Apaczer Apaczer deleted the clean_gcda branch February 25, 2024 15:02
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.

2 participants