diff options
author | Tom Rini <trini@konsulko.com> | 2023-09-24 17:15:15 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-09-24 17:15:15 -0400 |
commit | 729b0104bb9f658eb4212a1b880873eb781874de (patch) | |
tree | 97e9fe98dfc5b00ef2211fa1c1c65a7022612798 | |
parent | 4cb31a9f3560b293670de95e76c1f3cf2f9e1ca8 (diff) | |
parent | e278ad9a2ea5e4a089773a8fd79a5ea0e8572316 (diff) | |
download | u-boot-729b0104bb9f658eb4212a1b880873eb781874de.zip u-boot-729b0104bb9f658eb4212a1b880873eb781874de.tar.gz u-boot-729b0104bb9f658eb4212a1b880873eb781874de.tar.bz2 |
Merge tag 'dm-pull-23sep23' of https://source.denx.de/u-boot/custodians/u-boot-dm
trace: correct format of flyrecord
minor bug fixes
-rw-r--r-- | arch/sandbox/dts/test.dts | 2 | ||||
-rw-r--r-- | tools/binman/etype/section.py | 2 | ||||
-rwxr-xr-x | tools/buildman/main.py | 10 | ||||
-rw-r--r-- | tools/patman/gitutil.py | 4 | ||||
-rw-r--r-- | tools/patman/pyproject.toml | 2 | ||||
-rw-r--r-- | tools/proftool.c | 39 |
6 files changed, 47 insertions, 12 deletions
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index f351d5c..057e1ca 100644 --- a/arch/sandbox/dts/test.dts +++ b/arch/sandbox/dts/test.dts @@ -103,7 +103,7 @@ /* * This is used for the VBE OS-request tests. A FAT filesystem * created in a partition with the VBE information appearing - * before the parititon starts + * before the partition starts */ firmware0 { bootph-verify; diff --git a/tools/binman/etype/section.py b/tools/binman/etype/section.py index fb49e85..30c1041 100644 --- a/tools/binman/etype/section.py +++ b/tools/binman/etype/section.py @@ -40,7 +40,7 @@ class Entry_section(Entry): For example code, see etypes which subclass `Entry_section`, or `cbfs.py` for a more involved example:: - $ grep -l \(Entry_section tools/binman/etype/*.py + $ grep -l \\(Entry_section tools/binman/etype/*.py ReadNode() Call `super().ReadNode()`, then read any special properties for the diff --git a/tools/buildman/main.py b/tools/buildman/main.py index 5f42a58..3cf877e 100755 --- a/tools/buildman/main.py +++ b/tools/buildman/main.py @@ -7,7 +7,7 @@ """See README for more information""" try: - from importlib.resources import files + import importlib.resources except ImportError: # for Python 3.6 import importlib_resources @@ -83,7 +83,13 @@ def run_buildman(): run_test_coverage() elif args.full_help: - tools.print_full_help(str(files('buildman').joinpath('README.rst'))) + if hasattr(importlib.resources, 'files'): + dirpath = importlib.resources.files('buildman') + tools.print_full_help(str(dirpath.joinpath('README.rst'))) + else: + with importlib.resources.path('buildman', 'README.rst') as readme: + tools.print_full_help(str(readme)) + # Build selected commits for selected boards else: diff --git a/tools/patman/gitutil.py b/tools/patman/gitutil.py index 6700057..b0a12f2 100644 --- a/tools/patman/gitutil.py +++ b/tools/patman/gitutil.py @@ -651,7 +651,7 @@ def get_default_user_name(): Returns: User name found in .gitconfig file, or None if none """ - uname = command.output_one_line('git', 'config', '--global', 'user.name') + uname = command.output_one_line('git', 'config', '--global', '--includes', 'user.name') return uname @@ -661,7 +661,7 @@ def get_default_user_email(): Returns: User's email found in .gitconfig file, or None if none """ - uemail = command.output_one_line('git', 'config', '--global', 'user.email') + uemail = command.output_one_line('git', 'config', '--global', '--includes', 'user.email') return uemail diff --git a/tools/patman/pyproject.toml b/tools/patman/pyproject.toml index c5dc7c7..a54211f 100644 --- a/tools/patman/pyproject.toml +++ b/tools/patman/pyproject.toml @@ -23,7 +23,7 @@ classifiers = [ "Bug Tracker" = "https://source.denx.de/groups/u-boot/-/issues" [project.scripts] -patman = "patman.__main__:run_patman" +patman = "patman.__main__" [tool.setuptools.package-data] patman = ["*.rst"] diff --git a/tools/proftool.c b/tools/proftool.c index 101bcb6..fca45e4 100644 --- a/tools/proftool.c +++ b/tools/proftool.c @@ -1493,14 +1493,43 @@ static int write_pages(struct twriter *tw, enum out_format_t out_format, static int write_flyrecord(struct twriter *tw, enum out_format_t out_format, int *missing_countp, int *skip_countp) { - int start, ret, len; + unsigned long long start, start_ofs, len; + int ret; FILE *fout = tw->fout; char str[200]; + /* Record start pointer */ + start_ofs = tw->ptr; + debug("Start of flyrecord header at: 0x%llx\n", start_ofs); + tw->ptr += fprintf(fout, "flyrecord%c", 0); + /* flyrecord\0 - allocated 10 bytes */ + start_ofs += 10; + + /* + * 8 bytes that are a 64-bit word containing the offset into the file + * that holds the data for the CPU. + * + * 8 bytes that are a 64-bit word containing the size of the CPU + * data at that offset. + */ + start_ofs += 16; + + snprintf(str, sizeof(str), + "[local] global counter uptime perf mono mono_raw boot x86-tsc\n"); + len = strlen(str); + + /* trace clock length - 8 bytes */ + start_ofs += 8; + /* trace clock data */ + start_ofs += len; + + debug("Calculated flyrecord header end at: 0x%llx, trace clock len: 0x%llx\n", + start_ofs, len); + /* trace data */ - start = ALIGN(tw->ptr + 16, TRACE_PAGE_SIZE); + start = ALIGN(start_ofs, TRACE_PAGE_SIZE); tw->ptr += tputq(fout, start); /* use a placeholder for the size */ @@ -1509,12 +1538,12 @@ static int write_flyrecord(struct twriter *tw, enum out_format_t out_format, return -1; tw->ptr += ret; - snprintf(str, sizeof(str), - "[local] global counter uptime perf mono mono_raw boot x86-tsc\n"); - len = strlen(str); tw->ptr += tputq(fout, len); tw->ptr += tputs(fout, str); + debug("End of flyrecord header at: 0x%x, offset: 0x%llx\n", + tw->ptr, start); + debug("trace text base %lx, map file %lx\n", text_base, text_offset); ret = write_pages(tw, out_format, missing_countp, skip_countp); |