projects / phoronix-test-suite.git / commitdiff
Build Results
 
Summary

Description: Phoronix Test Suite open-source benchmarking development
Last Change: Tue 5/21/13 15:49

Recent Commits
Time
Signed-Off By
Description
Commit Diff
Tue 5/21/13 15:49
Michael Larabel  
Phoronix Test Suite... 
Fri 5/17/13 22:52
Michael Larabel  
phodevi: Report CPU... 
Wed 5/15/13 21:50
Michael Larabel  
Phoronix Test Suite... 
Wed 5/15/13 21:39
Michael Larabel  
pts-core: DragonFlyBSD... 
Wed 5/15/13 15:47
Michael Larabel  
pts-core: Updates from... 
Wed 5/15/13 15:43
Michael Larabel  
 
 
> --git a/CHANGE-LOG b/CHANGE-LOG
index 2fe4b91
..9ea45cc 100644
--- a/CHANGE-LOG
+++ b/CHANGE-LOG
@@ -6,+6,@@ Phoronix Test Suite (Git)
 - 
pts-coreFix potential crash in list-test-usage command
 
pts-coreSupport for detecting FSGSBASE and RDRAND on Intel Ivy Bridge
 
pts-coreWhen detecting a CPU comparisonreport the detailed CPU system table information
+- pts-coreWhen detecting a GPU/OpenGL comparisonreport the detailed GPU system table information
 
pts-coreFix PRESET_OPTIONS failing when specifying an option value rather than its index
 
pts_GraphFix rounding issue on pts tables that are very wide
 
pts_GraphAdd SideViewTable
diff 
--git a/pts-core/objects/client/pts_client.php b/pts-core/objects/client/pts_client.php
index 27e37c6
..cdcf2c6 100644
--- a/pts-core/objects/client/pts_client.php
+++ b/pts-core/objects/client/pts_client.php
@@ -958,+958,16 @@ class pts_client
             $chart
->renderChart($save_to_dir '/result-graphs/systems.BILDE_EXTENSION');
             unset(
$chart);

