From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
Tvrtko Ursulin <tursulin@ursulin.net>,
Intel-gfx@lists.freedesktop.org
Subject: Re: [RFC i-g-t 2/2] tools/intel_engine_stats: Just a demo
Date: Wed, 2 Aug 2017 14:10:35 +0100 [thread overview]
Message-ID: <d29406b0-e632-abb9-8ff9-0a51e7ec1813@linux.intel.com> (raw)
In-Reply-To: <150167894551.14888.10306139651179287756@mail.alporthouse.com>
On 02/08/2017 14:02, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2017-08-02 13:33:12)
>> diff --git a/tools/intel_engine_stats.c b/tools/intel_engine_stats.c
>> new file mode 100644
>> index 000000000000..24dbb1eb6a57
>> --- /dev/null
>> +++ b/tools/intel_engine_stats.c
>> @@ -0,0 +1,40 @@
>> +#include <stdio.h>
>> +#include <sys/types.h>
>> +#include <sys/stat.h>
>> +#include <fcntl.h>
>> +#include <unistd.h>
>> +
>> +#include "drmtest.h"
>> +#include "igt_debugfs.h"
>> +
>> +int main(void)
>> +{
>> + int drm_fd, fd;
>> +
>> + drm_fd = drm_open_driver(DRIVER_INTEL);
>> +
>> + fd = igt_debugfs_open(drm_fd, "i915_engine_stats", O_RDONLY);
>> + igt_assert(fd >= 0);
>
> I'm just going to advise caution over using debugfs from tools/. If it
> is useful enough to wrap up, presumably we want to support it
> indefinitely. This is just
That's true yes. This is more just a reference to how it should be used
because ...
> watch cat /sys/kernel/debug/dri/0/i915_engine_stats
... it is not like the above since you would lose previous context if
you did that. Because utilisation tracking is only working while the
file is open, so the intended usage is to keep rewinding and looking at
the delta.
> but a small demo to extract just this from perf would be useful.
Good idea - marking as TODO.
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2017-08-02 13:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-02 12:33 [RFC i-g-t 0/2] IGT PMU support Tvrtko Ursulin
2017-08-02 12:33 ` [RFC i-g-t 1/2] intel-gpu-overlay: Use new class/instance based PMU API Tvrtko Ursulin
2017-08-02 12:56 ` Chris Wilson
2017-08-02 12:58 ` Petri Latvala
2017-08-02 12:33 ` [RFC i-g-t 2/2] tools/intel_engine_stats: Just a demo Tvrtko Ursulin
2017-08-02 13:01 ` Petri Latvala
2017-08-02 13:02 ` Chris Wilson
2017-08-02 13:10 ` Tvrtko Ursulin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d29406b0-e632-abb9-8ff9-0a51e7ec1813@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=chris@chris-wilson.co.uk \
--cc=tursulin@ursulin.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox