1- syntax = "proto3 " ;
1+ syntax = "proto2 " ;
22
33package tensorboard ;
44
@@ -13,40 +13,49 @@ message GraphDebugInfo {
1313 message FileLineCol {
1414 // File name index, which can be used to retrieve the file name string from
1515 // `files`. The value should be between 0 and (len(files)-1)
16- int32 file_index = 1 ;
16+ optional int32 file_index = 1 ;
1717
1818 // Line number in the file.
19- int32 line = 2 ;
19+ optional int32 line = 2 ;
2020
2121 // Col number in the file line.
22- int32 col = 3 ;
22+ optional int32 col = 3 ;
2323
2424 // Name of function contains the file line.
25- string func = 4 ;
25+ optional string func = 4 ;
2626
2727 // Source code contained in this file line.
28- string code = 5 ;
28+ optional string code = 5 ;
2929 }
3030
3131 // This represents a stack trace which is a ordered list of `FileLineCol`.
3232 message StackTrace {
33- // Each line in the stack trace .
34- repeated FileLineCol file_line_cols = 1 ;
33+ repeated FileLineCol file_line_cols = 1 ; // Deprecated .
34+ repeated fixed64 frame_id = 2 [ packed = true ] ;
3535 }
3636
3737 // This stores all the source code file names and can be indexed by the
3838 // `file_index`.
3939 repeated string files = 1 ;
4040
41- // This maps a node name to a stack trace in the source code.
41+ // Stack traces and frames are uniqueified during construction. These maps
42+ // index from the unique id for a frame/trace to the value.
43+ map <fixed64 , FileLineCol > frames_by_id = 4 ;
44+ map <fixed64 , StackTrace > traces_by_id = 6 ;
45+
46+ map <string , StackTrace > traces = 2 ; // Deprecated.
47+
48+ // This maps a node name to a trace id contained in `traces_by_id`.
49+ //
4250 // The map key is a mangling of the containing function and op name with
4351 // syntax:
4452 // op.name '@' func_name
45- // For ops in the top-level graph, the func_name is the empty string.
53+ // For ops in the top-level graph, the func_name is the empty string and hence
54+ // the `@` may be ommitted.
4655 // Note that op names are restricted to a small number of characters which
4756 // exclude '@', making it impossible to collide keys of this form. Function
4857 // names accept a much wider set of characters.
4958 // It would be preferable to avoid mangling and use a tuple key of (op.name,
5059 // func_name), but this is not supported with protocol buffers.
51- map <string , StackTrace > traces = 2 ;
60+ map <string , fixed64 > name_to_trace_id = 5 ;
5261}
0 commit comments