Skip to contentSkip to conversation

Add an autoconf test for presence oftaskstats.freepages_count

PATCH Subrata Modak 2 participants 5 messages May 15, 2009 – May 25, 2009 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 4 lines · Jiri Palecek

Also, use it in getdelays.c to prevent compilation failures

Hello,

Quoted 8 lines

I've found that ltp didn't compile on Debian because of old kernel headers, which contain taskstats struct without some of the needed fields. This autoconf test detects it and disables the code that would otherwise break.

Regards
Jiri Palecek

Same here:

ERROR: patch seems to be corrupt (line wrapped?)
#132: FILE: configure.ac:24:

include/config.h.default +0 -0

total: 1 errors, 0 warnings, 83 lines checked

and

patching file configure.ac
patch: **** malformed patch at line 132: diff --git a/include/config.h.default b/include/config.h.default

Regards--
Subrata

Quoted 118 lines
---
  configure.ac                                    |    1 +
  include/config.h.default                        |    2 +
  m4/ltp-taskstats.m4                             |   38 +++++++++++++++++++++++
  testcases/kernel/controllers/cgroup/getdelays.c |   15 ++++++---
  4 files changed, 51 insertions(+), 5 deletions(-)

create mode 100644 m4/ltp-taskstats.m4

configure.ac +1 -0
index c534c97..9fc1696 100644
@@ -20,5 +20,6 @@ LTP_CHECK_SYSCALL_MODIFY_LDT
  LTP_CHECK_SYSCALL_SIGNALFD
  LTP_CHECK_SELINUX
  LTP_CHECK_CRYPTO
+LTP_CHECK_TASKSTATS
   AC_OUTPUT
include/config.h.default +2 -0
index 9125d85..b9a6731 100644
@@ -14,3 +14,5 @@
   /* ifaddrs.h is in glibc-2.3+ */
  #define HAVE_IFADDRS_H 1
+
+#define HAVE_TASKSTATS_FREEPAGES_COUNT 1
m4/ltp-taskstats.m4 new file +38 -0
new file mode 100644
index 0000000..54da783
@@ -0,0 +1,38 @@
+dnl
+dnl Copyright (c) Jiri Palecek 2009
+dnl
+dnl This program is free software;  you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY;  without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
+dnl the GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program;  if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+dnl
+
+
+AC_DEFUN([LTP_CHECK_TASKSTATS],
+_LTP_CHECK_TASKSTATS_FREEPAGES
+)dnl
+
+dnl _LTP_CHECK_TASKSTATS_FREEPAGES
+dnl ----------------------------------------
+dnl
+dnl Check for taskstat.freepages_* members, introduced to the kernel
+dnl in commit 016ae219 in July 2008
+dnl
+
+AC_DEFUN([_LTP_CHECK_TASKSTATS_FREEPAGES],
+[dnl
+AC_CHECK_MEMBERS([struct taskstats.freepages_count],[],[],[dnl
+#include <linux/types.h>
+#include <linux/taskstats.h>
+])
+]dnl
+)dnl
testcases/kernel/controllers/cgroup/getdelays.c +10 -5
index 13f7b3a..9fe2831 100644
@@ -199,8 +199,10 @@ void print_delayacct(struct taskstats *t)
  	       "SWAP  %15s%15s\n"
  	       "      %15llu%15llu\n"
  	       "RECLAIM  %12s%15s\n"
-	       "      %15llu%15llu\n",
-	       "count", "real total", "virtual total", "delay total",
+#ifdef HAVE_TASKSTATS_FREEPAGES_COUNT
+	       "      %15llu%15llu\n"
+#endif
+	       , "count", "real total", "virtual total", "delay total",
  	       (unsigned long long)t->cpu_count,
  	       (unsigned long long)t->cpu_run_real_total,
  	       (unsigned long long)t->cpu_run_virtual_total,
@@ -211,9 +213,12 @@ void print_delayacct(struct taskstats *t)
  	       "count", "delay total",
  	       (unsigned long long)t->swapin_count,
  	       (unsigned long long)t->swapin_delay_total,