-            if(
$intent && in_array('Processor'$intent[0]) && is_dir($save_to_dir '/system-logs/'))
+            if(
$intent && is_dir($save_to_dir '/system-logs/'))
             {
-                
$chart = new pts_DetailedSystemComponentTable($result_file$save_to_dir '/system-logs/''Processor'$intent);
+                if(
in_array('Processor'$intent[0]))
+                {
+                    
$chart = new pts_DetailedSystemComponentTable($result_file$save_to_dir '/system-logs/''Processor'$intent);
+                }
+                else if(
in_array('Graphics'$intent[0]))
+                {
+                    
$chart = new pts_DetailedSystemComponentTable($result_file$save_to_dir '/system-logs/''Graphics'$intent);
+                }

                 if(
$chart)
                 {
diff --git a/pts-core/objects/phodevi/parsers/phodevi_parser.php b/pts-core/objects/phodevi/parsers/phodevi_parser.php
index 9de40bd
..75ef819 100644
--- a/pts-core/objects/phodevi/parsers/phodevi_parser.php
+++ b/pts-core/objects/phodevi/parsers/phodevi_parser.php
@@ -204,41 +204,74 @@ class phodevi_parser
     
}
     public static function 
software_glxinfo_version()
     {
-        static 
$info = -1;
+        
$info false;
+        if(isset(
phodevi::$vfs->glxinfo))
+        {
+            
$glxinfo phodevi::$vfs->glxinfo;
+        }
+        else if(
PTS_IS_CLIENT && pts_client::executable_in_path('fglrxinfo'))
+        {
+            
$glxinfo shell_exec('fglrxinfo 2> /dev/null');
+        }

-        if(
$info == -1)
+        if(isset(
$glxinfo) && ($pos strpos($glxinfo'OpenGL version string:')) !== false)
         {
-            
$info false;
-            if(isset(
phodevi::$vfs->glxinfo))
-            {
-                
$glxinfo phodevi::$vfs->glxinfo;
-            }
-            else if(
PTS_IS_CLIENT && pts_client::executable_in_path('fglrxinfo'))
-            {
-                
$glxinfo shell_exec('fglrxinfo 2> /dev/null');
-            }
+            
$info substr($glxinfo$pos 23);
+            
$info substr($info0strpos($info"\n"));
+            
$info trim(str_replace(array(' Release'), null$info));

-            if(isset(
$glxinfo) && ($pos strpos($glxinfo'OpenGL version string:')) !== false)
+            
// The Catalyst Linux Driver now does something stupid for this string like:
+            //  1.4 (2.1 (3.3.11005 Compatibility Profile Context))
+            if(($pos strrpos($info'Compatibility Profile Context')) !== false && strpos($info'(') != ($last_p strrpos($info'(')))
             {
-                
$info substr($glxinfo$pos 23);
-                
$info substr($info0strpos($info"\n"));
-                
$info trim(str_replace(array(' Release'), null$info));
-
-                
// The Catalyst Linux Driver now does something stupid for this string like:
-                //  1.4 (2.1 (3.3.11005 Compatibility Profile Context))
-                if(($pos strrpos($info'Compatibility Profile Context')) !== false && strpos($info'(') != ($last_p strrpos($info'(')))
+                if(
is_numeric(str_replace(array('(''.'' '), nullsubstr($info0$last_p))))
                 {
-                    if(
is_numeric(str_replace(array('(''.'' '), nullsubstr($info0$last_p))))
-                    {
-                        
// This looks like a stupid Catalyst driver string, so grab the last GL version reported
-                        $info str_replace(array('('')'), nullsubstr($info, ($last_p 1)));
-                    }
+                    
// This looks like a stupid Catalyst driver string, so grab the last GL version reported
+                    $info str_replace(array('('')'), nullsubstr($info, ($last_p 1)));
                 }
             }
         }

         return 
$info;
     }
+    public static function 
software_glxinfo_glsl_version()
+    {
+        
$info false;
+        if(isset(
phodevi::$vfs->glxinfo))
+        {
+            
$glxinfo phodevi::$vfs->glxinfo;
+        }
+        else if(
PTS_IS_CLIENT && pts_client::executable_in_path('fglrxinfo'))
+        {
+            
$glxinfo shell_exec('fglrxinfo 2> /dev/null');
+        }
+
+        if(isset(
$glxinfo) && ($pos strpos($glxinfo'OpenGL shading language version string:')) !== false)
+        {
+            
$info substr($glxinfo$pos 40);
+            
$info substr($info0strpos($info"\n"));
+            
$info trim($info);
+        }
+
+        return 
$info;
+    }
+    public static function 
software_glxinfo_opengl_extensions()
+    {
+        
$info false;
+        if(isset(
phodevi::$vfs->glxinfo))
+        {
+            
$glxinfo phodevi::$vfs->glxinfo;
+
+            if((
$pos strpos($glxinfo'OpenGL extensions:')) !== false)
+            {
+                
$info substr($glxinfo$pos 19);
+                
$info substr($info0strpos($infoPHP_EOL PHP_EOL));
+                
$info trim($info);
+            }
+        }
+
+        return 
$info;
+    }
 }

 
?>
diff --git a/pts-core/objects/pts_Graph/pts_DetailedSystemComponentTable.php b/pts-core/objects/pts_Graph/pts_DetailedSystemComponentTable.php
index 6ed1074..4c67b29 100644
--- a/pts-core/objects/pts_Graph/pts_DetailedSystemComponentTable.php
+++ b/pts-core/objects/pts_Graph/pts_DetailedSystemComponentTable.php
@@ -45,6 +45,11 @@ class pts_DetailedSystemComponentTable extends pts_SideViewTable
             $this->columns = array('Model Name', 'Core Count', 'Thread Count', 'L2 Cache', 'Cache Size', 'Virtualization', 'Features', 'Flags');
             $logs_to_capture = array('cpuinfo', 'lscpu');
         }
