* [PATCH i-g-t 1/4] stats: Add wikipedia links to get_trimean() and get_iqm()
@ 2015-07-01 23:21 Damien Lespiau
2015-07-01 23:21 ` [PATCH i-g-t 2/4] aux: Don't evaluate several times the arguments of min() and max() Damien Lespiau
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Damien Lespiau @ 2015-07-01 23:21 UTC (permalink / raw)
To: intel-gfx
Useful knowledge for anyone looking at the documentation and following
the linkes.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
lib/igt_stats.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/lib/igt_stats.c b/lib/igt_stats.c
index b7053c3..70650ec 100644
--- a/lib/igt_stats.c
+++ b/lib/igt_stats.c
@@ -496,11 +496,15 @@ double igt_stats_get_std_deviation(igt_stats_t *stats)
* igt_stats_get_iqm:
* @stats: An #igt_stats_t instance
*
- * Retrieves the interquartile mean of the @stats dataset.
+ * Retrieves the
+ * [interquartile mean](https://en.wikipedia.org/wiki/Interquartile_mean) (IQM)
+ * of the @stats dataset.
*
* The interquartile mean is a "statistical measure of central tendency".
* It is a truncated mean that discards the lowest and highest 25% of values,
* and calculates the mean value of the remaining central values.
+ *
+ * It's useful to hide outliers in measurements (due to cold cache etc).
*/
double igt_stats_get_iqm(igt_stats_t *stats)
{
@@ -533,7 +537,8 @@ double igt_stats_get_iqm(igt_stats_t *stats)
* igt_stats_get_trimean:
* @stats: An #igt_stats_t instance
*
- * Retrieves the trimean of the @stats dataset.
+ * Retrieves the [trimean](https://en.wikipedia.org/wiki/Trimean) of the @stats
+ * dataset.
*
* The trimean is a the most efficient 3-point L-estimator, even more
* robust than the median at estimating the average of a sample population.
--
2.1.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH i-g-t 2/4] aux: Don't evaluate several times the arguments of min() and max()
2015-07-01 23:21 [PATCH i-g-t 1/4] stats: Add wikipedia links to get_trimean() and get_iqm() Damien Lespiau
@ 2015-07-01 23:21 ` Damien Lespiau
2015-07-01 23:21 ` [PATCH i-g-t 3/4] build: Add DEBUG_FLAGS to tools and self-tests Damien Lespiau
2015-07-01 23:21 ` [PATCH i-g-t 4/4] build: Add an option to not use the git hash in version Damien Lespiau
2 siblings, 0 replies; 7+ messages in thread
From: Damien Lespiau @ 2015-07-01 23:21 UTC (permalink / raw)
To: intel-gfx
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
lib/igt_aux.h | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/lib/igt_aux.h b/lib/igt_aux.h
index 9ea50de..2979314 100644
--- a/lib/igt_aux.h
+++ b/lib/igt_aux.h
@@ -91,8 +91,16 @@ void intel_require_memory(uint32_t count, uint32_t size, unsigned mode);
#define CHECK_SWAP 0x2
-#define min(a, b) ((a) < (b) ? (a) : (b))
-#define max(a, b) ((a) > (b) ? (a) : (b))
+#define min(a, b) ({ \
+ typeof(a) _a = (a); \
+ typeof(b) _b = (b); \
+ _a < _b ? _a : _b; \
+})
+#define max(a, b) ({ \
+ typeof(a) _a = (a); \
+ typeof(b) _b = (b); \
+ _a > _b ? _a : _b; \
+})
#define igt_swap(a, b) do { \
typeof(a) _tmp = (a); \
--
2.1.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH i-g-t 3/4] build: Add DEBUG_FLAGS to tools and self-tests
2015-07-01 23:21 [PATCH i-g-t 1/4] stats: Add wikipedia links to get_trimean() and get_iqm() Damien Lespiau
2015-07-01 23:21 ` [PATCH i-g-t 2/4] aux: Don't evaluate several times the arguments of min() and max() Damien Lespiau
@ 2015-07-01 23:21 ` Damien Lespiau
2015-07-01 23:21 ` [PATCH i-g-t 4/4] build: Add an option to not use the git hash in version Damien Lespiau
2 siblings, 0 replies; 7+ messages in thread
From: Damien Lespiau @ 2015-07-01 23:21 UTC (permalink / raw)
To: intel-gfx
Makes using GDB better on those binaries.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
lib/tests/Makefile.am | 2 +-
tools/Makefile.am | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/tests/Makefile.am b/lib/tests/Makefile.am
index 938d2ab..f09d2fe 100644
--- a/lib/tests/Makefile.am
+++ b/lib/tests/Makefile.am
@@ -6,7 +6,7 @@ AM_TESTS_ENVIRONMENT = \
EXTRA_DIST = $(check_SCRIPTS)
-AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) \
+AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) $(DEBUG_CFLAGS) \
-I$(srcdir)/../.. \
-I$(srcdir)/.. \
-include "$(srcdir)/../../lib/check-ndebug.h" \
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 8288248..da971c3 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -7,6 +7,6 @@ SUBDIRS += quick_dump
endif
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib
-AM_CFLAGS = $(DRM_CFLAGS) $(PCIACCESS_CFLAGS) $(CWARNFLAGS) $(CAIRO_CFLAGS) $(LIBUNWIND_CFLAGS)
+AM_CFLAGS = $(DEBUG_CFLAGS) $(DRM_CFLAGS) $(PCIACCESS_CFLAGS) $(CWARNFLAGS) $(CAIRO_CFLAGS) $(LIBUNWIND_CFLAGS)
LDADD = $(top_builddir)/lib/libintel_tools.la $(DRM_LIBS) $(PCIACCESS_LIBS) $(CAIRO_LIBS) $(LIBUDEV_LIBS) $(LIBUNWIND_LIBS) -lm
--
2.1.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH i-g-t 4/4] build: Add an option to not use the git hash in version
2015-07-01 23:21 [PATCH i-g-t 1/4] stats: Add wikipedia links to get_trimean() and get_iqm() Damien Lespiau
2015-07-01 23:21 ` [PATCH i-g-t 2/4] aux: Don't evaluate several times the arguments of min() and max() Damien Lespiau
2015-07-01 23:21 ` [PATCH i-g-t 3/4] build: Add DEBUG_FLAGS to tools and self-tests Damien Lespiau
@ 2015-07-01 23:21 ` Damien Lespiau
2015-07-02 8:31 ` Ville Syrjälä
2015-07-02 9:33 ` Thomas Wood
2 siblings, 2 replies; 7+ messages in thread
From: Damien Lespiau @ 2015-07-01 23:21 UTC (permalink / raw)
To: intel-gfx
When developing, it's quite annoying that the version changes every
commit, causing the library to be rebuild and everything single binary
re-linked.
Add a config option to skip that.
I remember Ville asking for this "feature" as well.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
configure.ac | 7 +++++++
lib/Makefile.sources | 5 +++++
2 files changed, 12 insertions(+)
diff --git a/configure.ac b/configure.ac
index 4208f00..caa3f50 100644
--- a/configure.ac
+++ b/configure.ac
@@ -212,6 +212,13 @@ if test "x$enable_debug" = xyes; then
AC_SUBST([DEBUG_CFLAGS])
fi
+# prevent relinking the world on every commit for developpers
+AC_ARG_ENABLE(skip-version,
+ AS_HELP_STRING([--enable-skip-version],
+ [Do not use git hash in version]),
+ [skip_version=$enableval], [skip_version=no])
+AM_CONDITIONAL(SKIP_VERSION, [test "x$skip_version" = xyes])
+
# -----------------------------------------------------------------------------
# To build multithread code, gcc uses -pthread, Solaris Studio cc uses -mt
diff --git a/lib/Makefile.sources b/lib/Makefile.sources
index f8a1b92..2148684 100644
--- a/lib/Makefile.sources
+++ b/lib/Makefile.sources
@@ -60,6 +60,10 @@ libintel_tools_la_SOURCES = \
.PHONY: version.h.tmp
+if SKIP_VERSION
+$(IGT_LIB_PATH)/version.h.tmp:
+ @echo '#define IGT_GIT_SHA1 "SKIP"' >> $@
+else
$(IGT_LIB_PATH)/version.h.tmp:
@touch $@
@if test -d $(GPU_TOOLS_PATH)/.git; then \
@@ -73,6 +77,7 @@ $(IGT_LIB_PATH)/version.h.tmp:
else \
echo '#define IGT_GIT_SHA1 "NOT-GIT"' ; \
fi >> $@
+endif # SKIP_VERSION
$(IGT_LIB_PATH)/version.h: $(IGT_LIB_PATH)/version.h.tmp
--
2.1.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH i-g-t 4/4] build: Add an option to not use the git hash in version
2015-07-01 23:21 ` [PATCH i-g-t 4/4] build: Add an option to not use the git hash in version Damien Lespiau
@ 2015-07-02 8:31 ` Ville Syrjälä
2015-07-02 8:42 ` Chris Wilson
2015-07-02 9:33 ` Thomas Wood
1 sibling, 1 reply; 7+ messages in thread
From: Ville Syrjälä @ 2015-07-02 8:31 UTC (permalink / raw)
To: Damien Lespiau; +Cc: intel-gfx
On Thu, Jul 02, 2015 at 12:21:43AM +0100, Damien Lespiau wrote:
> When developing, it's quite annoying that the version changes every
> commit, causing the library to be rebuild and everything single binary
> re-linked.
>
> Add a config option to skip that.
>
> I remember Ville asking for this "feature" as well.
Thank you. This has indeed been annoying me for a while.
>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> ---
> configure.ac | 7 +++++++
> lib/Makefile.sources | 5 +++++
> 2 files changed, 12 insertions(+)
>
> diff --git a/configure.ac b/configure.ac
> index 4208f00..caa3f50 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -212,6 +212,13 @@ if test "x$enable_debug" = xyes; then
> AC_SUBST([DEBUG_CFLAGS])
> fi
>
> +# prevent relinking the world on every commit for developpers
> +AC_ARG_ENABLE(skip-version,
> + AS_HELP_STRING([--enable-skip-version],
> + [Do not use git hash in version]),
> + [skip_version=$enableval], [skip_version=no])
> +AM_CONDITIONAL(SKIP_VERSION, [test "x$skip_version" = xyes])
> +
> # -----------------------------------------------------------------------------
>
> # To build multithread code, gcc uses -pthread, Solaris Studio cc uses -mt
> diff --git a/lib/Makefile.sources b/lib/Makefile.sources
> index f8a1b92..2148684 100644
> --- a/lib/Makefile.sources
> +++ b/lib/Makefile.sources
> @@ -60,6 +60,10 @@ libintel_tools_la_SOURCES = \
>
> .PHONY: version.h.tmp
>
> +if SKIP_VERSION
> +$(IGT_LIB_PATH)/version.h.tmp:
> + @echo '#define IGT_GIT_SHA1 "SKIP"' >> $@
> +else
> $(IGT_LIB_PATH)/version.h.tmp:
> @touch $@
> @if test -d $(GPU_TOOLS_PATH)/.git; then \
> @@ -73,6 +77,7 @@ $(IGT_LIB_PATH)/version.h.tmp:
> else \
> echo '#define IGT_GIT_SHA1 "NOT-GIT"' ; \
> fi >> $@
> +endif # SKIP_VERSION
>
>
> $(IGT_LIB_PATH)/version.h: $(IGT_LIB_PATH)/version.h.tmp
> --
> 2.1.0
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH i-g-t 4/4] build: Add an option to not use the git hash in version
2015-07-02 8:31 ` Ville Syrjälä
@ 2015-07-02 8:42 ` Chris Wilson
0 siblings, 0 replies; 7+ messages in thread
From: Chris Wilson @ 2015-07-02 8:42 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: intel-gfx
On Thu, Jul 02, 2015 at 11:31:57AM +0300, Ville Syrjälä wrote:
> On Thu, Jul 02, 2015 at 12:21:43AM +0100, Damien Lespiau wrote:
> > When developing, it's quite annoying that the version changes every
> > commit, causing the library to be rebuild and everything single binary
> > re-linked.
> >
> > Add a config option to skip that.
> >
> > I remember Ville asking for this "feature" as well.
>
> Thank you. This has indeed been annoying me for a while.
I hadn't noticed, I only build the lib/ if a test fails to link.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH i-g-t 4/4] build: Add an option to not use the git hash in version
2015-07-01 23:21 ` [PATCH i-g-t 4/4] build: Add an option to not use the git hash in version Damien Lespiau
2015-07-02 8:31 ` Ville Syrjälä
@ 2015-07-02 9:33 ` Thomas Wood
1 sibling, 0 replies; 7+ messages in thread
From: Thomas Wood @ 2015-07-02 9:33 UTC (permalink / raw)
To: Damien Lespiau; +Cc: Intel Graphics Development
On 2 July 2015 at 00:21, Damien Lespiau <damien.lespiau@intel.com> wrote:
> When developing, it's quite annoying that the version changes every
> commit, causing the library to be rebuild and everything single binary
everything → every
> re-linked.
>
> Add a config option to skip that.
>
> I remember Ville asking for this "feature" as well.
>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> ---
> configure.ac | 7 +++++++
> lib/Makefile.sources | 5 +++++
> 2 files changed, 12 insertions(+)
>
> diff --git a/configure.ac b/configure.ac
> index 4208f00..caa3f50 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -212,6 +212,13 @@ if test "x$enable_debug" = xyes; then
> AC_SUBST([DEBUG_CFLAGS])
> fi
>
> +# prevent relinking the world on every commit for developpers
"developers"
> +AC_ARG_ENABLE(skip-version,
I wonder whether "git-hash" would be more obvious here, so
"--disable-git-hash" would turn off the git hash in version output.
> + AS_HELP_STRING([--enable-skip-version],
> + [Do not use git hash in version]),
> + [skip_version=$enableval], [skip_version=no])
> +AM_CONDITIONAL(SKIP_VERSION, [test "x$skip_version" = xyes])
> +
> # -----------------------------------------------------------------------------
>
> # To build multithread code, gcc uses -pthread, Solaris Studio cc uses -mt
> diff --git a/lib/Makefile.sources b/lib/Makefile.sources
> index f8a1b92..2148684 100644
> --- a/lib/Makefile.sources
> +++ b/lib/Makefile.sources
> @@ -60,6 +60,10 @@ libintel_tools_la_SOURCES = \
>
> .PHONY: version.h.tmp
>
> +if SKIP_VERSION
> +$(IGT_LIB_PATH)/version.h.tmp:
> + @echo '#define IGT_GIT_SHA1 "SKIP"' >> $@
Perhaps just "git", so the version output appears as (for example)
"1.11-git", rather than "1.11-SKIP".
> +else
> $(IGT_LIB_PATH)/version.h.tmp:
> @touch $@
> @if test -d $(GPU_TOOLS_PATH)/.git; then \
> @@ -73,6 +77,7 @@ $(IGT_LIB_PATH)/version.h.tmp:
> else \
> echo '#define IGT_GIT_SHA1 "NOT-GIT"' ; \
> fi >> $@
> +endif # SKIP_VERSION
>
>
> $(IGT_LIB_PATH)/version.h: $(IGT_LIB_PATH)/version.h.tmp
> --
> 2.1.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-07-02 9:33 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-01 23:21 [PATCH i-g-t 1/4] stats: Add wikipedia links to get_trimean() and get_iqm() Damien Lespiau
2015-07-01 23:21 ` [PATCH i-g-t 2/4] aux: Don't evaluate several times the arguments of min() and max() Damien Lespiau
2015-07-01 23:21 ` [PATCH i-g-t 3/4] build: Add DEBUG_FLAGS to tools and self-tests Damien Lespiau
2015-07-01 23:21 ` [PATCH i-g-t 4/4] build: Add an option to not use the git hash in version Damien Lespiau
2015-07-02 8:31 ` Ville Syrjälä
2015-07-02 8:42 ` Chris Wilson
2015-07-02 9:33 ` Thomas Wood
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.