-	       "count", "delay total",
-	       (unsigned long long)t->freepages_count,
-	       (unsigned long long)t->freepages_delay_total);
+	       "count", "delay total"
+#ifdef HAVE_TASKSTATS_FREEPAGES_COUNT
+	       , (unsigned long long)t->freepages_count,
+	       (unsigned long long)t->freepages_delay_total
+#endif
+	       );
  }
   void task_context_switch_counts(struct taskstats *t)
Signature · 13 lines
1.6.2


------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Ltp-list mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#2 lore raw
Quoted 21 lines · Subrata Modak
Quoted 4 lines · Jiri Palecek

Also, use it in getdelays.c to prevent compilation failures

Hello,

Quoted 8 lines

I've found that ltp didn't compile on Debian because of old kernel headers, which contain taskstats struct without some of the needed fields. This autoconf test detects it and disables the code that would otherwise break.

Regards
Jiri Palecek

Same here:

ERROR: patch seems to be corrupt (line wrapped?)
#132: FILE: configure.ac:24:

include/config.h.default +0 -0

total: 1 errors, 0 warnings, 83 lines checked

Quoted 6 lines

and

patching file configure.ac
patch: **** malformed patch at line 132: diff --git a/include/config.h.default b/include/config.h.default

How about resending this Patch as well ?

Regards--
Subrata

Quoted 125 lines

Regards--
Subrata

Quoted 118 lines
---
  configure.ac                                    |    1 +
  include/config.h.default                        |    2 +
  m4/ltp-taskstats.m4                             |   38 +++++++++++++++++++++++
  testcases/kernel/controllers/cgroup/getdelays.c |   15 ++++++---
  4 files changed, 51 insertions(+), 5 deletions(-)

create mode 100644 m4/ltp-taskstats.m4

configure.ac +1 -0
index c534c97..9fc1696 100644
@@ -20,5 +20,6 @@ LTP_CHECK_SYSCALL_MODIFY_LDT
  LTP_CHECK_SYSCALL_SIGNALFD
  LTP_CHECK_SELINUX
  LTP_CHECK_CRYPTO
+LTP_CHECK_TASKSTATS
   AC_OUTPUT
include/config.h.default +2 -0
index 9125d85..b9a6731 100644
@@ -14,3 +14,5 @@
   /* ifaddrs.h is in glibc-2.3+ */
  #define HAVE_IFADDRS_H 1
+
+#define HAVE_TASKSTATS_FREEPAGES_COUNT 1
m4/ltp-taskstats.m4 new file +38 -0
new file mode 100644
index 0000000..54da783
@@ -0,0 +1,38 @@
+dnl
+dnl Copyright (c) Jiri Palecek 2009
+dnl
+dnl This program is free software;  you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY;  without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
+dnl the GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program;  if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+dnl
+
+
+AC_DEFUN([LTP_CHECK_TASKSTATS],
+_LTP_CHECK_TASKSTATS_FREEPAGES
+)dnl
+
+dnl _LTP_CHECK_TASKSTATS_FREEPAGES
+dnl ----------------------------------------
+dnl
+dnl Check for taskstat.freepages_* members, introduced to the kernel
+dnl in commit 016ae219 in July 2008
+dnl
+
+AC_DEFUN([_LTP_CHECK_TASKSTATS_FREEPAGES],
+[dnl
+AC_CHECK_MEMBERS([struct taskstats.freepages_count],[],[],[dnl
+#include <linux/types.h>
+#include <linux/taskstats.h>
+])
+]dnl
+)dnl
testcases/kernel/controllers/cgroup/getdelays.c +10 -5
index 13f7b3a..9fe2831 100644
@@ -199,8 +199,10 @@ void print_delayacct(struct taskstats *t)
  	       "SWAP  %15s%15s\n"
  	       "      %15llu%15llu\n"
  	       "RECLAIM  %12s%15s\n"
