[Beignet] [PATCH 0/15] Add Profiling support in beignet.

junyan.he at inbox.com junyan.he at inbox.com
Wed Aug 12 01:48:14 PDT 2015


From: Junyan He <junyan.he at linux.intel.com>

The profiling support is enabled by this patch set.
The profiling information is as following:
-------------------------- Log 0 --------------------------
| fix functions id:   7     simd:   16   kernel id:    0  |
| thread id:          0     EU id:   1   half slice id: 0 |
| dispatch Mask:   1 prolog:       197  epilog:      6699 |
| globalX:   4~   4  globalY:   0~   0  globalZ:   0~   0 |
|  ts0 :        64  | ts1 :         0  | ts2 :       930  |
|  ts3 :         0  | ts4 :      1046  | ts5 :      1170  |
|  ts6 :         0  | ts7 :         0  | ts8 :         0  |
|  ts9 :      1624  | ts10:      1838  | ts11:         0  |
|  ts12:      2032  | ts13:         0  | ts14:      2312  |
|  ts15:      2560  | ts16:         0  | ts17:         0  |
|  ts18:         0  | ts19:      2972  |                  |

Each hw thread will create one such log items.
Prolog is the timestamp when we enter this kernel, while
epilog is the timestamp we finish and leave it.
ts0~ts19 reocord the time offsets from the prolog, but
the base is 0.
We now just record first 20 blocks' timestamp. Later after
we fully support SourceToBinary, we can set profiling point
at any location.

Signed-off-by: Junyan He <junyan.he at linux.intel.com>
Signed-off-by: Bai Yannan <yannan.bai at intel.com>
---
backend/src/CMakeLists.txt                         |    3 +
backend/src/backend/gen_context.cpp                |  379 ++++++++++++++++++++
backend/src/backend/gen_context.hpp                |    5 +
.../src/backend/gen_insn_gen7_schedule_info.hxx    |    2 +
backend/src/backend/gen_insn_selection.cpp         |  131 +++++++
backend/src/backend/gen_insn_selection.hpp         |    8 +
backend/src/backend/gen_insn_selection.hxx         |    2 +
backend/src/backend/gen_program.cpp                |    6 +-
backend/src/backend/gen_program.hpp                |    2 +-
backend/src/backend/gen_reg_allocation.cpp         |    2 +-
backend/src/backend/gen_register.hpp               |    9 +
backend/src/backend/program.cpp                    |   36 +-
backend/src/backend/program.h                      |   16 +
backend/src/backend/program.hpp                    |   25 +-
backend/src/gbe_bin_interpreter.cpp                |    4 +
backend/src/ir/instruction.cpp                     |   98 ++++-
backend/src/ir/instruction.hpp                     |   26 ++
backend/src/ir/instruction.hxx                     |    2 +
backend/src/ir/profile.cpp                         |   12 +-
backend/src/ir/profile.hpp                         |    7 +-
backend/src/ir/profiling.cpp                       |   70 ++++
backend/src/ir/profiling.hpp                       |  132 +++++++
backend/src/ir/unit.cpp                            |    5 +-
backend/src/ir/unit.hpp                            |    5 +
backend/src/llvm/llvm_gen_backend.cpp              |   45 +++
backend/src/llvm/llvm_gen_backend.hpp              |    3 +
backend/src/llvm/llvm_gen_ocl_function.hxx         |    5 +
backend/src/llvm/llvm_profiling.cpp                |  227 ++++++++++++
backend/src/llvm/llvm_to_gen.cpp                   |    5 +-
backend/src/llvm/llvm_to_gen.hpp                   |    3 +-
src/cl_command_queue.c                             |    8 +
src/cl_command_queue.h                             |    2 +
src/cl_command_queue_gen7.c                        |   37 ++
src/cl_driver.h                                    |   16 +
src/cl_driver_defs.c                               |    5 +
src/cl_gbe_loader.cpp                              |   15 +
src/cl_gbe_loader.h                                |    3 +
src/intel/intel_gpgpu.c                            |   54 +++
src/intel/intel_gpgpu.h                            |    3 +-
39 files changed, 1402 insertions(+), 16 deletions(-)
-- 
1.7.9.5



More information about the Beignet mailing list