Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Place ring diagnostics into a (string * string) list rather than a bi…

…g string

This will allow the diagnostics to fit naturally into a xenstore
directory.
  • Loading branch information...
commit 56af5c674c1e35e97f264d0c474cf0b02a168a68 1 parent 0b9fcc3
@djs55 authored
View
2  lib/ring.ml
@@ -323,7 +323,7 @@ end
module type Bidirectional_byte_stream = sig
val init: Cstruct.t -> unit
- val to_debug_string: Cstruct.t -> string
+ val to_debug_map: Cstruct.t -> (string * string) list
module Front : sig
val unsafe_write: Cstruct.t -> string -> int -> int -> int
View
2  lib/ring.mli
@@ -158,7 +158,7 @@ end
module type Bidirectional_byte_stream = sig
val init: Cstruct.t -> unit
- val to_debug_string: Cstruct.t -> string
+ val to_debug_map: Cstruct.t -> (string * string) list
module Front : sig
val unsafe_write: Cstruct.t -> string -> int -> int -> int
View
10 xen/console_ring.ml
@@ -32,10 +32,12 @@ module Ring = struct
} as little_endian
end
let init = zero
- let to_debug_string t =
- Printf.sprintf "input_cons = %ld prod = %ld; output cons = %ld prod = %ld"
- (Layout.get_ring_input_cons t) (Layout.get_ring_input_prod t)
- (Layout.get_ring_output_cons t) (Layout.get_ring_output_prod t)
+ let to_debug_map t = [
+ "input-cons", Int32.to_string (Layout.get_ring_input_cons t);
+ "input-prod", Int32.to_string (Layout.get_ring_input_prod t);
+ "output-cons", Int32.to_string (Layout.get_ring_output_cons t);
+ "output-prod", Int32.to_string (Layout.get_ring_output_prod t);
+ ]
module Front = Pipe(Layout)
module Back = Pipe(Reverse(Layout))
end
View
11 xen/xenstore_ring.ml
@@ -32,11 +32,12 @@ module Ring = struct
} as little_endian
end
let init = zero
- let to_debug_string t =
- Printf.sprintf "input_cons = %ld prod = %ld; output cons = %ld prod = %ld"
- (Layout.get_ring_input_cons t) (Layout.get_ring_input_prod t)
- (Layout.get_ring_output_cons t) (Layout.get_ring_output_prod t)
-
+ let to_debug_map t = [
+ "input-cons", Int32.to_string (Layout.get_ring_input_cons t);
+ "input-prod", Int32.to_string (Layout.get_ring_input_prod t);
+ "output-cons", Int32.to_string (Layout.get_ring_output_cons t);
+ "output-prod", Int32.to_string (Layout.get_ring_output_prod t);
+ ]
module Front = Pipe(Layout)
module Back = Pipe(Reverse(Layout))
end
Please sign in to comment.
Something went wrong with that request. Please try again.