-	       "      %15llu%15llu\n",
-	       "count", "real total", "virtual total", "delay total",
+#ifdef HAVE_TASKSTATS_FREEPAGES_COUNT
+	       "      %15llu%15llu\n"
+#endif
+	       , "count", "real total", "virtual total", "delay total",
  	       (unsigned long long)t->cpu_count,
  	       (unsigned long long)t->cpu_run_real_total,
  	       (unsigned long long)t->cpu_run_virtual_total,
@@ -211,9 +213,12 @@ void print_delayacct(struct taskstats *t)
  	       "count", "delay total",
  	       (unsigned long long)t->swapin_count,
  	       (unsigned long long)t->swapin_delay_total,
-	       "count", "delay total",
-	       (unsigned long long)t->freepages_count,
-	       (unsigned long long)t->freepages_delay_total);
+	       "count", "delay total"
+#ifdef HAVE_TASKSTATS_FREEPAGES_COUNT
+	       , (unsigned long long)t->freepages_count,
+	       (unsigned long long)t->freepages_delay_total
+#endif
+	       );
  }
   void task_context_switch_counts(struct taskstats *t)
Signature · 13 lines
1.6.2


------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial

Quoted 8 lines

Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Ltp-list mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Ltp-list mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#3 lore raw

Jiri,

Any plans to resend this ?

Regards--
Subrata

Quoted 169 lines · Subrata Modak
Quoted 21 lines · Subrata Modak
Quoted 4 lines · Jiri Palecek

Also, use it in getdelays.c to prevent compilation failures

Hello,

Quoted 8 lines

I've found that ltp didn't compile on Debian because of old kernel headers, which contain taskstats struct without some of the needed fields. This autoconf test detects it and disables the code that would otherwise break.

Regards
Jiri Palecek

Same here:

ERROR: patch seems to be corrupt (line wrapped?)
#132: FILE: configure.ac:24:

include/config.h.default +0 -0

total: 1 errors, 0 warnings, 83 lines checked

Quoted 6 lines

and

patching file configure.ac
patch: **** malformed patch at line 132: diff --git a/include/config.h.default b/include/config.h.default

How about resending this Patch as well ?

Regards--
Subrata

Quoted 125 lines

Regards--
Subrata

Quoted 118 lines
---
  configure.ac                                    |    1 +
  include/config.h.default                        |    2 +
  m4/ltp-taskstats.m4                             |   38 +++++++++++++++++++++++
  testcases/kernel/controllers/cgroup/getdelays.c |   15 ++++++---
  4 files changed, 51 insertions(+), 5 deletions(-)

create mode 100644 m4/ltp-taskstats.m4

configure.ac +1 -0
index c534c97..9fc1696 100644
@@ -20,5 +20,6 @@ LTP_CHECK_SYSCALL_MODIFY_LDT
  LTP_CHECK_SYSCALL_SIGNALFD
  LTP_CHECK_SELINUX
  LTP_CHECK_CRYPTO
+LTP_CHECK_TASKSTATS
   AC_OUTPUT
include/config.h.default +2 -0
index 9125d85..b9a6731 100644
@@ -14,3 +14,5 @@
   /* ifaddrs.h is in glibc-2.3+ */
  #define HAVE_IFADDRS_H 1
+
+#define HAVE_TASKSTATS_FREEPAGES_COUNT 1
m4/ltp-taskstats.m4 new file +38 -0
new file mode 100644
index 0000000..54da783
@@ -0,0 +1,38 @@
+dnl
+dnl Copyright (c) Jiri Palecek 2009
+dnl
+dnl This program is free software;  you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY;  without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
+dnl the GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program;  if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+dnl
+
+
+AC_DEFUN([LTP_CHECK_TASKSTATS],
+_LTP_CHECK_TASKSTATS_FREEPAGES
+)dnl
+
+dnl _LTP_CHECK_TASKSTATS_FREEPAGES
+dnl ----------------------------------------
+dnl
+dnl Check for taskstat.freepages_* members, introduced to the kernel
+dnl in commit 016ae219 in July 2008
+dnl
+
+AC_DEFUN([_LTP_CHECK_TASKSTATS_FREEPAGES],
+[dnl
+AC_CHECK_MEMBERS([struct taskstats.freepages_count],[],[],[dnl
+#include <linux/types.h>
+#include <linux/taskstats.h>
+])
+]dnl
+)dnl
testcases/kernel/controllers/cgroup/getdelays.c +10 -5
index 13f7b3a..9fe2831 100644
@@ -199,8 +199,10 @@ void print_delayacct(struct taskstats *t)
  	       "SWAP  %15s%15s\n"
  	       "      %15llu%15llu\n"
  	       "RECLAIM  %12s%15s\n"