+        else if($component_report == 'Graphics')
+        {
+            $this->columns = array('OpenGL Renderer', 'OpenGL Version', 'GLSL Version', 'OpenGL Extensions');
+            $logs_to_capture = array('glxinfo');
+        }

         if(is_dir($log_location))
         {
@@ -66,6 +71,9 @@ class pts_DetailedSystemComponentTable extends pts_SideViewTable
                         case 'Processor':
                             $this->generate_processor_data($result_file, $system_identifier);
                             break;
+                        case 'Graphics':
+                            $this->generate_graphics_data($result_file, $system_identifier);
+                            break;

                     }
                 }
@@ -79,33 +87,38 @@ class pts_DetailedSystemComponentTable extends pts_SideViewTable
             return false;
         }

-        if($component_report == 'Processor')
+        foreach(array(array('Processor', 'Flags', 'Common CPU Flags'), array('Graphics', 'OpenGL Extensions', 'Common OpenGL Extensions')) as $set)
         {
-            $flags_data = $this->table_data[array_search('Flags', $this->columns)];
-
-            foreach($flags_data as $i => &$flags)
+            if($component_report == $set[0])
             {
-                $flags = explode(' ', $flags);
-                sort($flags);
-            }
+                $flags_data = $this->table_data[array_search($set[1], $this->columns)];
+
+                foreach($flags_data as $i => &$flags)
+                {
+                    $flags = explode(' ', $flags);
+                    sort($flags);
+                }

-            $intersect = call_user_func_array('array_intersect', $flags_data);
-            sort($intersect);
+                $intersect = call_user_func_array('array_intersect', $flags_data);
+                sort($intersect);

-            foreach($flags_data as $i => &$flags)
-            {
-                $flags = array_diff($flags, $intersect);
-                $flags = implode(' ', $flags);
-            }
+                foreach($flags_data as $i => &$flags)
+                {
+                    $flags = array_diff($flags, $intersect);
+                    $flags = implode(' ', $flags);
+                }

-            $this->table_data[array_search('Flags', $this->columns)] = $flags_data;
+                $this->table_data[array_search($set[1], $this->columns)] = $flags_data;
+                $intersect_label = $set[2];
+                break;
+            }
         }

         parent::__construct($this->rows, $this->columns, $this->table_data);

-        if($component_report == 'Processor' && !empty($intersect))
+        if(isset($intersect) && !empty($intersect))
         {
-            $this->addTestNote(implode(' ', $intersect), null, 'Common CPU Flags');
+            $this->addTestNote(trim(implode(' ', $intersect)), null, $intersect_label);
         }
     }
     protected function generate_processor_data(&$result_file, $system_identifier)
@@ -145,6 +158,32 @@ class pts_DetailedSystemComponentTable extends pts_SideViewTable
             $this->table_data[$i][$rows_index] = $line;
         }
     }
+    protected function generate_graphics_data(&$result_file, $system_identifier)
+    {
+        array_push($this->rows, $system_identifier);
+        $rows_index = count($this->rows) - 1;
+
+        foreach($this->columns as $i => $cpuinfo_item)
+        {
+            switch($cpuinfo_item)
+            {
+                case 'OpenGL Renderer':
+                    $line = phodevi_parser::read_glx_renderer();
+                    break;
+                case 'OpenGL Version':
+                    $line = phodevi_parser::software_glxinfo_version();
+                    break;
+                case 'GLSL Version':
+                    $line = phodevi_parser::software_glxinfo_glsl_version();
+                    break;
+                case 'OpenGL Extensions':
+                    $line = phodevi_parser::software_glxinfo_opengl_extensions();
+                    break;
+            }
+
+            $this->table_data[$i][$rows_index] = $line;
+        }
+    }
 
Phoronix.com
Linux Driver Forums
Copyright © 2013 by Phoronix Media