HPCToolkit
Fatbin.cpp File Reference
#include <stdio.h>
#include <string.h>
#include <lib/support/StrUtil.hpp>
#include <include/hpctoolkit-config.h>
#include <Elf_X.h>
#include "InputFile.hpp"
#include "ElfHelper.hpp"
Include dependency graph for Fatbin.cpp:

Go to the source code of this file.

Classes

struct  NvidiaFatBinHeader_s
 

Macros

#define CUDA_FATBIN_SECTION   ".nvFatBinSegment"
 
#define CUDA_FATBIN_DATASECTION   ".nv_fatbin"
 
#define CUDA_FATBIN_MAGIC   0x466243b1
 
#define CUDA_FATBIN_VERSION   1
 

Typedefs

typedef struct NvidiaFatBinHeader_s NvidiaFatBinHeader_t
 
typedef std::vector< NvidiaFatBinHeader_t * > FatbinSectionVector
 

Functions

static bool findCubinSections (ElfFile *elfFile, char *obj_ptr, Elf *elf, ElfSectionVector *sections, ElfFileVector *elfFileVector)
 
bool findCubins (ElfFile *elfFile, ElfFileVector *elfFileVector)
 
void writeElfFile (ElfFile *elfFile, const char *suffix)
 

Variables

static FatbinSectionVector fatbinSectionVector
 

Macro Definition Documentation

◆ CUDA_FATBIN_DATASECTION

#define CUDA_FATBIN_DATASECTION   ".nv_fatbin"

Definition at line 86 of file Fatbin.cpp.

◆ CUDA_FATBIN_MAGIC

#define CUDA_FATBIN_MAGIC   0x466243b1

Definition at line 88 of file Fatbin.cpp.

◆ CUDA_FATBIN_SECTION

#define CUDA_FATBIN_SECTION   ".nvFatBinSegment"

Definition at line 85 of file Fatbin.cpp.

◆ CUDA_FATBIN_VERSION

#define CUDA_FATBIN_VERSION   1

Definition at line 89 of file Fatbin.cpp.

Typedef Documentation

◆ FatbinSectionVector

typedef std::vector<NvidiaFatBinHeader_t *> FatbinSectionVector

Definition at line 105 of file Fatbin.cpp.

◆ NvidiaFatBinHeader_t

Function Documentation

◆ findCubins()

bool findCubins ( ElfFile elfFile,
ElfFileVector elfFileVector 
)

Definition at line 246 of file Fatbin.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findCubinSections()

static bool findCubinSections ( ElfFile elfFile,
char *  obj_ptr,
Elf *  elf,
ElfSectionVector sections,
ElfFileVector elfFileVector 
)
static

Definition at line 205 of file Fatbin.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeElfFile()

void writeElfFile ( ElfFile elfFile,
const char *  suffix 
)

Definition at line 271 of file Fatbin.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ fatbinSectionVector

FatbinSectionVector fatbinSectionVector
static

Definition at line 113 of file Fatbin.cpp.