-	       "      %15llu%15llu\n",
-	       "count", "real total", "virtual total", "delay total",
+#ifdef HAVE_TASKSTATS_FREEPAGES_COUNT
+	       "      %15llu%15llu\n"
+#endif
+	       , "count", "real total", "virtual total", "delay total",
  	       (unsigned long long)t->cpu_count,
  	       (unsigned long long)t->cpu_run_real_total,
  	       (unsigned long long)t->cpu_run_virtual_total,
@@ -211,9 +213,12 @@ void print_delayacct(struct taskstats *t)
  	       "count", "delay total",
  	       (unsigned long long)t->swapin_count,
  	       (unsigned long long)t->swapin_delay_total,
-	       "count", "delay total",
-	       (unsigned long long)t->freepages_count,
-	       (unsigned long long)t->freepages_delay_total);
+	       "count", "delay total"
+#ifdef HAVE_TASKSTATS_FREEPAGES_COUNT
+	       , (unsigned long long)t->freepages_count,
+	       (unsigned long long)t->freepages_delay_total
+#endif
+	       );
  }
   void task_context_switch_counts(struct taskstats *t)
Signature · 13 lines
1.6.2


------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial

Quoted 8 lines

Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Ltp-list mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Quoted 10 lines

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Ltp-list mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://www.creativitycat.com
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#4 lore raw
Quoted 3 lines · Subrata Modak

Jiri,

Any plans to resend this ?

Yes. Sorry, I oversaw this.

Regards
Jiri Palecek

Quoted 196 lines · Subrata Modak
Quoted 193 lines · Subrata Modak
Quoted 6 lines · Jiri Palecek
Quoted 5 lines

Also, use it in getdelays.c to prevent compilation failures

Hello,

I've found that ltp didn't compile on Debian because of old kernel

headers,

Quoted 1 line
Quoted 1 line

which contain taskstats struct without some of the needed fields.

This autoconf

Quoted 14 lines
Quoted 6 lines

test detects it and disables the code that would otherwise break.

Regards
Jiri Palecek

Same here:

ERROR: patch seems to be corrupt (line wrapped?)
#132: FILE: configure.ac:24:

include/config.h.default +0 -0

total: 1 errors, 0 warnings, 83 lines checked

Quoted 6 lines

and

patching file configure.ac
patch: **** malformed patch at line 132: diff --git a/include/config.h.default b/include/config.h.default

How about resending this Patch as well ?

Regards--
Subrata

Quoted 7 lines

Regards--
Subrata

Quoted 4 lines
---
  configure.ac                                    |    1 +
  include/config.h.default                        |    2 +
  m4/ltp-taskstats.m4                             |   38  

+++++++++++++++++++++++

Quoted 25 lines
Quoted 25 lines
  testcases/kernel/controllers/cgroup/getdelays.c |   15 ++++++---
  4 files changed, 51 insertions(+), 5 deletions(-)

create mode 100644 m4/ltp-taskstats.m4

configure.ac +1 -0
index c534c97..9fc1696 100644
@@ -20,5 +20,6 @@ LTP_CHECK_SYSCALL_MODIFY_LDT
  LTP_CHECK_SYSCALL_SIGNALFD
  LTP_CHECK_SELINUX
  LTP_CHECK_CRYPTO
+LTP_CHECK_TASKSTATS
   AC_OUTPUT
include/config.h.default +2 -0
index 9125d85..b9a6731 100644
@@ -14,3 +14,5 @@
   /* ifaddrs.h is in glibc-2.3+ */
  #define HAVE_IFADDRS_H 1
+
+#define HAVE_TASKSTATS_FREEPAGES_COUNT 1
m4/ltp-taskstats.m4 new file +0 -0
new file mode 100644
Quoted 8 lines

m4/ltp-taskstats.m4 line 4

Quoted 8 lines

index 0000000..54da783

m4/ltp-taskstats.m4 new file +4 -0
@@ -0,0 +1,38 @@
+dnl
+dnl Copyright (c) Jiri Palecek 2009
+dnl
+dnl This program is free software;  you can redistribute it and/or  

modify

Quoted 1 line

m4/ltp-taskstats.m4 line 5

Quoted 1 line
m4/ltp-taskstats.m4 new file +1 -0
+dnl it under the terms of the GNU General Public License as  

published by

Quoted 1 line

m4/ltp-taskstats.m4 line 6

Quoted 1 line
m4/ltp-taskstats.m4 new file +1 -0
+dnl the Free Software Foundation; either version 2 of the License,  

or

Quoted 8 lines

m4/ltp-taskstats.m4 line 14

Quoted 8 lines
m4/ltp-taskstats.m4 new file +8 -0
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY;  without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
+dnl the GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public  

License

Quoted 2 lines

m4/ltp-taskstats.m4 line 16

Quoted 2 lines
m4/ltp-taskstats.m4 new file +2 -0
+dnl along with this program;  if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  

02111-1307 USA

Quoted 11 lines

m4/ltp-taskstats.m4 line 27

Quoted 11 lines
m4/ltp-taskstats.m4 new file +11 -0
+dnl
+
+
+AC_DEFUN([LTP_CHECK_TASKSTATS],
+_LTP_CHECK_TASKSTATS_FREEPAGES
+)dnl
+
+dnl _LTP_CHECK_TASKSTATS_FREEPAGES
+dnl ----------------------------------------
+dnl
+dnl Check for taskstat.freepages_* members, introduced to the  

kernel

Quoted 41 lines
Quoted 41 lines
m4/ltp-taskstats.m4 new file +11 -0
+dnl in commit 016ae219 in July 2008
+dnl
+
+AC_DEFUN([_LTP_CHECK_TASKSTATS_FREEPAGES],
+[dnl
+AC_CHECK_MEMBERS([struct taskstats.freepages_count],[],[],[dnl
+#include <linux/types.h>
+#include <linux/taskstats.h>
+])
+]dnl
+)dnl
testcases/kernel/controllers/cgroup/getdelays.c +9 -5
index 13f7b3a..9fe2831 100644
@@ -199,8 +199,10 @@ void print_delayacct(struct taskstats *t)
  	       "SWAP  %15s%15s\n"
  	       "      %15llu%15llu\n"
  	       "RECLAIM  %12s%15s\n"
-	       "      %15llu%15llu\n",
-	       "count", "real total", "virtual total", "delay total",
+#ifdef HAVE_TASKSTATS_FREEPAGES_COUNT
+	       "      %15llu%15llu\n"
+#endif
+	       , "count", "real total", "virtual total", "delay total",
  	       (unsigned long long)t->cpu_count,
  	       (unsigned long long)t->cpu_run_real_total,
  	       (unsigned long long)t->cpu_run_virtual_total,
@@ -211,9 +213,12 @@ void print_delayacct(struct taskstats *t)
  	       "count", "delay total",
  	       (unsigned long long)t->swapin_count,
  	       (unsigned long long)t->swapin_delay_total,
-	       "count", "delay total",
-	       (unsigned long long)t->freepages_count,
-	       (unsigned long long)t->freepages_delay_total);
+	       "count", "delay total"
+#ifdef HAVE_TASKSTATS_FREEPAGES_COUNT
+	       , (unsigned long long)t->freepages_count,
+	       (unsigned long long)t->freepages_delay_total
+#endif
Quoted 8 lines
Quoted 8 lines
testcases/kernel/controllers/cgroup/getdelays.c +1 -1
+	       );
  }
   void task_context_switch_counts(struct taskstats *t)
