mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-10 22:20:45 +01:00
Exec info an cache blocking
This commit is contained in:
parent
4e65ad21ac
commit
63a2993827
16
lib/Init.cc
16
lib/Init.cc
@ -1,7 +1,6 @@
|
|||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
/* pab: Signal magic. Processor state dump is x86-64 specific */
|
/* pab: Signal magic. Processor state dump is x86-64 specific */
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -16,10 +15,9 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
||||||
#undef __X86_64
|
#define __X86_64
|
||||||
#define MAC
|
#define EXECINFO
|
||||||
|
#ifdef EXECINFO
|
||||||
#ifdef MAC
|
|
||||||
#include <execinfo.h>
|
#include <execinfo.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -183,6 +181,11 @@ void Grid_init(int *argc,char ***argv)
|
|||||||
if( GridCmdOptionExists(*argv,*argv+*argc,"--lebesgue") ){
|
if( GridCmdOptionExists(*argv,*argv+*argc,"--lebesgue") ){
|
||||||
LebesgueOrder::UseLebesgueOrder=1;
|
LebesgueOrder::UseLebesgueOrder=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( GridCmdOptionExists(*argv,*argv+*argc,"--cacheblocking") ){
|
||||||
|
arg= GridCmdOptionPayload(*argv,*argv+*argc,"--cacheblocking");
|
||||||
|
GridCmdOptionIntVector(arg,LebesgueOrder::Block);
|
||||||
|
}
|
||||||
GridParseLayout(*argv,*argc,
|
GridParseLayout(*argv,*argc,
|
||||||
Grid_default_latt,
|
Grid_default_latt,
|
||||||
Grid_default_mpi);
|
Grid_default_mpi);
|
||||||
@ -227,6 +230,7 @@ void Grid_sa_signal_handler(int sig,siginfo_t *si,void * ptr)
|
|||||||
struct sigcontext *sc = (struct sigcontext *)&uc->uc_mcontext;
|
struct sigcontext *sc = (struct sigcontext *)&uc->uc_mcontext;
|
||||||
printf(" instruction %llx\n",(unsigned long long)sc->rip);
|
printf(" instruction %llx\n",(unsigned long long)sc->rip);
|
||||||
#define REG(A) printf(" %s %lx\n",#A,sc-> A);
|
#define REG(A) printf(" %s %lx\n",#A,sc-> A);
|
||||||
|
|
||||||
REG(rdi);
|
REG(rdi);
|
||||||
REG(rsi);
|
REG(rsi);
|
||||||
REG(rbp);
|
REG(rbp);
|
||||||
@ -247,7 +251,7 @@ void Grid_sa_signal_handler(int sig,siginfo_t *si,void * ptr)
|
|||||||
REG(r14);
|
REG(r14);
|
||||||
REG(r15);
|
REG(r15);
|
||||||
#endif
|
#endif
|
||||||
#ifdef MAC
|
#ifdef EXECINFO
|
||||||
int symbols = backtrace (Grid_backtrace_buffer,_NBACKTRACE);
|
int symbols = backtrace (Grid_backtrace_buffer,_NBACKTRACE);
|
||||||
char **strings = backtrace_symbols(Grid_backtrace_buffer,symbols);
|
char **strings = backtrace_symbols(Grid_backtrace_buffer,symbols);
|
||||||
for (int i = 0; i < symbols; i++){
|
for (int i = 0; i < symbols; i++){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user