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 trace tool to support libva trace process #251

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lindongw
Copy link

Signed-off-by: Lindong Wu [email protected]

@@ -0,0 +1,1970 @@
{
"name": "Intel-Media",
Copy link
Author

Choose a reason for hiding this comment

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

media driver manifest, auto generated from manifest file

<?xml version="1.0"?>
<instrumentationManifest xsi:schemaLocation="http://schemas.microsoft.com/win/2004/08/events eventman.xsd" xmlns="http://schemas.microsoft.com/win/2004/08/events" xmlns:win="http://manifests.microsoft.com/win/2004/08/windows/events" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:trace="http://schemas.microsoft.com/win/2004/08/events/trace">
<instrumentation>
<events>
Copy link
Author

Choose a reason for hiding this comment

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

libva manifest, describe event and event data format.

TYPE_PADDING = 29
TYPE_TIME_EXTEND = 30
TYPE_TIME_STAMP = 31

Copy link
Author

Choose a reason for hiding this comment

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

script to parser trace.dat file from trace-cmd

@@ -0,0 +1,51 @@
import unittest
Copy link
Author

Choose a reason for hiding this comment

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

unittest code


class mpeg2(base):
def __init__(self):
self.dispatch = {
Copy link
Author

Choose a reason for hiding this comment

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

only add mpeg2 decode and h264 encode buffer data support at first version.
try run and capture trace with libva-util mpeg2 decode and h264 encode sample app.

tracetool/README.md Outdated Show resolved Hide resolved
tracetool/README.md Outdated Show resolved Hide resolved
tracetool/Modules/RTLog.py Outdated Show resolved Hide resolved
tracetool/Modules/ftrace.py Outdated Show resolved Hide resolved
tracetool/Modules/i915.py Outdated Show resolved Hide resolved
tracetool/Modules/surface.py Outdated Show resolved Hide resolved
tracetool/Modules/RTLog.py Outdated Show resolved Hide resolved
tracetool/main.py Outdated Show resolved Hide resolved
tracetool/Manifest/libva_trace.man Outdated Show resolved Hide resolved
tracetool/README.md Outdated Show resolved Hide resolved
@lindongw lindongw force-pushed the master branch 2 times, most recently from 8a9f52d to 9a73413 Compare April 28, 2022 06:20
@lindongw lindongw requested a review from dvrogozh May 5, 2022 01:12
tracetool/README.md Show resolved Hide resolved
# <micro version> increase the version for other change (new definition etc.)
# reset micro version to zero when minor version is incremented

version = '2.5.1'
Copy link
Contributor

Choose a reason for hiding this comment

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

where this is coming from? latest version of libva-utils is 2.14.0

Copy link
Author

Choose a reason for hiding this comment

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

trace tool has its own version, its source and version is synced from gfx-driver trace tool.
after this pr done, i need back merge change to gfx-driver.
in the future, trace tool should sync to gfx-driver trace tool regularly.

Copy link
Contributor

Choose a reason for hiding this comment

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

libva-utils already has versioning. Don't introduce another one especially which relies on some internal development state. Please, align with whatever version is current for libva-utils.

tracetool/modules/media.py Outdated Show resolved Hide resolved
tracetool/Modules/RTLog.py Outdated Show resolved Hide resolved
@lindongw lindongw force-pushed the master branch 2 times, most recently from b6e2d4a to 5d4e977 Compare May 25, 2022 05:24
@lindongw lindongw requested a review from dvrogozh May 25, 2022 05:45
tracetool/README.md Outdated Show resolved Hide resolved
tracetool/README.md Outdated Show resolved Hide resolved
tracetool/README.md Outdated Show resolved Hide resolved
@lindongw lindongw requested a review from dvrogozh June 2, 2022 10:11
@lindongw lindongw force-pushed the master branch 3 times, most recently from f58b610 to 994dd12 Compare June 8, 2022 01:32
@lindongw lindongw force-pushed the master branch 3 times, most recently from 30a44bd to 3bbb0cc Compare June 15, 2022 06:00
tracetool/README.md Outdated Show resolved Hide resolved
# <micro version> increase the version for other change (new definition etc.)
# reset micro version to zero when minor version is incremented

version = '2.5.1'
Copy link
Contributor

Choose a reason for hiding this comment

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

libva-utils already has versioning. Don't introduce another one especially which relies on some internal development state. Please, align with whatever version is current for libva-utils.

@lindongw
Copy link
Author

lindongw commented Aug 1, 2022

made a change to version, reuse libva-utils version if exist


version = '2.5.1'
# get version from external if have
if os.path.isfile('..'+os.sep+'meson.build'):
Copy link
Contributor

Choose a reason for hiding this comment

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

imho, I think this is bad idea. We just need to hardcode the same version here as for meson.build and confgure.ac and provide a ci job to verify that version is the same across all 3 places.

Copy link
Author

Choose a reason for hiding this comment

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

better to detect version in code, if hardcode here, next version update need change here too. someone may forget to do that.
configure use pkg cmd to get installed libva version. is this way better?

Copy link
Contributor

Choose a reason for hiding this comment

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

No. configure.ac hardcodes this as well: https://github.com/intel/libva-utils/blob/master/configure.ac#L31. That's why I talk about ci job to check version match.

I do not think that runtime detection is a good thing. It needs to be embedded.

Copy link
Author

Choose a reason for hiding this comment

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

ok, have matched to latest libva-utils version

@lindongw lindongw force-pushed the master branch 2 times, most recently from adf6a2a to a2644e5 Compare August 5, 2022 04:07
# Licensed under the MIT License.
#

# tool version match to libva-utils version.
Copy link
Author

Choose a reason for hiding this comment

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

match to libva-utils version, also update version comments

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