--

1.6.2

------------------------------------------------------------------------------

Quoted 1 line
Quoted 1 line

The NEW KODAK i700 Series Scanners deliver under ANY circumstances!

Your

Quoted 1 line
Quoted 1 line

production scanning environment may not be a perfect world - but

thanks to

Quoted 1 line
Quoted 1 line

Kodak, there's a perfect scanner to get the job done! With the NEW

KODAK i700

Quoted 9 lines
Quoted 6 lines

Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------

Quoted 9 lines

Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Ltp-list mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Ltp-list mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Signature · 1 line
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

From ae85a155a86514804b571c0e184bfbee66cd0ee9 Mon Sep 17 00:00:00 2001
From: Jiri Palecek <[email protected]>
Date: Thu, 7 May 2009 13:48:06 +0200
Subject: [PATCH] Add an autoconf test for presence of taskstats.freepages_count
Cc: "[email protected]" <[email protected]>

Also, use it in getdelays.c to prevent compilation failures

---
 configure.ac                                    |    1 +
 include/config.h.default                        |    2 +
 m4/ltp-taskstats.m4                             |   38 +++++++++++++++++++++++
 testcases/kernel/controllers/cgroup/getdelays.c |   15 ++++++---
 4 files changed, 51 insertions(+), 5 deletions(-)
 create mode 100644 m4/ltp-taskstats.m4
configure.ac +1 -0
index c534c97..9fc1696 100644
@@ -20,5 +20,6 @@ LTP_CHECK_SYSCALL_MODIFY_LDT
 LTP_CHECK_SYSCALL_SIGNALFD
 LTP_CHECK_SELINUX
 LTP_CHECK_CRYPTO
+LTP_CHECK_TASKSTATS
 
 AC_OUTPUT
include/config.h.default +2 -0
index 9125d85..b9a6731 100644
@@ -14,3 +14,5 @@
 
 /* ifaddrs.h is in glibc-2.3+ */
 #define HAVE_IFADDRS_H 1
+
+#define HAVE_TASKSTATS_FREEPAGES_COUNT 1
m4/ltp-taskstats.m4 new file +38 -0
new file mode 100644
index 0000000..54da783
@@ -0,0 +1,38 @@
+dnl
+dnl Copyright (c) Jiri Palecek 2009
+dnl
+dnl This program is free software;  you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY;  without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
+dnl the GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program;  if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+dnl
+
+
+AC_DEFUN([LTP_CHECK_TASKSTATS],
+_LTP_CHECK_TASKSTATS_FREEPAGES
+)dnl
+
+dnl _LTP_CHECK_TASKSTATS_FREEPAGES
+dnl ----------------------------------------
+dnl
+dnl Check for taskstat.freepages_* members, introduced to the kernel
+dnl in commit 016ae219 in July 2008
+dnl
+
+AC_DEFUN([_LTP_CHECK_TASKSTATS_FREEPAGES],
+[dnl
+AC_CHECK_MEMBERS([struct taskstats.freepages_count],[],[],[dnl
+#include <linux/types.h>
+#include <linux/taskstats.h>
+])
+]dnl
+)dnl
testcases/kernel/controllers/cgroup/getdelays.c +10 -5
index 13f7b3a..9fe2831 100644
@@ -199,8 +199,10 @@ void print_delayacct(struct taskstats *t)
 	       "SWAP  %15s%15s\n"
 	       "      %15llu%15llu\n"
 	       "RECLAIM  %12s%15s\n"
-	       "      %15llu%15llu\n",
-	       "count", "real total", "virtual total", "delay total",
+#ifdef HAVE_TASKSTATS_FREEPAGES_COUNT
+	       "      %15llu%15llu\n"
+#endif
+	       , "count", "real total", "virtual total", "delay total",
 	       (unsigned long long)t->cpu_count,
 	       (unsigned long long)t->cpu_run_real_total,
 	       (unsigned long long)t->cpu_run_virtual_total,
@@ -211,9 +213,12 @@ void print_delayacct(struct taskstats *t)
 	       "count", "delay total",
 	       (unsigned long long)t->swapin_count,
 	       (unsigned long long)t->swapin_delay_total,
-	       "count", "delay total",
-	       (unsigned long long)t->freepages_count,
-	       (unsigned long long)t->freepages_delay_total);
+	       "count", "delay total"
+#ifdef HAVE_TASKSTATS_FREEPAGES_COUNT
+	       , (unsigned long long)t->freepages_count,
+	       (unsigned long long)t->freepages_delay_total
+#endif
+	       );
 }
 
 void task_context_switch_counts(struct taskstats *t)
Signature · 1 line
1.6.2

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://www.creativitycat.com

_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#5 lore raw
Quoted 11 lines · Jiří Paleček
Quoted 3 lines · Subrata Modak

Jiri,

Any plans to resend this ?

Yes. Sorry, I oversaw this.

Regards
Jiri Palecek

Thanks.

Regards--
Subrata

Quoted 185 lines
Quoted 185 lines · Subrata Modak
Quoted 183 lines · Subrata Modak
Quoted 6 lines · Jiri Palecek
Quoted 5 lines

Also, use it in getdelays.c to prevent compilation failures

Hello,

I've found that ltp didn't compile on Debian because of old kernel

headers,

Quoted 1 line
Quoted 1 line

which contain taskstats struct without some of the needed fields.

This autoconf

Quoted 14 lines
Quoted 6 lines

test detects it and disables the code that would otherwise break.

Regards
Jiri Palecek

Same here:

ERROR: patch seems to be corrupt (line wrapped?)
#132: FILE: configure.ac:24:

include/config.h.default +0 -0

total: 1 errors, 0 warnings, 83 lines checked

Quoted 6 lines

and

patching file configure.ac
patch: **** malformed patch at line 132: diff --git a/include/config.h.default b/include/config.h.default

How about resending this Patch as well ?

Regards--
Subrata

Quoted 7 lines

Regards--
Subrata

Quoted 4 lines
---
  configure.ac                                    |    1 +
  include/config.h.default                        |    2 +
  m4/ltp-taskstats.m4                             |   38  

+++++++++++++++++++++++

Quoted 25 lines
Quoted 25 lines
  testcases/kernel/controllers/cgroup/getdelays.c |   15 ++++++---
  4 files changed, 51 insertions(+), 5 deletions(-)

create mode 100644 m4/ltp-taskstats.m4

configure.ac +1 -0
index c534c97..9fc1696 100644
@@ -20,5 +20,6 @@ LTP_CHECK_SYSCALL_MODIFY_LDT
  LTP_CHECK_SYSCALL_SIGNALFD
  LTP_CHECK_SELINUX
  LTP_CHECK_CRYPTO
+LTP_CHECK_TASKSTATS
   AC_OUTPUT
include/config.h.default +2 -0
index 9125d85..b9a6731 100644
@@ -14,3 +14,5 @@
   /* ifaddrs.h is in glibc-2.3+ */
  #define HAVE_IFADDRS_H 1
+
+#define HAVE_TASKSTATS_FREEPAGES_COUNT 1
m4/ltp-taskstats.m4 new file +0 -0
new file mode 100644
Quoted 8 lines

m4/ltp-taskstats.m4 line 4

Quoted 8 lines

index 0000000..54da783

m4/ltp-taskstats.m4 new file +4 -0
@@ -0,0 +1,38 @@
+dnl
+dnl Copyright (c) Jiri Palecek 2009
+dnl
+dnl This program is free software;  you can redistribute it and/or  

modify

Quoted 1 line

m4/ltp-taskstats.m4 line 5

Quoted 1 line
m4/ltp-taskstats.m4 new file +1 -0
+dnl it under the terms of the GNU General Public License as  

published by

Quoted 1 line

m4/ltp-taskstats.m4 line 6

Quoted 1 line
m4/ltp-taskstats.m4 new file +1 -0
+dnl the Free Software Foundation; either version 2 of the License,  

or

Quoted 8 lines

m4/ltp-taskstats.m4

Quoted 8 lines
m4/ltp-taskstats.m4 new file +8 -0
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY;  without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
+dnl the GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public  

License

Quoted 2 lines

m4/ltp-taskstats.m4 line 16

Quoted 2 lines
m4/ltp-taskstats.m4 new file +2 -0
+dnl along with this program;  if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  

02111-1307 USA

Quoted 11 lines

m4/ltp-taskstats.m4

Quoted 11 lines
m4/ltp-taskstats.m4 new file +11 -0
+dnl
+
+
+AC_DEFUN([LTP_CHECK_TASKSTATS],
+_LTP_CHECK_TASKSTATS_FREEPAGES
+)dnl
+
+dnl _LTP_CHECK_TASKSTATS_FREEPAGES
+dnl ----------------------------------------
+dnl
+dnl Check for taskstat.freepages_* members, introduced to the  

kernel

Quoted 41 lines
Quoted 41 lines
m4/ltp-taskstats.m4 new file +11 -0
+dnl in commit 016ae219 in July 2008
+dnl
+
+AC_DEFUN([_LTP_CHECK_TASKSTATS_FREEPAGES],
+[dnl
+AC_CHECK_MEMBERS([struct taskstats.freepages_count],[],[],[dnl
+#include <linux/types.h>
+#include <linux/taskstats.h>
+])
+]dnl
+)dnl
testcases/kernel/controllers/cgroup/getdelays.c +9 -5
index 13f7b3a..9fe2831 100644
@@ -199,8 +199,10 @@ void print_delayacct(struct taskstats *t)
  	       "SWAP  %15s%15s\n"
  	       "      %15llu%15llu\n"
  	       "RECLAIM  %12s%15s\n"
-	       "      %15llu%15llu\n",
-	       "count", "real total", "virtual total", "delay total",
+#ifdef HAVE_TASKSTATS_FREEPAGES_COUNT
+	       "      %15llu%15llu\n"
+#endif
+	       , "count", "real total", "virtual total", "delay total",
  	       (unsigned long long)t->cpu_count,
  	       (unsigned long long)t->cpu_run_real_total,
  	       (unsigned long long)t->cpu_run_virtual_total,
@@ -211,9 +213,12 @@ void print_delayacct(struct taskstats *t)
  	       "count", "delay total",
  	       (unsigned long long)t->swapin_count,
  	       (unsigned long long)t->swapin_delay_total,
-	       "count", "delay total",
-	       (unsigned long long)t->freepages_count,
-	       (unsigned long long)t->freepages_delay_total);
+	       "count", "delay total"
+#ifdef HAVE_TASKSTATS_FREEPAGES_COUNT
+	       , (unsigned long long)t->freepages_count,
+	       (unsigned long long)t->freepages_delay_total
+#endif
Quoted 8 lines
Quoted 8 lines
testcases/kernel/controllers/cgroup/getdelays.c +1 -1
+	       );
  }
   void task_context_switch_counts(struct taskstats *t)
--

1.6.2

------------------------------------------------------------------------------

Quoted 1 line
Quoted 1 line

The NEW KODAK i700 Series Scanners deliver under ANY circumstances!

Your

Quoted 1 line
Quoted 1 line

production scanning environment may not be a perfect world - but

thanks to

Quoted 1 line
Quoted 1 line

Kodak, there's a perfect scanner to get the job done! With the NEW

KODAK i700

Quoted 9 lines
Quoted 6 lines

Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------

Quoted 9 lines

Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Ltp-list mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Quoted 16 lines
Quoted 11 lines
Quoted 10 lines

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Ltp-list mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Signature · 1 line
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://www.creativitycat.com
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list